Choose an image API
Create an image
Generate images with an OpenAI-compatible request.
Create image edit
Edit images with an OpenAI-compatible request.
Generate images with Gemini
Generate or edit images with Gemini format.
Start with Midjourney API
Submit and poll Midjourney image tasks.
Generate a Flux image
Generate Flux images through CometAPI.
Generate a Bria image
Use Bria image generation tools.
Create a Replicate prediction
Run Replicate-format image prediction requests.
Create Seedream images
Create Seedream image generation requests.
Generate an image
Use an image-capable model ID from the Models page or the model directory. The examples below call the OpenAI-compatible Create an image endpoint.These examples use the placeholder
your-image-model-id. Replace it with an available image model ID from the Models page or model directory before you run the request.Response example
A successful response can look like this. Depending on the selected model, each item can contain a base64 image or a result URL:Example model records
This example model catalog response shows the
/api/models envelope and one image model record shape. It is not a complete model list.cURL
Common errors
Invalid model ID
Invalid model ID
Choose an image-capable model from the Models page.
Unsupported size
Unsupported size
Use a size that the selected image endpoint accepts.
Expired result URL
Expired result URL
Download generated assets before provider links expire.
Upload too large
Upload too large
Use image URLs or smaller files instead of large base64 payloads.
Missing image data
Missing image data
Check both
b64_json and url fields because output shape can differ by model.Error codes and retry strategy
400
400
Do not retry until the prompt, size, or image input is fixed.
401
401
Do not retry until the API key is present and valid.
404
404
Check the base URL, path, and model ID before retrying.
413
413
Reduce upload size before retrying.
429
429
Retry with exponential backoff and reduce concurrency.
500 or 503
500 or 503
Retry with backoff for transient provider or service errors.
Pricing and model directory
Models page
Read how CometAPI exposes model IDs in the docs.
Model directory
Browse model availability and capabilities.
Pricing
Check pricing before you call a model.