Setup guide

Provider setup guide

Browse setup steps and troubleshooting by tool.

Provider setup guide/OpenAI Images API Configuration

OpenAI Images API Configuration

Image generation is not the regular chat interface. Even if an AI provider supports the text model, it does not necessarily mean it supports the OpenAI image interface. Check with the provider whether it explicitly mentions 'Images API', 'image generation', or the corresponding model before configuring.

First confirm whether the provider supports the image interface

What to checkHow to viewWhy
Interface typeWhether the backend or documentation explicitly mentions Images API, image generation, image editingOnly writing OpenAI-compatible chat interface does not mean the image interface is also available
Model permissionsWhether the model list includes image models, and whether the account or Key has permissionImage models are often billed separately and activated separately from text models
Request pathWhether the provider has given examples for the image interfaceSome providers only proxy the chat interface; directly requesting the image path will result in 404
PriceImages are billed per piece, size, or qualityTest with a small amount before batch generation to avoid high consumption at once

Differences from chat interface

TypeCommon interfacesPreparation needed
Text chat/v1/chat/completions Or ResponsesKey, Base URL, model name, message content
Image generation/v1/images/generationsKey, image model, prompt, size, output format
Image editingImage editing interfaceIn addition to the prompt, you also need to upload the original image or mask

How to fill in the fields

Configuration itemFilling Method
Endpointhttps://api.openai.com/v1/images/generations
ModelOfficial example available: <code>gpt-image-2</code>; for provider services, fill in according to the provider list
PromptWhat image do you want to generate
SizeImage Size
FormatURL or base64

If using a provider, replace the official domain part with the image API address provided by the provider; if the provider did not specify support for image interface, do not assume it is available. Whether the Base URL includes /v1 Still follow the backend example, do not guess by yourself.

Request example

OpenAI image generation example
curl https://api.openai.com/v1/images/generations \ -H "Authorization: Bearer YOUR_OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "A clean product photo of a white ceramic mug on a solid-color background", "size": "1024x1024" }'
The cost of image interface is usually different from the text interface. Check the price before batch generation.
ErrorCommon CausesSolutions
404 / endpoint not foundThe provider does not have an image proxy interface, or the path has too many/few slashes /v1Go to the backend to find a dedicated image interface example; do not directly use the chat interface
model not foundThe image model name is not in the current provider listCopy the original model ID/model name of the image model, not the text model
unsupported content typeThe image editing interface requires uploading files; you cannot just send JSONFirst confirm whether you are calling the generation interface or the editing interface