Kling Image 4.0
Kling Image 4.0 is Kuaishou’s newest image model: native up to 8K, reference images and reusable elements, coherent image series, and one-shot e-commerce detail pages and web page designs.
Kling Image 4.0 Text to Image API
Result
Results will appear here
Cost: $0.063/image
Kling Image 4.0 API Implementation Guide
Get API Key
Generate your API key from the dashboard and set it as an environment variable.
export MODELHUNTER_KEY="your_api_key"Make Your First Call
Follow the API documentation for complete code examples in cURL, JavaScript, and Python, including request format, polling, and error handling.
View API Documentation →Kling Image 4.0 Key Info
Capabilities
- Text to Image API
- Image to Image API
- Long Image
Pricing
Price per image by resolution
| 2K | 4K | 8K |
|---|---|---|
| $0.063/image | $0.094/image | $0.157/image |
Billed per generated image by resolution, plus $0.003 for every reference image or element.
Output Formats
Kling Image 4.0 API Documentation
Run the playground first, then open the full API docs for integration details.
About
Generate up to 9 images (or a coherent series of up to 10) from text at 2K, 4K or 8K.
Code Examples
1curl -X POST https://api.modelhunter.ai/api/v1/kling/text-to-image \2-H "Authorization: Bearer YOUR_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"model": "kling-4-0/image",6"input": {7"prompt": "A futuristic cityscape at sunset with neon signs",8"resolution": "2K",9"aspect_ratio": "auto"10}11}'
Schema
View Full API DocsInput
modelModel ID for this capability.
Value: kling-4-0/image
promptPrompt
resolutionResolution
Options: 2K, 4K, 8K
Default: 2K
aspect_ratioAspect Ratio
Options: auto, 9:16, 2:3, 3:4, 1:1, 4:3, 3:2, 16:9, 21:9
Default: auto
modeMode
Options: default, series
Default: default
countStandard: 1–9 images. Series: 2–10 images.
Default: 1
Range: 1 to 10
webhookUrlURL to receive a webhook notification when the task completes.
metadataCustom key-value metadata to attach to the task for tracking.
Response (HTTP 202)
successWhether the request was accepted successfully.
data.idUnique task ID. Use this to poll GET /api/v1/tasks/{id} for results.
data.statusTask status: pending, processing, completed, failed.
data.typeGeneration type: text-to-image.
data.providerProvider name: kling.
data.modelModel ID used for generation.
data.created_atISO 8601 timestamp of when the task was created.
data.estimated_secondsEstimated time in seconds until the task completes.