REST API v1

API Reference

Integrate Kling3Cheap into your applications. Generate images & videos, check balances, and monitor generation status — all via simple REST endpoints.

Authentication

All API requests must include your API key in the Authorization header as a Bearer token. Generate an API key from your Studio dashboard.

Authorization Header
Authorization: Bearer mcai_your_api_key_here
⚠ Keep your API key secret. Do not expose it in client-side code or public repositories. The full key is shown only once when generated.

Base URL

https://kling3cheap.com/api

All endpoints below are relative to this base URL.

Balance

Check Balance

GET/hp

Returns your current HP (credit) balance, daily check-in status, and streak.

Response

200 OK
{
  "freeHp": 100,
  "paidHp": 50,
  "totalHp": 150,
  "checkedInToday": true,
  "streak": 5
}
ParameterTypeRequiredDescription
freeHpnumberOptionalFree HP credits available
paidHpnumberOptionalPaid HP credits available
totalHpnumberOptionalTotal HP (freeHp + paidHp)
checkedInTodaybooleanOptionalWhether the daily check-in has been claimed today
streaknumberOptionalCurrent consecutive check-in streak (days)

Images

Generate Image

POST/generate/image

Submit a new image generation request. HP is deducted immediately and the request enters the processing queue. Parameters differ per model — see each model section below.

Common Parameters (all models)

ParameterTypeRequiredDescription
modelIdstringRequired"nano-banana-pro", "nano-banana-2", "byteplus-seedream-4.5", "kling-3-omni"
speedstringRequired"slow" (0.5× cost), "normal" (1× cost), "priority" (2× cost)
nano-banana-proNano Banana Pro
ParameterTypeRequiredDescription
promptstringRequiredText prompt describing the desired image
resolutionstringRequired"1K", "2K", or "4K"
aspectRatiostringOptional"16:9", "9:16", "1:1", "2:3", "3:2", "3:4", or "4:3" (default: "1:1")
imageCountnumberOptionalNumber of images to generate (default: 1)
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
visualRefsarrayOptionalReference images for guided generation: [{ id, label, name, imageUrl, url, type }]
nano-banana-2Nano Banana 2
ParameterTypeRequiredDescription
promptstringRequiredText prompt describing the desired image
resolutionstringRequired"1K", "2K", or "4K"
aspectRatiostringOptional"16:9", "9:16", "1:1", "2:3", "3:2", "3:4", or "4:3" (default: "1:1")
imageCountnumberOptionalNumber of images to generate (default: 1)
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
visualRefsarrayOptionalReference images for guided generation: [{ id, label, name, imageUrl, url, type }]
byteplus-seedream-4.5Byteplus Seedream 4.5
ParameterTypeRequiredDescription
promptstringRequiredText prompt describing the desired image
resolutionstringRequired"1K", "2K", or "4K"
aspectRatiostringOptional"16:9", "9:16", "1:1", "2:3", "3:2", "3:4", or "4:3" (default: "1:1")
imageCountnumberOptionalNumber of images to generate (default: 1)
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
visualRefsarrayOptionalReference images for guided generation: [{ id, label, name, imageUrl, url, type }]
kling-3-omniKling 3 Omni
ParameterTypeRequiredDescription
promptstringRequiredText prompt describing the desired image
resolutionstringRequired"1k", "2k", or "4k" (lowercase)
aspectRatiostringOptional"16:9", "9:16", "1:1", "2:3", "3:2", "3:4", or "4:3" (default: "1:1")
imageCountnumberOptionalNumber of images to generate (default: 1)
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
visualRefsarrayOptionalReference images for guided generation: [{ id, label, name, imageUrl, url, type }]
⚠ Note: Resolution values are lowercase for this model — use "1k", "2k", "4k".

Example Request

curl
curl -X POST https://kling3cheap.com/api/generate/image \
  -H "Authorization: Bearer mcai_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cyberpunk cityscape at sunset",
    "modelId": "nano-banana-pro",
    "resolution": "2K",
    "speed": "normal",
    "aspectRatio": "16:9",
    "imageCount": 2
  }'

Response

200 OK
{
  "requestId": 42,
  "hpCost": 8,
  "hpBalance": {
    "freeHp": 92,
    "paidHp": 50,
    "totalHp": 142
  }
}

HP Cost Formula: baseCost × resolutionMultiplier × speedMultiplier × imageCount

