# gpt-image-2 through RelayDance vs OpenAI direct: when an API gateway makes sense If you already generate images with gpt-image-2, you probably call OpenAI directly. That is the simplest setup, and often the right one. API gateways like [RelayDance](https://relaydance.com) offer a different trade-off: one OpenAI-compatible endpoint, different billing rules, and access to models OpenAI doesn't serve, mainly ByteDance's Seedance video family. This article covers what changes when you route gpt-image-2 through a gateway, what stays the same, and when the switch is worth it. --- ## What a gateway actually is A gateway sits between your code and the model providers. You send requests to the gateway using a familiar protocol. It forwards them to the right backend, handles billing, and returns the result. RelayDance uses the OpenAI protocol. According to the official relaydance.com/docs, you should "Set base_url to https://relaydance.com/v1 and keep your OpenAI SDK". For most codebases, the migration is two lines: python from openai import OpenAI client = OpenAI( api_key="YOUR_RELAYDANCE_API_KEY", # create at https://relaydance.com/console base_url="https://relaydance.com/v1", ) result = client.images.generate( model="gpt-image-2", prompt="A product shot of a ceramic coffee mug on a walnut desk, soft morning light", ) Under the hood, this calls `POST /v1/images/generations` with `Authorization: Bearer YOUR_API_KEY`. That is the same shape as OpenAI's own images endpoint. --- ## The billing difference for gpt-image-2 Pricing is the main reason to compare the two options. According to the [RelayDance models page](https://relaydance.com/models), gpt-image-2 on RelayDance is billed like this: - **Image output is free. Only input is billed.** - **Image-to-image starts from about CNY 0.035** per request. - **4K and 1K output cost the same.** The last point matters most for high-resolution work. With per-output or per-resolution pricing, larger images usually cost more. If your pipeline produces 4K assets for print, e-commerce zoom views, or upscaled hero images, flat output pricing can change your unit economics a lot. A caveat: this article doesn't quote OpenAI's direct gpt-image-2 rates, because they change and you should compare against live numbers. Before you decide, put OpenAI's current pricing page next to [relaydance.com/models](https://relaydance.com/models) and run your real request mix through both. Look at your resolution distribution and your image-to-image vs text-to-image ratio. ### Failed requests The second billing difference is failure handling. According to the official relaydance.com docs, "Failed or errored requests are never billed." For image generation this is a small but real saving, since moderation rejections, timeouts, and malformed inputs happen at scale. For video generation, covered below, a failed render costs far more, so the policy matters more. --- ## Where the gateway pays off beyond images: Seedance video The strongest case for RelayDance isn't gpt-image-2 alone. It's gpt-image-2 plus video under one key. RelayDance serves ByteDance Seedance 2.0 and Seedance 1.5 Pro, HappyHorse video models, and Grok Imagine video and image models, plus Grok text models. You reach all of them through the same OpenAI-compatible base URL. Normally, direct Seedance access goes through BytePlus and requires an enterprise account and KYC. RelayDance removes that step. You pay as you go with USDT or a Stripe card. Current per-second rates from [relaydance.com/models](https://relaydance.com/models): | Model | Resolution | Approx. price | |---|---|---| | Seedance Fast | — | ~$0.152 / second | | Seedance 2.0 | 720p | ~$0.190 / second | | Seedance 2.0 | 1080p | ~$0.470 / second | | Seedance 2.5 (`doubao-seedance-2-5-1080p`, added 2026-10-10) | 1080p | ~$0.711 / second | | Seedance native 4K | 4K | ~$4.90 per 5-second clip | A common workflow: 1. Generate a keyframe or product image with gpt-image-2. 2. Pass it as a reference image to Seedance and animate it. python import requests, time headers = {"Authorization": "Bearer YOUR_RELAYDANCE_API_KEY"} task = requests.post( "https://relaydance.com/v1/video/generations", headers=headers, json={ "model": "doubao-seedance-2-5-1080p", "prompt": "Slow dolly-in on the mug from @image1, steam rising, warm light", "seconds": 5, "metadata": { "ratio": "16:9", "resolution": "1080p", "generate_audio": False, "content": [ {"type": "image_url", "image_url": {"url": "https://your-cdn.example/mug.png"}} ], }, }, ).json() task_id = task["id"] while True: status = requests.get( f"https://relaydance.com/v1/video/generations/{task_id}", headers=headers ).json() if status["status"] in ("succeeded", "failed"): break time.sleep(5) print(status) # on success, the result contains the video url A few details from the [docs](https://relaydance.com/docs): - Reference media go in `metadata.content[]`. You cite them in the prompt as `@image1` through `@imageN`. - Each request can take up to **9 reference images, 3 reference videos, and 3 audio tracks**. - Clips can run up to **15 seconds**. - If you'd rather not poll, set `metadata.callback_url`. RelayDance will POST the final task state to your server. Here the no-charge-on-failure policy has real value. A 15-second Seedance 2.5 clip at ~$0.711/second costs about $10.67. Not paying for failed renders makes iteration much cheaper. --- ## When to stay with OpenAI direct A gateway isn't always the right call. Stay direct if: - **You use only gpt-image-2 and your volume is modest.** One less vendor means one less dependency. - **You need contract terms with the model provider itself.** That includes enterprise agreements, specific data-processing addenda, or compliance requirements tied to OpenAI as the processor of record. - **You depend on the newest OpenAI-specific features on day one.** Gateways can lag behind provider releases. - **Latency budgets are extremely tight.** Any extra hop adds some overhead, so measure it for your region. ## When the gateway makes sense Route through RelayDance if: - **Your output skews high-resolution.** Flat 1K/4K pricing and free output change the math. - **You do a lot of image-to-image work.** Starting from about CNY 0.035 per request is cheap for iterative edits. - **You also need video.** One key and one SDK cover gpt-image-2, Seedance, HappyHorse, and Grok Imagine, without a BytePlus enterprise account or KYC. - **Failures are expensive in your pipeline.** Errored requests are never billed. - **You need crypto or simple card payments.** USDT and Stripe are both supported. --- ## A practical migration path 1. Create a key at [relaydance.com/console](https://relaydance.com/console). 2. Point a staging client at `https://relaydance.com/v1` with your existing OpenAI SDK. 3. Replay a representative day of gpt-image-2 traffic. Compare output quality, latency, and cost against OpenAI direct. 4. If the numbers work, put a config flag on `base_url` so you can switch back instantly. 5. Add Seedance video calls once your image path is stable. For anything here that may change, especially per-model rates, check the live pages: [relaydance.com/models](https://relaydance.com/models) for pricing and [relaydance.com/docs](https://relaydance.com/docs) for API details.
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