Skip to main content
POST
Generate or edit an image with AI (chatimg.ai)

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
imageUrl
string
必填

URL of the source image to process. Supports http URLs and base64 encoded images (with or without data:image/... prefix)

Minimum string length: 1
prompt
string

Prompt describing the desired transformation (default: ghibli style)

model
enum<string>
默认值:nanobanana-2-lite

AI model to use (default: nanobanana-2-lite). Pricing per image: openai: 25 credits, gpt-image-2: 50 credits, flux: 12 credits, gemini: 10 credits, nanobanana-pro: 30 credits, nanobanana-2-lite: 12 credits, nanobanana-2: 20 credits, grok: 30 credits, seedream: 15 credits, qwen: 8 credits, z-image-turbo: 5 credits, flux-2-flex: 25 credits

可用选项:
openai,
gpt-image-2,
flux,
gemini,
nanobanana-pro,
nanobanana-2-lite,
nanobanana-2,
grok,
seedream,
qwen,
z-image-turbo,
flux-2-flex

响应

Successful response

taskId
string
必填

Unique identifier for the generation task

status
enum<string>
必填

Initial status of the generation task (pending)

可用选项:
pending,
completed,
error,
unknown
imageUrl
string
必填

The source image URL, used as the key when polling /v1/imageStatus

timestamp
number
必填

Timestamp when the task was created

costCredits
number
必填

Credits charged for this generation

balanceRemaining
number
必填

Remaining credits balance after this charge