Concurrent Limit: Max 4 pending/processing image requests at a time.

List Image Generations

GET/generations

Retrieve a paginated list of your image generation requests. Use this to check status and results.

Query Parameters

ParameterTypeRequiredDescription
limitnumberOptionalNumber of results (default: 50, max: 100)
offsetnumberOptionalNumber of results to skip (default: 0)
sortstringOptional"recent" (default) or "oldest"

Example Request

curl
curl "https://kling3cheap.com/api/generations?limit=10&sort=recent" \
  -H "Authorization: Bearer mcai_your_key"

Response

200 OK
{
  "generations": [
    {
      "id": 42,
      "modelId": "nano-banana-pro",
      "prompt": "A cyberpunk cityscape at sunset",
      "aspectRatio": "16:9",
      "resolution": "2K",
      "imageCount": 2,
      "speed": "normal",
      "autoEnhance": false,
      "hpCost": 8,
      "status": "success",
      "resultImages": [
        { "url": "https://...", "thumbnailUrl": "https://..." }
      ],
      "errorMessage": null,
      "createdAt": "2026-03-10T03:00:00.000Z"
    }
  ],
  "total": 1
}

Status Values

pending
processing
success
failed

Get Image Generation by ID

GET/generations/:id

Retrieve a single image generation request by its ID. Returns the full generation object including status, results, and metadata.

Path Parameters

ParameterTypeRequiredDescription
idnumberRequiredThe generation request ID (returned from the generate endpoint)

Example Request

curl
curl "https://kling3cheap.com/api/generations/42" \
  -H "Authorization: Bearer mcai_your_key"

Response

200 OK
{
  "id": 42,
  "modelId": "nano-banana-pro",
  "prompt": "A cyberpunk cityscape at sunset",
  "aspectRatio": "16:9",
  "resolution": "2K",
  "imageCount": 2,
  "speed": "normal",
  "autoEnhance": false,
  "hpCost": 8,
  "status": "success",
  "resultImages": [
    { "url": "https://...", "thumbnailUrl": "https://..." },
    { "url": "https://...", "thumbnailUrl": "https://..." }
  ],
  "errorMessage": null,
  "isFavorite": false,
  "createdAt": "2026-03-10T03:00:00.000Z"
}
404 Not Found
{
  "error": "Not found"
}

Videos

Generate Video

POST/generate/video

Submit a new video generation request. HP is deducted immediately and the request enters the processing queue. Parameters differ per model — see each model section below.

Common Parameters (all models)

ParameterTypeRequiredDescription
modelIdstringRequired"kling-3", "kling-2.6", "veo-3.1", "byte-plus-seedance-1-5"
speedstringRequired"slow" (0.5× cost), "normal" (1× cost), "priority" (2× cost)
kling-3Kling 3
ParameterTypeRequiredDescription
promptstringRequiredText prompt (required unless startFrame or endFrame is provided)
resolutionstringRequired"std(720p)" or "pro(1080p)"
durationnumberRequiredDuration in seconds (3–15)
aspectRatiostringOptional"16:9", "9:16", or "1:1" (default: "16:9")
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
generateAudiobooleanOptionalGenerate sound for the video (default: false, 1.5× cost)
multiShotbooleanOptionalEnable multi-shot mode (default: false)
startFrameobject | nullOptionalStart keyframe image: { id, label, url, type }
endFrameobject | nullOptionalEnd keyframe image: { id, label, url, type }
kling-2.6Kling 2.6
ParameterTypeRequiredDescription
promptstringRequiredText prompt (required unless startFrame or endFrame is provided)
resolutionstringRequired"std(720p)" or "pro(1080p)"
durationnumberRequiredDuration in seconds — 5 or 10
aspectRatiostringOptional"16:9", "9:16", or "1:1" (default: "16:9")
autoEnhancebooleanOptionalAuto-enhance the prompt (default: false)
generateAudiobooleanOptionalGenerate sound (default: false, 1.5× cost). Mutually exclusive with endFrame.
startFrameobject | nullOptionalStart keyframe image: { id, label, url, type }
endFrameobject | nullOptionalEnd keyframe image: { id, label, url, type }. Mutually exclusive with generateAudio.
ℹ️ Note: End frame and audio generation are mutually exclusive. If endFrame is provided, audio will not be generated, and vice versa.
veo-3.1Veo 3.1
ParameterTypeRequiredDescription
promptstringRequiredText prompt describing the desired video
resolutionstringRequired"720p", "1080p", or "4K"
durationnumberRequiredDuration in seconds — 4, 6, or 8
aspectRatiostringOptional"16:9" or "9:16" (default: "16:9")
generateAudiobooleanOptionalGenerate audio for the video (default: false, 1.5× cost)
startFrameobject | nullOptionalStart keyframe image: { id, label, url, type }
endFrameobject | nullOptionalEnd keyframe image: { id, label, url, type }
byte-plus-seedance-1-5Seedance 1.5
ParameterTypeRequiredDescription
promptstringRequiredText prompt (required unless startFrame or endFrame is provided)
resolutionstringRequired"720p" or "1080p"
durationnumberRequiredDuration in seconds (4–12)
aspectRatiostringOptional"16:9", "9:16", "1:1", or "21:9" (default: "16:9")
generateAudiobooleanOptionalGenerate sound for the video (default: false, 1.5× cost)
startFrameobject | nullOptionalStart keyframe image: { id, label, url, type }
endFrameobject | nullOptionalEnd keyframe image: { id, label, url, type }

