# Seedance 2.0 Reference To Video Seedance 2.0 Reference To Video is available in the Business API catalog. - Model ID: `bytedance/seedance-2.0-reference-to-video` - Provider: ByteDance - Modality: image → video - Type: Reference to Video - Status: stable - Delivery: async - Max resolution: 1080p - Output format: mp4 - Aspect ratios: 16:9, 9:16, 1:1 ## Authentication Send your API key in the `X-API-Key` header. ## Endpoint ``` POST https://api.dev.pika.art/v1/media/bytedance/seedance-2.0/reference-to-video ``` ## Reference uploads To use a local file (image, audio, or video) as a model input, first request a presigned upload URL: `POST /v1/media/uploads` with the `X-API-Key` header and a JSON body `{ "content_type": "image/png", "size_bytes": 12345 }`, where `size_bytes` is the file's exact byte length. The response returns `upload_url` (temporary, valid for 5 minutes), `headers`, and `url` (the permanent Pika URL). PUT the file bytes to `upload_url` sending the returned `headers` verbatim — both `Content-Type` and `Content-Length` are signed, and storage returns a bare 403 if either is missing or differs. Then pass `url` into fields such as `image`, `image_url`, `end_image_url`, `image_urls`, `first_frame_image`, or `mask_image_url`. ## Generate `POST /v1/media/bytedance/seedance-2.0/reference-to-video` ```bash curl -X POST https://api.dev.pika.art/v1/media/bytedance/seedance-2.0/reference-to-video \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Intense UNDERWATER porcelain boxing match, cinematic and highly dynamic. TWO\nwhite porcelain-figurine boxers with glossy glazed ceramic skin and crackle-glaze\ncrazing fight hard inside the submerged ring: the woman in the white one-piece\nwith red-glazed ceramic gloves versus the taller male boxer in dark trunks with\nblue-glazed gloves. Drifting through the teal water all around them are red\npoppies, blue cornflowers, white daisies and floating dandelion seeds carried on\nthe current, mixing with streaming bubbles. FEROCIOUS EXPRESSIVE FACES: her\npainted porcelain face snarls with fierce determination, brow furrowed, teeth\ngritted; his face grimaces with effort and pain as punches land. Fast, powerful,\ndynamic action: she slips a jab and unloads a rapid rising hook, he snaps back,\ncounters with a hard cross, ceramic gloves colliding and exploding clouds of\nbubbles, flower petals and dandelion seeds outward. MULTISHOT with fast hard cuts:\n1) wide shot of the two exchanging a rapid flurry as flowers swirl in the water;\n2) whip-pan low-angle hero shot as her red glove smashes into his guard, petals\nand bubbles bursting; 3) tight slow-motion close-up on a glazed face reacting to\nthe impact, cracks of expression, seeds drifting past. Volumetric god rays, water\ncaustics, floating poppies and dandelion seeds, shadowy crowd behind the ropes,\nfast orbiting handheld camera. Photorealistic render, film grain, explosive fluid\nmotion.", "duration": 8, "ratio": "1:1", "watermark": false, "resolution": "1080p", "image_urls": [ "https://cdn.pika.art/v2/files/agent/7331542d-8aec-4dab-86c7-9bc9bde63d41/gpt-image-1784137365768-0.png", "https://cdn.pika.art/v2/files/agent/590a98be-ef25-4949-96e7-de2968147575/277322654c343500.png" ], "video_urls": [ "https://example.com/reference.mp4" ] }' ``` ### Request body | Param | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `prompt` | string | yes | - | Text prompt describing the video to generate. | | `duration` | enum | yes | - | Video length in seconds (4-15), or 'auto' to let the model choose. | | `ratio` | enum | no | - | Output aspect ratio. | | `generate_audio` | boolean | no | - | Whether to generate audio for the video. | | `watermark` | boolean | no | false | Whether to add a watermark to the output video. | | `image_urls` | string[] | no | - | Up to 9 reference images (referenced in the prompt as @Image1…). | | `video_urls` | string[] | no | - | Up to 3 reference videos (referenced in the prompt as @Video1…). | | `audio_urls` | string[] | no | - | Up to 3 reference audio clips (referenced in the prompt as @Audio1…). | | `resolution` | enum | yes | - | Output resolution. | ### Referencing inputs in the prompt Reference inputs are attached as flat URL arrays and cited positionally inside the `prompt` text: - `image_urls[]` (up to 9) → cite as `@Image1`, `@Image2`, … - `video_urls[]` (up to 3) → cite as `@Video1`, `@Video2`, … - `audio_urls[]` (up to 3) → cite as `@Audio1`, `@Audio2`, … At most 12 files combined across the three arrays. If `audio_urls` is set, include at least one image or video. Example: `prompt` = `@Image1 walking through @Video1's scene` with the matching URLs in `image_urls` and `video_urls`. Returns a job object, not the final output — normally with status `queued`. Store the `id` and poll until a terminal state. A rejected submit (insufficient balance, rate limit, unpriceable input) still returns the job object, with status `failed` and `error` set. An `Idempotency-Key` replay returns the existing job in its current state — including `failed`, so retry a failure with a fresh key, never the same one. ### Response **200 OK · queued** ```json { "id": "media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0", "status": "queued" } ``` ## Poll status `GET /v1/media/jobs/{request_id}` ```bash curl https://api.dev.pika.art/v1/media/jobs/{request_id} \ -H "X-API-Key: YOUR_API_KEY" ``` Poll the job by id until it reaches a terminal state: `completed` or `failed`. ### The job object - `id` (string): Unique identifier for the job. - `status` (enum): One of `queued`, `running`, `completed`, `failed`. - `output` (object): Present once the job completes. - `media_type` (enum): `video`. - `output.video.url` (string): URL of the generated video. - `error` (object): Present if the job failed. `error.code` is the stable machine-readable value to branch on (e.g. `invalid_input`, `content_moderation`, `insufficient_balance`, `rate_limited`, `provider_error`, `timed_out`); `error.message` is diagnostic text and varies. ### Response **200 OK · running** ```json { "id": "media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0", "status": "running" } ``` **200 OK · completed** ```json { "id": "media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0", "status": "completed", "output": { "media_type": "video", "video": { "url": "https://api.dev.pika.art/v1/files/video_8f3a2c91.mp4", "content_type": "video/mp4" } } } ``` **200 OK · failed** ```json { "id": "media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0", "status": "failed", "error": { "code": "provider_error", "message": "upstream generation failed" } } ``` ## Get result `GET /v1/media/jobs/{request_id}/content` ```bash curl https://api.dev.pika.art/v1/media/jobs/{request_id}/content \ -H "X-API-Key: YOUR_API_KEY" ``` Once the job completes, fetch a download URL for the generated media. ### Response **200 OK · content URL** ```json { "url": "https://api.dev.pika.art/v1/files/video_8f3a2c91.mp4" } ``` ## Errors Errors use conventional HTTP status codes and always return JSON, in one of two shapes. Request-level errors (auth, unknown path, schema validation, idempotency conflict) are `{"message": "..."}`. Submit rejections that occur after the job row is created (insufficient balance, rate limit, unpriceable input, dispatch unavailable) return the full failed job envelope — branch on `error.code`, and retry with a fresh `Idempotency-Key`, since a failed job replays on its key. - 401 Unauthorized — The API key is missing or invalid. Body: `{"message":"Invalid API key"}` - 403 Forbidden — An inactive key is rejected with a `{"message"}` body. A submit that the org balance or postpaid cycle limit cannot cover is rejected after the job row exists and returns the failed job envelope. Body: `{"id":"media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0","status":"failed","error":{"code":"insufficient_balance","message":"Insufficient org balance"}}` - 404 Not Found — No job with that id exists in your org, or the media path names an unknown vendor/model/function. Body: `{"message":"media job not found"}` - 409 Conflict — The result was requested before the job completed, or an Idempotency-Key header was reused with a different body. Body: `{"message":"media job is not ready"}` - 422 Unprocessable Entity — The request body failed validation: an invalid enum value, a missing required field, a wrong type, or malformed JSON. The JSON message names the offending field. A schema-valid parameter combination that cannot be priced instead fails after job creation and returns the failed job envelope with error code `invalid_input`. Body: `{"message":"duration: Input should be less than or equal to 15"}` - 429 Too Many Requests — Org limit reached: requests per minute or day, or concurrent jobs. Returned as the failed job envelope; check the Retry-After header and retry with a fresh Idempotency-Key. Body: `{"id":"media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0","status":"failed","error":{"code":"rate_limited","message":"rate limit exceeded: rpm"}}` - 503 Service Unavailable — The model rail or a backend dependency is temporarily unavailable. Returned as the failed job envelope; retry with backoff and a fresh Idempotency-Key. Body: `{"id":"media_8f3a2c91-5b7d-4e0a-9c26-31d4f2a8e6b0","status":"failed","error":{"code":"provider_unavailable","message":"media dispatch unavailable"}}` ## Pricing Video output is metered in tokens, and the token count scales with pixel count — a lower per-token rate at a higher resolution is **not** a lower price. Compare the derived per-second cost, not the rate per 1M tokens. | Tier | $ / 1M tokens | Video tokens / sec | $ / sec | $ / 5s clip | | --- | --- | --- | --- | --- | | 480p · standard · with video input | 4.515 | 10,000 | 0.0452 | 0.23 | | 480p · standard · no video input | 7.35 | 10,000 | 0.0735 | 0.37 | | 720p · standard · with video input | 4.515 | 21,600 | 0.0975 | 0.49 | | 720p · standard · no video input | 7.35 | 21,600 | 0.1588 | 0.79 | | 1080p · standard · with video input | 4.935 | 48,600 | 0.2398 | 1.20 | | 1080p · standard · no video input | 8.085 | 48,600 | 0.3929 | 1.96 | | 4k · standard · with video input | 2.52 | 194,400 | 0.4899 | 2.45 | | 4k · standard · no video input | 4.2 | 194,400 | 0.8165 | 4.08 | The derived columns use each resolution's nominal token rate; billing settles on the token count the model actually reports. Only successful generations are charged. --- Model page: https://dev.pika.art/models/bytedance/seedance-2.0/reference-to-video API index: https://dev.pika.art/llms.txt