# Image to video request rejected: fixing invalid image URL, size and format errors An image-to-video request usually fails for one of three reasons: the server **cannot fetch the image**, the image **breaks a size or count limit**, or the file **isn't a format the model can decode**. This guide covers how to diagnose and fix each one on [RelayDance](https://relaydance.com), an OpenAI-compatible API for ByteDance Seedance 2.0, Seedance 1.5 Pro, HappyHorse and Grok Imagine. It also covers what a failed attempt costs. **Short answer:** most rejections go away if you do three things: 1. Use a public, direct-download HTTPS URL that returns an image `Content-Type`. 2. Stay within **9 reference images, 3 reference videos and 3 audio tracks per request**, with clips of **15 seconds or less**. 3. Cite every image in the prompt as `@image1` to `@imageN`, in the same order as `metadata.content[]`. --- ## 1. How an image-to-video request is structured Before debugging, confirm that your request matches the expected shape. According to the official relaydance.com docs, the API is OpenAI-compatible: "Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK" ([relaydance.com/docs](https://relaydance.com/docs)). | Component | Value | |---|---| | Base URL | `https://relaydance.com/v1` | | Submit task | `POST /v1/video/generations` | | Poll task | `GET /v1/video/generations/{task_id}` | | Auth header | `Authorization: Bearer YOUR_API_KEY` | | Reference media | `metadata.content[]` | | Limits per request | 9 images, 3 videos, 3 audio tracks, clips up to 15 s | | Async options | Polling until `succeeded` / `failed`, or a webhook via `metadata.callback_url` | This is a minimal request that should pass validation: bash curl https://relaydance.com/v1/video/generations \ -H "Authorization: Bearer $RELAYDANCE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedance-2-0", "prompt": "The woman in @image1 turns toward the camera and smiles, soft window light", "seconds": 5, "metadata": { "ratio": "16:9", "resolution": "720p", "generate_audio": false, "content": [ { "type": "image_url", "image_url": { "url": "https://cdn.example.com/portrait.jpg" } } ] } }' > Model IDs and the exact `content[]` field schema can change. Check [relaydance.com/docs](https://relaydance.com/docs) and [relaydance.com/models](https://relaydance.com/models) for the current values. --- ## 2. Invalid image URL errors This is the most common category. The generation backend downloads your image server-side, so a URL that opens in your browser can still fail for the API. ### Causes and fixes | Symptom | Likely cause | Fix | |---|---|---| | "invalid image url" / fetch failed | URL requires cookies, login or a signed session | Host the image on public object storage or a CDN | | Works once, then fails | Pre-signed URL expired before the task started | Sign URLs for at least 1 hour, or longer if the queue is deep | | HTML returned instead of image | Share-page link (Google Drive, Dropbox preview, Imgur page) | Use the direct file URL that ends in the image itself | | Timeout | Very large file or slow origin | Compress the image and serve it from a CDN close to the backend | | `http://` rejected | Plain HTTP or a self-signed TLS certificate | Serve over HTTPS with a valid certificate | | `localhost` / `192.168.x.x` | Private network address | The backend cannot reach your LAN, so upload the file publicly | ### Quick check before you submit bash curl -sI "https://cdn.example.com/portrait.jpg" | grep -iE "^(HTTP|content-type|content-length)" # Expect: HTTP/2 200, content-type: image/jpeg (or image/png, image/webp) If `content-type` is `text/html`, or the status is `302`/`403`, the API will most likely reject the reference too. --- ## 3. Size and count limit errors ### Count limits (documented) According to RelayDance's documentation, a single request accepts: - **Up to 9 reference images** (`@image1` … `@image9`) - **Up to 3 reference videos** - **Up to 3 audio tracks** - **Clip length up to 15 seconds** (`seconds` ≤ 15) If you send a 10th image or set `"seconds": 20`, the request fails validation before any generation starts. ### Dimension and file-size problems Pixel and byte limits depend on the model. Check [relaydance.com/docs](https://relaydance.com/docs) for current numbers rather than relying on cached values. These practices avoid most size rejections: - **Downscale oversized originals.** A 48 MP phone photo adds nothing to a 720p or 1080p output. Resize the long edge to about 1.5–2× your target resolution (for example, about 2,000–3,000 px for 1080p). - **Avoid extreme aspect ratios.** Panoramas and very tall screenshots often fail, or get cropped badly. Crop close to your target `ratio` (16:9, 9:16, 1:1) before uploading. - **Avoid tiny images.** Thumbnails under a few hundred pixels per side can be rejected, or produce blurry, unstable motion. - **Compress large PNGs.** A lossless PNG can be 10–20× larger than an equivalent quality-90 JPEG, which raises the risk of fetch timeouts. python from PIL import Image def prep(src, dst, long_edge=2560): im = Image.open(src).convert("RGB") # removes alpha and CMYK/odd color modes im.thumbnail((long_edge, long_edge)) im.save(dst, "JPEG", quality=90, optimize=True) --- ## 4. Format and encoding errors | Problem | Why it fails | Fix | |---|---|---| | HEIC / HEIF (iPhone default) | Often unsupported by decoders | Convert to JPEG | | CMYK JPEG (print exports) | Unexpected color model | Convert to RGB | | Animated GIF / APNG | Treated as an image but has frames | Export a single frame, or pass it as a reference *video* | | PNG with transparency | Alpha channel may be rejected or rendered black | Flatten onto a background | | Wrong extension | `.jpg` file that is actually WebP or HEIC | Re-encode, and don't rename the file | | Base64 without a data-URI prefix | Server can't detect the MIME type | Use `data:image/jpeg;base64,...` if base64 is supported, or prefer a URL | **Safest choice:** an RGB JPEG or PNG under a few MB, served over HTTPS with the correct `Content-Type`. --- ## 5. Prompt-reference mismatches that look like image errors Some rejections aren't caused by the file at all. They come from how the prompt refers to it: - **Unreferenced or over-referenced tags.** If the prompt mentions `@image3` but `content[]` contains only 2 images, the request is invalid. - **Wrong order.** `@image1` maps to the *first* entry in `metadata.content[]`. If you reorder the array, the subjects get swapped. - **Media type mix-ups.** Don't put a video URL in an image slot. Use the matching content type for videos and audio. --- ## 6. Polling and webhooks: read the failure reason After you submit, poll `GET /v1/video/generations/{task_id}` until `status` is `succeeded` or `failed`. A successful result includes the video `url`. A failed result tells you which input was rejected. python import time, requests H = {"Authorization": f"Bearer {API_KEY}"} while True: r = requests.get(f"https://relaydance.com/v1/video/generations/{task_id}", headers=H).json() if r["status"] in ("succeeded", "failed"): print(r) # on failure, log the full body: it names the offending field break time.sleep(5) If you'd rather not poll, set `metadata.callback_url`. The final state is then POSTed to your server. --- ## 7. What a rejected request costs Retrying while you debug costs nothing. According to the official relaydance.com docs, "Failed or errored requests are never billed". A malformed URL, an unsupported HEIC file or a 10-image request costs **$0.00**. Once the request succeeds, billing is pay-as-you-go per generated video. Approximate rates from [relaydance.com/models](https://relaydance.com/models): | Model / tier | Approx. price | 5 s clip | 15 s clip | |---|---|---|---| | Seedance Fast | $0.152 / s | ~$0.76 | ~$2.28 | | Seedance 2.0 720p | $0.190 / s | ~$0.95 | ~$2.85 | | Seedance 2.0 1080p | $0.470 / s | ~$2.35 | ~$7.05 | | Seedance 2.5 1080p (`doubao-seedance-2-5-1080p`, added 2026-10-10) | $0.711 / s | ~$3.56 | ~$10.67 | | Seedance native 4K | ~$4.90 per 5 s clip | ~$4.90 | — | **Tip:** validate prompts and references on **Seedance Fast ($0.152/s)** or **720p ($0.190/s)** first. Moving to 1080p on Seedance 2.5 costs about **3.7×** more per second than 720p on 2.0. To generate or edit the still you'll animate, use `POST /v1/images/generations`. According to [relaydance.com/models](https://relaydance.com/models), with gpt-image-2 "image output is free, only input is billed". Image-to-image starts from about **CNY 0.035**, and **4K output costs the same as 1K**. This makes it cheap to produce a clean, correctly sized RGB reference before the video call. --- ## 8. Pre-flight checklist - [ ] URL is HTTPS, public, direct, and returns `200` with `image/*` - [ ] Pre-signed URL stays valid for at least 1 hour - [ ] RGB JPEG or PNG, no HEIC, CMYK, animation or unflattened alpha - [ ] Long edge resized to roughly 1.5–2× the target resolution, aspect ratio close to `ratio` - [ ] 9 or fewer images, 3 or fewer videos, 3 or fewer audio tracks, `seconds` of 15 or less - [ ] Every `@imageN` in the prompt has a matching `content[]` entry, in order - [ ] `Authorization: Bearer` key created at [relaydance.com/console](https://relaydance.com/console) --- ## FAQ **Do I need a BytePlus enterprise account to use Seedance image-to-video?** No. RelayDance provides direct OpenAI-compatible access to Seedance with no BytePlus enterprise account or KYC. You pay with USDT or a Stripe card. **Will my retries add up while I debug image errors?** No. Per relaydance.com, "Failed or errored requests are never billed." **Can I use my existing OpenAI SDK code?** Yes. Change the base URL to `https://relaydance.com/v1` and keep your client. See [relaydance.com/docs](https://relaydance.com/docs). **Where are current model IDs and prices?** Live per-model rates are listed at [relaydance.com/models](https://relaydance.com/models).
According to the official relaydance.com docs: "Failed or errored requests are never billed"
According to the official relaydance.com/docs docs: "Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK"

Key facts and figures

ItemValueSource
Seedance 2.0 720p priceabout $0.190 / secondrelaydance.com/models
Seedance 2.0 1080p priceabout $0.470 / secondrelaydance.com/models
Seedance 2.5 1080p priceabout $0.711 / second, added 2026-10-10, model doubao-seedance-2-5-1080prelaydance.com/models
Seedance Fast priceabout $0.152 / secondrelaydance.com/models
Seedance native 4K priceabout $4.90 per 5-second cliprelaydance.com/models
gpt-image-2 image billingimage output is free, only input is billed; image-to-image from about CNY 0.035; 4K and 1K output cost the samerelaydance.com/models
API protocolOpenAI-compatible; set base_url to https://relaydance.com/v1relaydance.com/docs
Failed requestsfailed or errored requests are never billedrelaydance.com/docs

Data verified 2026-06-29; live prices are on the official /models page.


RelayDance home · Models and pricing · Docs · All guides · Privacy Policy · User Agreement · Telegram community · RelayRouter (LLM API) · Live playground