🧠
CogView 4 API
activeCogView 4 — Zhipu AI's text-to-image model. Ultra-affordable at just 4 credits per image with standard and HD quality options.
Zhipu AI / WaveSpeedimage4 credits/call
Provider
Zhipu AI / WaveSpeed
Pricing
~$0.008 per image (4 credits)
Speed
3–8 seconds
Output
image
Quick Start
Send a request to the CogView 4 API:
bash
curl -X POST https://apiin.one/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cogview-4",
"prompt": "A futuristic robot assistant helping in a modern kitchen, clean design",
"size": "1024*1024",
"quality": "hd"
}'API Endpoint
POST
/api/v1/images/generationsSend a POST request with your API key to generate content using CogView 4.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Required | Bearer YOUR_API_KEY |
Content-Type | string | Required | application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Model identifier: "cogview-4" |
prompt | string | Required | Text description of the image (max 1000 chars) |
size | string | Optional | Image size: "1024*1024", "768*1344", "864*1152", etc. (Default: 1024*1024) |
quality | string | Optional | Quality: "standard" or "hd" (Default: hd) |
Example Request
json
{
"model": "cogview-4",
"prompt": "A futuristic robot assistant helping in a modern kitchen, clean design",
"size": "1024*1024",
"quality": "hd"
}Example Response
Successful task creation response.
{
"code": 200,
"message": "success",
"data": {
"task_id": "n48xxxx_cv4",
"status": "IN_PROGRESS"
}
}Check Task Status
For asynchronous tasks, poll the status endpoint to check when your task is complete:
GET
/api/v1/tasks/{task_id}Returns the current status of a generation task. Poll until status is 'completed' or 'failed'.
bash
curl https://apiin.one/api/v1/tasks/task_abc123 \
-H "Authorization: Bearer aio_your_key"Use Cases
- ✓High-volume image generation at minimal cost
- ✓Generate concept art and creative visuals
- ✓Build affordable AI image features into apps
- ✓Batch generate marketing visuals
API Tester
Test the CogView 4 API directly from your browser:
API PlaygroundPOST
Error Codes
{
"error": {
"code": 400,
"message": "Invalid parameters",
"type": "invalid_request"
}
}Frequently Asked Questions
How much does CogView 4 cost?
Only 4 credits per image (~$0.008), making it one of the most affordable image models available.
What sizes are supported?
Supported sizes: 1024*1024, 768*1344, 864*1152, 1344*768, 1152*864, 1440*720, 720*1440.
What quality options are available?
Two quality modes: "standard" and "hd" (high definition).
Why Use CogView 4 Through API in One?
1Ultra-affordable at 4 credits per image
2Multiple image size options
3HD quality mode available
4Great for high-volume generation
Ready to use CogView 4?
Get Your API Key →