🧠

CogView 4 API

active

CogView 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
1curl -X POST https://apiin.one/api/v1/images/generations \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "cogview-4",
6 "prompt": "A futuristic robot assistant helping in a modern kitchen, clean design",
7 "size": "1024*1024",
8 "quality": "hd"
9}'

API Endpoint

POST/api/v1/images/generations

Send a POST request with your API key to generate content using CogView 4.

Headers

Body ParametersJSON
Authorization:string

Bearer YOUR_API_KEY

Content-Type:string

application/json

Body Parameters

Body ParametersJSON
model:string

Model identifier: cogview-4

prompt:string

Text description of the image (max 1000 chars)

size:optional string

Image size: 1024*1024, 768*1344, 864*1152, etc. Defaults to 1024*1024.

quality:optional string

Quality: standard or hd Defaults to hd.

Example Request

json
1{
2 "model": "cogview-4",
3 "prompt": "A futuristic robot assistant helping in a modern kitchen, clean design",
4 "size": "1024*1024",
5 "quality": "hd"
6}

Example Response

Successful task creation response.

1{
2 "code": 200,
3 "message": "success",
4 "data": {
5 "task_id": "n48xxxx_cv4",
6 "status": "IN_PROGRESS"
7 }
8}

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
1curl https://apiin.one/api/v1/tasks/task_abc123 \
2 -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:

Consola de APIPOST

Error Codes

1{
2 "error": {
3 "code": 400,
4 "message": "Invalid parameters",
5 "type": "invalid_request"
6 }
7}

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?

1.Ultra-affordable at 4 credits per image
2.Multiple image size options
3.HD quality mode available
4.Great for high-volume generation

Ready to use CogView 4?

Get Your API Key →