OneProvider
Guides

Image generation

Generate and edit images with the OpenAI-compatible Images API: choose a model from the catalog, send one request, read the result and check the exact price.

One workflow for every available image model: choose a model, send a request, read the response, and understand the price.

All models, capabilities, and prices Documentation index for AI agents: https://oneprovider.dev/docs/llms.txt Choose models from the shared catalog This guide does not hardcode a preferred model. Available image models and their current prices always live in the shared model table .

Available image models

gemini-3.1-flash-image Runnable
0.5K
$0.045 / image
1K
$0.067 / image
2K
$0.101 / image
4K
$0.151 / image
gpt-image-2 Runnable
image input
$8.00 / 1M tokens
cached image input
$2.00 / 1M tokens
generated image output
$30.00 / 1M tokens
1024x1024 · 1024x1536 · 1536x1024 · low · medium · high · auto gpt-image-2.5-sunburst Runnable
image input
$8.00 / 1M tokens
cached image input
$2.00 / 1M tokens
generated image output
$30.00 / 1M tokens
low · medium · high · xhigh · max · auto grok-imagine Catalog
per generation request
$0.02 / image
grok-imagine-image-2.0 Runnable
1K
$0.06 / image
2K
$0.08 / image
1K · 2K · low · medium gemini-3-pro-image Catalog
image input
$2.00 / 1M tokens
generated image output
$120.00 / 1M tokens
gemini-3-pro-image-preview Catalog
image input
$2.00 / 1M tokens
generated image output
$120.00 / 1M tokens
gemini-3.1-flash-image-preview Catalog
image input
$0.50 / 1M tokens
generated image output
$60.00 / 1M tokens

Request

POST /v1/images/generations. The path and optional parameters come from the selected model’s verified contract.

bash
curl -sS https://api.oneprovider.dev/v1/images/generations \
-H "Authorization: Bearer $ONEPROVIDER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A quiet observatory above the clouds",
"size": "1024x1024",
"quality": "low"
}'

Capabilities vary by model

Sizes, quality levels, transparency, editing, and response formats are model-specific. Do not copy one model’s optional parameters to another without checking support.

Response

A synchronous transport returns image data or a URL immediately. An asynchronous transport returns a job id; poll its status path, then download from its content path.

Pricing

The shared model table separates every token rate into its own column and shows per-image or other media billing in the media column. Open pricing .

Quick answers

Which base URL do I use?

Claude Code and Anthropic SDKs use https://api.oneprovider.dev. OpenAI SDKs and OpenAI-compatible clients use https://api.oneprovider.dev/v1. One key works behind both; the model list is on the models page ; rates are on the pricing page .

How do I authenticate?

Send the raw sk-… key in x-api-key or Authorization: Bearer: one of them, never both. Keep the key in an environment variable, not in a file that gets committed. More on authentication .

Where do I get a key?

Open your cabinet in the Telegram bot @oneprovider_robot or at app.oneprovider.dev, top up the balance and press “Issue a key”. Each key can carry its own spend limit. Cabinet & API keys .

What do 401, 404 and 429 mean?

401: the key is missing, mistyped or sent in the wrong header; paste the whole key without quotes or spaces. 404: usually a wrong base URL, for example a missing or doubled /v1. 429 with “Insufficient balance”: the cabinet balance or the key’s spend limit is used up, so top up instead of retrying; any other 429 is a rate limit, so wait for Retry-After. Details: error codes and troubleshooting .

Why do streams cut off or reset?

VPN and VLESS proxies often buffer SSE or break HTTP/2 negotiation. OneProvider has no regional restrictions and does not buffer streams, so turn the proxy off and retry.

Where do I ask if this is not enough?

Message @Oneproviderhelpbot on Telegram or open “Support” in the web cabinet, with the HTTP status code and the exact error message. How support works .

Last updated: 2026-10-05 Found a bug? @Oneproviderhelpbot