CogView-4
CogView-4 costs $0.01 per image on LLM API. It generates images from text.
Pricing
Served by Z.ai, the only provider.
| Image | $0.01/ image | per image |
|---|
Specifications
- ModesGenerate
Call CogView-4
POST /v1/images/generationsSet LLMAPI_KEY to your LLM API key.Generate docs
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.llmapi.ai/v1",
api_key=os.environ["LLMAPI_KEY"],
)
result = client.images.generate(
model="cogview-4",
prompt="A lighthouse at dawn, watercolor",
)
print(result.data[0].url)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.llmapi.ai/v1",
apiKey: process.env.LLMAPI_KEY,
});
const result = await client.images.generate({
model: "cogview-4",
prompt: "A lighthouse at dawn, watercolor",
});
console.log(result.data![0].url);curl https://api.llmapi.ai/v1/images/generations \
-H "Authorization: Bearer $LLMAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cogview-4",
"prompt": "A lighthouse at dawn, watercolor"
}'More from Z.ai
All Z.ai image modelsPrices synced .