Example Request

curl
curl -X POST https://kling3cheap.com/api/generate/video \
  -H "Authorization: Bearer mcai_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A drone shot flying over a mountain valley",
    "modelId": "kling-3",
    "resolution": "pro(1080p)",
    "duration": 5,
    "speed": "normal",
    "generateAudio": true
  }'

Response

200 OK
{
  "requestId": 18,
  "hpCost": 56,
  "hpBalance": {
    "freeHp": 44,
    "paidHp": 50,
    "totalHp": 94
  }
}

HP Cost Formula: baseCost × duration × resolutionMultiplier × speedMultiplier × audioMultiplier

Concurrent Limit: Max 2 pending/processing video requests at a time.

Generate Motion Control Video

POST/generate/motion-control

Generate a video by applying motion from a reference video to a character image.

Request Body

ParameterTypeRequiredDescription
characterUrlstringRequiredURL of the character image to animate
referenceUrlstringRequiredURL of the motion reference video
videoModestringRequired"std" (720p) or "pro" (1080p)
speedstringRequired"slow", "normal", or "priority"
durationnumberRequiredDuration in seconds (1–30)
promptstringOptionalOptional text prompt for guidance
keepOriginalSoundbooleanOptionalKeep reference audio (default: true)

Example Request

curl
curl -X POST https://kling3cheap.com/api/generate/motion-control \
  -H "Authorization: Bearer mcai_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "characterUrl": "https://example.com/character.png",
    "referenceUrl": "https://example.com/dance_ref.mp4",
    "videoMode": "pro",
    "speed": "normal",
    "duration": 10
  }'

Response

200 OK
{
  "requestId": 19,
  "hpCost": 150,
  "hpBalance": {
    "freeHp": 0,
    "paidHp": 0,
    "totalHp": 0
  }
}

List Video Generations

GET/video-generations

Retrieve a paginated list of your video generation requests (including motion control). Use this to check status and get result URLs.

Query Parameters

ParameterTypeRequiredDescription
limitnumberOptionalNumber of results (default: 50, max: 100)
offsetnumberOptionalNumber of results to skip (default: 0)
sortstringOptional"recent" (default) or "oldest"

Example Request

curl
curl "https://kling3cheap.com/api/video-generations?limit=5" \
  -H "Authorization: Bearer mcai_your_key"

Response

200 OK
{
  "generations": [
    {
      "id": 18,
      "modelId": "kling-3",
      "prompt": "A drone shot flying over a mountain valley",
      "aspectRatio": "16:9",
      "resolution": "pro(1080p)",
      "duration": 5,
      "speed": "normal",
      "generateAudio": true,
      "multiShot": false,
      "startFrame": null,
      "endFrame": null,
      "hpCost": 56,
      "status": "success",
      "resultVideoUrl": "https://...",
      "thumbnailUrl": "https://...",
      "errorMessage": null,
      "createdAt": "2026-03-10T03:00:00.000Z"
    }
  ],
  "total": 1
}

Status Values

pending
processing
success
failed

Get Video Generation by ID

GET/video-generations/:id

Retrieve a single video generation request by its ID. Returns the full generation object including status, result URL, and metadata.

Path Parameters

ParameterTypeRequiredDescription
idnumberRequiredThe video generation request ID (returned from the generate endpoint)

Example Request

