Image & video API
Generate images and video through the same unified endpoint using the OpenAI-compatible images format.
Endpoint
Image and video generation share a single endpoint. Send a POST request with your prompt, and the gateway routes to the best available upstream account.
POST https://console.bnrouter.com/v1/images/generationsImage generation
Generate images from a text description. The request follows the OpenAI images/generations format. Supported models include Flux Pro, DALL·E 3, Stable Diffusion 3, and more — all available through the same endpoint.
Set model to any image model ID from the model plaza. The response contains one or more generated image URLs.
curl https://console.bnrouter.com/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-pro",
"prompt": "A serene mountain lake at sunrise, photorealistic",
"n": 1,
"size": "1024x1024"
}'Image edits
Edit an existing image by providing a mask and a new prompt. Send a multipart/form-data request with the image, mask, and prompt fields.
Only models that support inpainting accept edits. Check the model plaza for edit-compatible models.
curl https://console.bnrouter.com/v1/images/edits \
-H "Authorization: Bearer sk-your-api-key" \
-F "image=@./input.png" \
-F "mask=@./mask.png" \
-F "prompt=Replace the background with a futuristic cityscape" \
-F "n=1" \
-F "size=1024x1024"Video generation
Generate short-form video from a text or image prompt. The same endpoint and authentication work for video models. Response times are longer due to the computational cost of video generation.
Video support is expanding rapidly. Check the model plaza for the latest available video models.
curl https://console.bnrouter.com/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cinematic aerial view of a futuristic city at night",
"n": 1,
"size": "1920x1080"
}'Usage & billing
Image and video requests are billed per generation at the rates shown in the model plaza. Image dimensions (size), quality (hd/standard), and the number of images requested affect the token cost.
Usage is tracked in the dashboard alongside text completions, so you have a single view of all gateway activity.
Model wiki pages
- GoogleGemini 4 Argon API
- MetaMuse Wonder API
- OpenMOSSMOSS Image API
- BriaFibo 2.0 API
- Black Forest LabsFLUX 3 Video API
- Black Forest LabsFLUX 3 Image Klein API
- GoogleNano Banana 2.1 API
- AnthropicClaude Haiku 5.5 API
- xAIGrok Imagine Video 1.5 Lite API
- ViduVidu Q4 API
- Alibaba QwenQwen-Image-2.1-Turbo API
- AlibabaWan 3.0 API
- OpenAIGPT Image 2.5 API
- KreaKrea 3 API
- ByteDance SeedSeedance 2.5 API
- Kling AIKling 4.0 API
- IdeogramIdeogram Vector API
- Moonshot / KimiKimi K3.1 Pro API
- DeepSeekDeepSeek V4.1 Flash API
- Zhipu / Z.aiGLM 5.3 Flash API
- InceptionMercury 3 API
- MiniMaxMiniMax M3.1 Flash API
- AnthropicClaude Opus 5.5 API
- AnthropicClaude Sonnet 5.5 API
- Mistral AIMistral Large 4 API
- ByteDance SeedSeedream 5.0 API
- Lightricks / LTXLTX-2.5 API
- MiniMaxMiniMax H3 Max API
- OpenAIGPT-6.1 Terra API
- RecursiveFlint API(Recursive)