Qiklab API Documentation
Use the Qiklab REST API to generate AI images and videos programmatically.
Authentication
All API requests require an API key. Generate one from your account settings. Requires a minimum balance of $9.99.
Include your API key in the Authorization header:
Authorization: Bearer qkapi_{replace-with-your-api-key-here}Base URL
https://www.qiklab.com/api/v1Rate Limits
5 requests per second per API key. Exceeding this returns 429 Too Many Requests.
Endpoints
/api/v1/meGet your profile and balance.
Example Request
curl https://www.qiklab.com/api/v1/me \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}"Response
{
"username": "johndoe",
"email": "john@example.com",
"bio": "AI enthusiast",
"location": "San Francisco, CA",
"balance_cents": 999,
"balance_dollars": "9.99",
"created_at": "2026-03-15T12:00:00+00:00"
}/api/v1/generateStart a generation job.
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | Yes | t2i, i2i, t2v, i2v, t2i_pro, t2v_pro, i2v_pro, i2i_pro, i2i_pro_plus |
| positive_prompt | string | Yes | What to generate (max 1500 chars) |
| negative_prompt | string | No | What to avoid (max 1500 chars, not used for t2i, t2i_pro, or i2i_pro) |
| resolution | string | No | i2i/i2i_pro: 1k, 2k, 4k. t2i_pro: 2k or 4k. Video: 720p, 1080p. Not used for t2i. |
| orientation | string | No | square, horizontal, vertical (i2i). horizontal, vertical for t2v. Not used for t2i or t2i_pro. |
| aspect_ratio | string | No | t2i/t2i_pro: 1:1, 2:3, 3:2, 9:16, 16:9. i2i_pro/i2i_pro_plus: 1:1, 3:4, 4:3, 9:16, 16:9. t2v_pro: 1:1, 3:4, 4:3, 9:16, 16:9. Default: 1:1 |
| duration | integer | No | Video duration in seconds: 5, 10, 15 (default: 5) |
| image | string | No | Base64-encoded image (required for i2i, i2v, i2v_pro) |
| images | string[] | No | Array of image URLs or base64 strings, 1-12 (required for i2i_pro). Max 5 MB per image. |
Example Request (t2i)
Text-to-Image generates 4 images per request. The status response will include a result_urls array with all 4 image URLs.
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "t2i",
"positive_prompt": "A beautiful sunset over the ocean",
"aspect_ratio": "3:2"
}'Example Request (i2i)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2i",
"positive_prompt": "Oil painting style, warm sunset tones",
"negative_prompt": "blurry, low quality",
"resolution": "1k",
"orientation": "square",
"image": "data:image/png;base64,iVBORw0KGgo..."
}'Example Request (t2i_pro)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "t2i_pro",
"positive_prompt": "A photorealistic portrait, studio lighting",
"resolution": "2k",
"aspect_ratio": "2:3"
}'Example Request (t2v)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "t2v",
"positive_prompt": "A drone shot flying over a mountain range",
"negative_prompt": "static, jittery, low resolution",
"resolution": "720p",
"orientation": "horizontal",
"duration": 5
}'Example Request (t2v_pro)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "t2v_pro",
"positive_prompt": "Cinematic slow-motion waves crashing on rocks",
"negative_prompt": "static, low quality",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}'Example Request (i2v)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2v",
"positive_prompt": "A bird takes flight from the branch",
"negative_prompt": "static, jittery",
"resolution": "720p",
"duration": 5,
"image": "data:image/png;base64,iVBORw0KGgo..."
}'Example Request (i2v_pro)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2v_pro",
"positive_prompt": "Camera slowly zooms in, cinematic motion",
"negative_prompt": "static, low resolution",
"resolution": "720p",
"duration": 5,
"image": "data:image/png;base64,iVBORw0KGgo..."
}'Example Request (i2i_pro with URLs)
The images field accepts URLs or base64 strings (with or without data:image/png;base64, prefix). Base64 images are automatically uploaded and converted server-side.
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2i_pro",
"positive_prompt": "Recreate me perfectly in this pose",
"resolution": "1k",
"aspect_ratio": "3:4",
"images": [
"https://your-storage.com/photo1.jpg",
"https://your-storage.com/photo2.jpg"
]
}'Example Request (i2i_pro with base64)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2i_pro",
"positive_prompt": "Recreate me perfectly in this pose",
"resolution": "1k",
"aspect_ratio": "3:4",
"images": [
"data:image/png;base64,iVBORw0KGgo...",
"/9j/4AAQSkZJRg..."
]
}'Both data:image/...;base64, prefixed and raw base64 strings are accepted. You can also mix URLs and base64 in the same request.
Example Request (i2i_pro_plus)
Pro+ variant uses a higher-quality model. Same parameters as i2i_pro but with mode: "i2i_pro_plus". Pricing: 1K = $0.20, 2K = $0.25, 4K = $0.30.
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2i_pro_plus",
"positive_prompt": "Recreate me perfectly in this pose",
"resolution": "2k",
"aspect_ratio": "3:4",
"images": [
"https://your-storage.com/photo1.jpg",
"https://your-storage.com/photo2.jpg"
]
}'Example Request (i2i_pro_plus with base64)
curl -X POST https://www.qiklab.com/api/v1/generate \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}" \
-H "Content-Type: application/json" \
-d '{
"mode": "i2i_pro_plus",
"positive_prompt": "Recreate me perfectly in this pose",
"resolution": "2k",
"aspect_ratio": "3:4",
"images": [
"data:image/png;base64,iVBORw0KGgo...",
"/9j/4AAQSkZJRg..."
]
}'Both data:image/...;base64, prefixed and raw base64 strings are accepted. You can also mix URLs and base64 in the same request.
Response
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"gateway_job_id": "sync-abc123",
"status": "QUEUED",
"mode": "t2i"
}/api/v1/status/{job_id}Check the status of a generation job.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| job_id | string | Yes | The job_id returned from /generate |
Example Request
curl https://www.qiklab.com/api/v1/status/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}"Response (in progress)
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "IN_PROGRESS"
}Response (processing)
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PROCESSING"
}PROCESSING means the generation is done but the result is being prepared. Continue polling.
Response (completed)
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "COMPLETED",
"result_url": "https://..."
}The result_url is a time-limited signed URL. Download the file promptly.
Response (failed)
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "FAILED",
"error": "Generation failed"
}/api/v1/balanceCheck your current account balance.
Example Request
curl https://www.qiklab.com/api/v1/balance \
-H "Authorization: Bearer qkapi_{replace-with-your-api-key-here}"Response
{
"balance_cents": 999,
"balance_dollars": "9.99"
}Pricing
Each generation deducts from your wallet balance. Prices vary by mode, resolution, and duration.
| Mode | Starting Price |
|---|---|
| t2i (1k) | $0.05 |
| i2i (1k) | $0.05 |
| t2i_pro (2k) | $0.10 |
| i2i_pro (1k) | $0.15 |
| i2i_pro_plus (1k) | $0.20 |
| t2v / i2v (720p/5s) | $0.75 |
| t2v_pro / i2v_pro (720p/5s) | $0.99 |
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad request (invalid parameters) |
| 401 | Invalid or missing API key |
| 402 | Insufficient balance |
| 403 | Account banned |
| 404 | Job not found |
| 429 | Rate limit exceeded (5 req/s) |
| 502 | Generation service error |