curl
curl "https://kling3cheap.com/api/video-generations/18" \
  -H "Authorization: Bearer mcai_your_key"

Response

200 OK
{
  "id": 18,
  "modelId": "kling-3",
  "prompt": "A drone shot flying over a mountain valley",
  "aspectRatio": "16:9",
  "resolution": "pro(1080p)",
  "duration": 5,
  "speed": "normal",
  "generateAudio": true,
  "multiShot": false,
  "startFrame": null,
  "endFrame": null,
  "hpCost": 56,
  "status": "processing",
  "resultVideoUrl": null,
  "thumbnailUrl": null,
  "errorMessage": null,
  "isFavorite": false,
  "createdAt": "2026-03-10T03:00:00.000Z"
}
404 Not Found
{
  "error": "Not found"
}

Uploads

Upload Image

POST/upload/image

Upload an image file. The uploaded image URL can be used as a visual reference for image generation, or as a start/end frame for video generation.

Request Body (multipart/form-data)

ParameterTypeRequiredDescription
fileFileRequiredImage file to upload (JPEG, PNG, WebP)

Example Request

curl
curl -X POST https://kling3cheap.com/api/upload/image \
  -H "Authorization: Bearer mcai_your_key" \
  -F "file=@photo.jpg"

Response

200 OK
{
  "id": 7,
  "imageUrl": "https://kling3cheap.com/media/uploads/abc123_raw.jpg",
  "width": 1920,
  "height": 1080
}
ParameterTypeRequiredDescription
idnumberOptionalUpload record ID
imageUrlstringOptionalProcessed image URL (use this for generation requests)
widthnumberOptionalImage width in pixels
heightnumberOptionalImage height in pixels

Upload Video

POST/upload/video

Upload a video file. The returned CDN URL can be used as a motion reference for motion control video generation.

Request Body (multipart/form-data)

ParameterTypeRequiredDescription
fileFileRequiredVideo file to upload (MP4)

Example Request

curl
curl -X POST https://kling3cheap.com/api/upload/video \
  -H "Authorization: Bearer mcai_your_key" \
  -F "file=@dance.mp4"

Response

200 OK
{
  "cdnUrl": "https://media.kling3cheap.com/video/action-video/xyz789.mp4"
}
ParameterTypeRequiredDescription
cdnUrlstringOptionalCDN URL of the uploaded video (use this as referenceUrl in motion control)

List Uploaded Images

GET/upload/image/list

Retrieve a paginated list of your previously uploaded images.

Query Parameters

ParameterTypeRequiredDescription
limitnumberOptionalNumber of results (default: 20, max: 100)
offsetnumberOptionalNumber of results to skip (default: 0)

Example Request

curl
curl "https://kling3cheap.com/api/upload/image/list?limit=10" \
  -H "Authorization: Bearer mcai_your_key"

Response

200 OK
{
  "images": [
    {
      "id": 7,
      "imageUrl": "https://media.kling3cheap.com/uploads/abc123_raw.jpg",
      "width": 1920,
      "height": 1080,
      "createdAt": "2026-03-10T03:00:00.000Z"
    }
  ],
  "total": 1
}

Rate Limits

To ensure fair usage and system stability, each account has default concurrent generation limits. These limits apply to the number of pending or processing requests at any given time.

ResourceDefault LimitDescription
Image Generation4 concurrentMax 4 pending/processing image generation requests at a time
Video Generation2 concurrentMax 2 pending/processing video generation requests at a time (includes motion control)

If you exceed the concurrent limit, the API will return a 429 Too Many Requests error. Wait for existing requests to complete before submitting new ones.

🚀 Need higher limits? If your use case requires more concurrent generations, reach out to discuss raising your account limits.

Errors

All errors follow a consistent JSON format with an error field.

Error Response
{
  "error": "Description of what went wrong"
}
StatusMeaningCommon Causes
400Bad RequestMissing or invalid fields (prompt, modelId, speed, etc.)
401UnauthorizedMissing or invalid API key / session
402Payment RequiredInsufficient HP for the requested generation
404Not FoundGeneration request not found or not owned by you
429Too Many RequestsConcurrent generation limit reached (4 images / 2 videos)
500Internal ErrorUnexpected server error

Insufficient HP Response (402)

402 Payment Required
{
  "error": "Insufficient HP",
  "required": 56,
  "available": 20
}

Visit the Studio to manage your API keys.