Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Use CometAPI image model docs by choosing the request format that matches your workflow. OpenAI-compatible image endpoints cover common generation and editing flows; provider-specific pages cover task-based image systems.

Choose an image API

GoalStart here
Generate images with an OpenAI-compatible requestImage Generations
Edit images with an OpenAI-compatible requestImage Editing
Generate or edit images with Gemini formatGemini Image Generation
Submit and poll Midjourney tasksMidjourney API Quick Start
Generate Flux imagesFlux Generate Image
Use Bria image toolsGenerate Image

List available image models

The model catalog helps you choose an available image model ID:
curl https://api.cometapi.com/api/models
The response includes model records that you can compare with the model directory:
{
  "success": true,
  "page": 0,
  "page_size": 0,
  "total": 301,
  "data": [
    {
      "id": "gpt-image-2",
      "provider": "OpenAI",
      "model_type": "image",
      "features": [
        "text-to-image"
      ],
      "pricing": {
        "currency": "USD / M Tokens",
        "input": 4,
        "output": 24,
        "per_request": null,
        "per_second": null
      },
      "api_doc_url": "https://apidoc.cometapi.com/api/image/openai/images"
    }
  ]
}

Generate an image

The following example sends an OpenAI-compatible image generation request:
curl https://api.cometapi.com/v1/images/generations \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A clean product photo of a glass teapot on a white table",
    "size": "1024x1024"
  }'
The response returns generated image data for this model:
{
  "created": 1779872000,
  "data": [
    {
      "b64_json": "iVBORw0KGgo..."
    }
  ],
  "usage": {
    "input_tokens": 19,
    "output_tokens": 196,
    "total_tokens": 215
  }
}

Common errors

ErrorFix
Invalid model IDChoose an image-capable model from the Models page.
Unsupported sizeUse a size that the selected image endpoint accepts.
Expired result URLDownload generated assets before provider links expire.
413Use image URLs or smaller files instead of large base64 payloads.
Last updated: May 27, 2026