API Documentation
Compatible with OpenAI & Anthropic SDKs — integrate in 5 minutes.
Full Documentation Site
More complete integration guides, model references and best practices live on the standalone docs site.
Base URL
https://your-domain.comOpenAI Authentication
Authorization: Bearer sk-xxxAnthropic Authentication
x-api-key: sk-xxxQuick Start
Get started with Zivv API in 3 simple steps.
Register & Get API Key
Sign up at the console, go to API Keys page, and create a new key starting with sk-.
Set Base URL
Point your OpenAI SDK base_url to https://zivv.pro/v1, or set ANTHROPIC_BASE_URL=https://zivv.pro for Claude Code.
Start Calling
Use your existing code — just swap the base URL and API key. All OpenAI and Anthropic SDK features are supported.
API Endpoints
Zivv API supports both OpenAI and Anthropic protocol formats.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat Completions (OpenAI format, streaming supported) |
| POST | /v1/messages | Messages (Anthropic format, streaming supported) |
| POST | /v1/responses | Responses (OpenAI Responses API, for Codex CLI) |
| POST | /v1/images/generations | Image Generation (supports streaming SSE output) |
| POST | /v1/gemini/{model}:{method} | Gemini native protocol passthrough (generateContent / streamGenerateContent) |
| GET | /v1/models | List available models |
Code Examples
Drop-in replacement — just change your base URL.
curl https://your-domain.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [{"role": "user", "content": "Hello!"}]
}'Client Configuration
Step-by-step guides for popular AI tools and SDKs.
Set environment variables and launch Claude Code. No extra configuration needed.
export ANTHROPIC_BASE_URL=https://your-domain.com
export ANTHROPIC_API_KEY=sk-your-key
claudeRequest Parameters
Supported parameters by protocol. Select a protocol to see its parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID, e.g. claude-sonnet-4-6 |
| messages | array | Yes | Array of message objects with role and content |
| stream | boolean | No | Enable streaming output, default false |
| temperature | number | No | Sampling temperature, 0-2 |
| top_p | number | No | Nucleus sampling parameter |
| max_tokens | number | No | Maximum output tokens |
| max_completion_tokens | number | No | Alternative to max_tokens, same behavior |
| tools | array | No | Function tool definitions for tool use |
| tool_choice | string|object | No | Tool selection strategy: auto / required / none / specific tool |
Image Generation
Use the Images API with gpt-image-2 to generate images, with streaming SSE support.
Code Examples
curl https://your-domain.com/v1/images/generations \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A cute cat wearing sunglasses on a beach",
"stream": true,
"size": "1024x1024",
"quality": "high"
}'SSE Streaming Response Format
With stream enabled, the server returns generation progress and the final image (base64) via SSE chunks.
event: progress
data: {"type":"progress","progress":25}
event: progress
data: {"type":"progress","progress":50}
event: progress
data: {"type":"progress","progress":75}
event: result
data: {"type":"result","index":0,"b64_json":"iVBORw0KGgo..."}
event: done
data: [DONE]Responses API
The OpenAI Responses API (/v1/responses) is the native interface for newer models like gpt-5.5, supporting vision and image generation.
Vision & Image Generation
The Responses API supports both image input (vision) and image generation (via the image_generation tool).
# Vision: send image to gpt-5.5
curl https://your-domain.com/v1/responses \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": [
{
"role": "user",
"content": [
{ "type": "input_text", "text": "What is in this image?" },
{ "type": "input_image", "image_url": "https://example.com/photo.jpg" }
]
}
]
}'
# Image generation via Responses API
curl https://your-domain.com/v1/responses \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "Generate an image of a sunset over mountains",
"tools": [{ "type": "image_generation" }]
}'chat/completions vs responses
| chat/completions | responses | |
|---|---|---|
| Request field | messages | input |
| Image type | image_url | input_image |
| Image URL format | {url: "..."} | "..." |
| Image generation | ❌ | image_generation tool |
| Response structure | choices[].message | output[] |
| Multi-turn | ❌ | previous_response_id |
Ready to Get Started?
Create an account and get your API key in seconds.