AI GPT ImageAI GPT Image

API Documentation

Use the AIGPTImage API to create image and video generation tasks from your backend.

The API is asynchronous by default. A successful create request returns a taskId; your server then polls the task status endpoint until the result is ready.

What you can do

  • Create image generation tasks.
  • Create video generation tasks.
  • Query task status and final result URLs.
  • Reuse the same credit balance and pricing rules as the web app.

Base URL

https://aigptimage.com

Use https://aigptimage.com as the production API base URL.

Authentication

Create an API key from the API Keys page, then click Create API Key.

Send it with every request:

Authorization: Bearer sk-your-api-key

Core endpoints

EndpointMethodPurpose
/api/v1/jobs/createTaskPOSTCreate an image or video generation task
/api/v1/jobs/recordInfoGETQuery a task by taskId

Supported models

Model IDTypeSceneRequired inputMarket pathDocs
gpt-image-2-text-to-imageimageText to imageprompt/market/gpt/gpt-image-2-text-to-image.mdOpen
gpt-image-2-image-to-imageimageImage to imageprompt, image_urls/market/gpt/gpt-image-2-image-to-image.mdOpen
seedance-2.0-text-to-videovideoText to videoprompt/market/seedance/seedance-2.0-text-to-video.mdOpen
seedance-2.0-image-to-videovideoImage to videoprompt, image_urls/market/seedance/seedance-2.0-image-to-video.mdOpen

Credit consumption rules

Public API calls use the same credit balance and pricing engine as the web app.

Current public models

Public modelMedia typeBilling ruleCurrent credit cost
gpt-image-2-text-to-imageImageFixed credits per output, based on resolution1K = 3 credits, 2K = 5 credits, 4K = 8 credits
gpt-image-2-image-to-imageImageFixed credits per output, based on resolution1K = 3 credits, 2K = 5 credits, 4K = 8 credits
seedance-2.0-text-to-videoVideoCredits per second, based on resolution and duration480p = 20/s, 720p = 40/s, 1080p = 80/s
seedance-2.0-image-to-videoVideoCredits per second, based on resolution and duration480p = 20/s, 720p = 40/s, 1080p = 80/s

GPT Image 2 pricing

GPT Image 2 image generation uses a fixed-per-output pricing rule:

  • 1K: 3 credits per image
  • 2K: 5 credits per image
  • 4K: 8 credits per image

This applies to both:

  • gpt-image-2-text-to-image
  • gpt-image-2-image-to-image

Seedance 2.0 pricing

Seedance 2.0 video generation uses a per-second pricing rule. Total credits depend on:

  • resolution
  • duration
ResolutionCredits per second
480p20
720p40
1080p80

This default mapping currently applies to both:

  • seedance-2.0-text-to-video
  • seedance-2.0-image-to-video

Default calculation examples

  • seedance-2.0-text-to-video, 720p, 5s: 40 x 5 = 200 credits
  • seedance-2.0-image-to-video, 1080p, 5s: 80 x 5 = 400 credits

Important notes

  • API pricing is shared with the web app. There is no separate API-only credit wallet.
  • The final credit cost is calculated when the task is created.
  • If a request is invalid and the task is not created, credits are not consumed.
  • If a task fails after credit reservation, the existing refund logic is applied.

Response format

All public API responses use the same shape:

{
  "code": 200,
  "msg": "success",
  "data": {}
}

Errors use the same format with a non-200 code and HTTP status.

Next step

Start with Getting Started, then integrate Create Task and Query Task.

API Documentation