Quick Start
Set up authentication, submit your first task and retrieve its result.
Base URL
All API requests are made over HTTPS against:
https://api.chatartpro.comEvery endpoint is served under the /v1/ prefix. Status endpoints use GET; creation endpoints use POST with a JSON body.
The examples below use CHATART_API_BASE_URL for this base URL.
Prepare your account
Send Authorization: Bearer YOUR_API_KEY. Create a key in API Keys after signing in with a ChatArt account. New keys are stored encrypted and can be revealed in API Keys; authentication uses their hashes. Older hash-only keys cannot be revealed. Deleting a key revokes it immediately. Keys and tasks are isolated by account and application.
Common headers
| Header | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR_API_KEY | Required | Required for model, generation, status and balance requests. |
| Content-Type | application/json | Required | Required for POST requests. |
Check models
curl "$CHATART_API_BASE_URL/v1/models" -H "Authorization: Bearer $CHATART_API_KEY"Create an image
curl "$CHATART_API_BASE_URL/v1/images" \
-H "Authorization: Bearer $CHATART_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gpt_type": "gpt-image-2.6-flare", "description": "A quiet ocean at sunrise", "picture_scale": "1:1", "picture_counts": 1, "image_definition": 1, "quality": "low"}'{
"code": 200,
"message": "success",
"data": {
"task_id": "task_example",
"status": "processing"
}
}Poll the task
curl "$CHATART_API_BASE_URL/v1/tasks/task_example" -H "Authorization: Bearer $CHATART_API_KEY"Handle uncertain requests
Each successful POST creates a new task and reserve API credits. Idempotency keys are not implemented. Do not automatically retry after a timeout or an uncertain submission. Check the portal Logs and ChatArt generation history first. Interrupted submissions appear as submission_unknown; they are never automatically submitted again.
Response envelope
| Field | Type | Description |
|---|---|---|
| code | integer | 200 on success; other codes describe errors. |
| message | string | Human-readable success or error message. |
| data | object | null | Endpoint payload on success; null on errors. |