API Documentation
All 288 models are available through one Bearer-token endpoint. The API is compatible with kie.ai paths — existing code keeps working if you change the host.
Authentication
Every call requires a Bearer token from your dashboard.
Authorization: Bearer sk-aig-YOUR_KEY
Base URL
All endpoints are served from https://aimarcusimage.eu/api/v1/
Image generation (Flux, Nano Banana, 4o Image)
curl https://aimarcusimage.eu/api/v1/flux/kontext/generate \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox sitting in snow, golden hour",
"model": "flux-kontext-pro",
"aspectRatio": "16:9",
"outputFormat": "png"
}'
# Response: { "code": 200, "data": { "taskId": "..." } }
# Then poll the status endpoint (see Task status).
Video generation (Veo, Runway, Seedance)
curl https://aimarcusimage.eu/api/v1/veo/generate \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "A golden retriever running through autumn leaves",
"model": "veo3_fast",
"aspectRatio": "16:9"
}'
Music generation (Suno)
curl https://aimarcusimage.eu/api/v1/generate \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "upbeat synthwave, driving bass, retro vibes",
"customMode": false,
"instrumental": false,
"model": "V4_5"
}'
Chat completions
curl https://aimarcusimage.eu/api/v1/chat/completions \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Write a haiku about APIs."}]
}'
Task status
Long-running tasks (video, music, image) return a taskId. Poll the status endpoint every 2-3 seconds until the result is ready.
curl https://aimarcusimage.eu/api/v1/veo/record-info?taskId=YOUR_TASK_ID \ -H "Authorization: Bearer sk-aig-..."
Credits & billing
Each call consumes credits based on the model's price. The charged amount is returned in the X-AI-Credits-Charged response header and the remaining balance in X-AI-Credits-Balance. Chat models are billed per input/output token.
Error codes
| Code | Meaning |
|---|---|
| 401 missing_api_key | No Bearer token in Authorization header. |
| 401 invalid_api_key | The key was revoked or doesn't exist. |
| 402 insufficient_credits | Not enough credits to complete the call. Top up. |
| 429 rate_limited | Too many requests (limit: 20 / 10 seconds per key). |
| 502 upstream_error | Provider returned an error. Check logs in dashboard. |
Rate limits
20 new generation requests per 10 seconds per API key. Polling task status does not count against the limit.