LogoZenn.ceo/
PanelChatDocsCuentaClaves APIFacturaciónTransaccionesSeguridadAcerca de y PolíticasContáctenos
Documentation

API Reference & Setup

One API key for Claude Code, OpenCode, OpenClaw, Codex CLI, Gemini CLI, Cursor, and direct API access. Up to 40% off official pricing.

Table of Contents
1. Getting Started2. Claude Code3. OpenCode4. OpenClaw5. Codex CLI6. Gemini CLI7. Cursor IDE8. Direct API Usage9. Models & Pricing10. Authentication11. Rate Limits & Errors12. Tiers13. Audio (Fish Audio)

1. Getting Started

Zenn.ceo is a drop-in API proxy for Anthropic, OpenAI, and Google AI models. You use a single ck_-prefixed API key across all supported tools and SDKs. No code changes required — just set the base URL and API key.

1. Get an API Key

Top up credits, then create a key from your dashboard.

2. Set Base URL

Point your tool to https://zenn.ceo/api/v1

3. Start Coding

Works instantly with Claude Code, OpenCode, OpenClaw, and more.

Base URLs

ProviderBase URL
Claude (Anthropic)https://zenn.ceo/api/v1
Codex (OpenAI)https://zenn.ceo/api/v1/codex
Gemini (Google)https://zenn.ceo/api/v1/gemini

2. Claude Code

Anthropic's official CLI for Claude. Set two environment variables and it works as a drop-in replacement — same CLI, same models, up to 30% cheaper.

Step 1: Set environment variables

Add to your shell profile (~/.zshrc or ~/.bashrc):

shell
export ANTHROPIC_BASE_URL=https://zenn.ceo/api/v1
export ANTHROPIC_API_KEY=ck_YOUR_API_KEY

Step 2: Restart terminal & run

terminal
# Default model (Sonnet 4.5)
claude

# Use Opus 4.6
claude --model claude-opus-4-6

How it works

Claude Code sends the API key via the x-api-key header (Anthropic SDK native behavior) and appends /messages to the base URL automatically. The anthropic-version and anthropic-beta headers are forwarded to the upstream API.

3. OpenCode

Multi-provider AI coding agent. Configure once — access Claude, Codex, and Gemini models through one JSON config.

Step 1: Install

terminal
npm i -g opencode-ai

Step 2: Create config

Create or edit ~/.config/opencode/opencode.json:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://zenn.ceo/api/v1",
        "apiKey": "ck_YOUR_API_KEY"
      },
      "models": {
        "claude-sonnet-4-6": { "name": "Claude Sonnet 4.5" },
        "claude-opus-4-6": { "name": "Claude Opus 4.6" }
      }
    },
    "zenn-codex": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Zenn Codex",
      "options": {
        "baseURL": "https://zenn.ceo/api/v1/codex",
        "apiKey": "ck_YOUR_API_KEY"
      },
      "models": {
        "gpt-5.3-codex": { "name": "GPT-5.3 Codex" }
      }
    },
    "zenn-gemini": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Zenn Gemini",
      "options": {
        "baseURL": "https://zenn.ceo/api/v1/gemini",
        "apiKey": "ck_YOUR_API_KEY"
      },
      "models": {
        "gemini-3-pro-preview": { "name": "Gemini 3.0 Pro" },
        "gemini-3-flash-preview": { "name": "Gemini 3.0 Flash" }
      }
    }
  }
}

Step 3: Start coding

terminal
cd your-project
opencode

# Switch models with /model

How it works

OpenCode sends the API key via the Authorization: Bearer header. The anthropic provider uses the native Anthropic SDK format, while zenn-codex and zenn-gemini use the OpenAI-compatible provider adapter.

4. OpenClaw

Open-source autonomous AI coding agent. Configure Zenn as a custom provider for Claude, Codex, and Gemini access through one config file.

Step 1: Install

terminal
curl -fsSL https://openclaw.ai/install.sh | bash

Step 2: Configure providers

Create or edit ~/.openclaw/openclaw.json:

openclaw.json
{
  "models": {
    "providers": {
      "zenn-claude": {
        "baseUrl": "https://zenn.ceo/api/v1",
        "apiKey": "ck_YOUR_API_KEY",
        "api": "anthropic-messages",
        "models": [
          { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.5" },
          { "id": "claude-opus-4-6", "name": "Claude Opus 4.6" }
        ]
      },
      "zenn-codex": {
        "baseUrl": "https://zenn.ceo/api/v1/codex",
        "apiKey": "ck_YOUR_API_KEY",
        "api": "openai-responses",
        "models": [
          { "id": "gpt-5.3-codex", "name": "GPT-5.3 Codex" }
        ]
      },
      "zenn-gemini": {
        "baseUrl": "https://zenn.ceo/api/v1/gemini",
        "apiKey": "ck_YOUR_API_KEY",
        "api": "openai-completions",
        "models": [
          { "id": "gemini-3-pro-preview", "name": "Gemini 3.0 Pro" },
          { "id": "gemini-3-flash-preview", "name": "Gemini 3.0 Flash" }
        ]
      }
    }
  }
}

Step 3: Start coding

terminal
cd your-project
openclaw

API format reference

Providerapi valueDescription
Claudeanthropic-messagesAnthropic Messages API format
Codexopenai-responsesOpenAI Responses API format
Geminiopenai-completionsOpenAI Chat Completions format

5. Codex CLI

OpenAI's Codex CLI for GPT-5.x code generation, routed through Zenn.ceo at 40% off.

Set environment variables

shell
export OPENAI_BASE_URL=https://zenn.ceo/api/v1/codex
export OPENAI_API_KEY=ck_YOUR_API_KEY

Run

terminal
codex --model gpt-5.3-codex "refactor this function"

6. Gemini CLI

Google's Gemini CLI with full streaming support, routed through Zenn.ceo at 40% off.

Set environment variables

shell
export GEMINI_API_BASE_URL=https://zenn.ceo/api/v1/gemini
export GEMINI_API_KEY=ck_YOUR_API_KEY

Run

terminal
gemini --model gemini-3-pro-preview "explain this code"

7. Cursor IDE

Use Claude models in Cursor IDE via Zenn.ceo.

Configure in Cursor Settings

Go to Cursor Settings → Models → Anthropic

Anthropic API Key

ck_YOUR_API_KEY

Override Anthropic Base URL

https://zenn.ceo/api/v1

Available models

Select claude-sonnet-4-6, claude-haiku-4-5, or claude-opus-4-6 in the model picker.

8. Direct API Usage

The Zenn.ceo API is fully compatible with the Anthropic Messages API. Use it directly with cURL, the Anthropic SDK (Node.js/Python), or any HTTP client.

cURL

bash
curl -X POST https://zenn.ceo/api/v1/messages \
  -H "Authorization: Bearer ck_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Hello, Claude!"}
    ]
  }'

Node.js / TypeScript

typescript
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: 'ck_YOUR_API_KEY',
  baseURL: 'https://zenn.ceo/api/v1',
});

const message = await client.messages.create({
  model: 'claude-sonnet-4-6',
  max_tokens: 1024,
  messages: [
    { role: 'user', content: 'Hello, Claude!' }
  ],
});

Python

python
import anthropic

client = anthropic.Anthropic(
    api_key="ck_YOUR_API_KEY",
    base_url="https://zenn.ceo/api/v1",
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello, Claude!"}
    ],
)

9. Models & Pricing

All pricing is credit-based (100 credits = $1.00 USD). Prices shown are per million tokens (MTok). Anthropic & OpenAI models are up to 40% off official pricing.

Claude (Anthropic) — up to 40% off

Model IDInput / MTokOutput / MTokSavingsTier
claude-sonnet-4-6$1.80$9.0040% offStarter
claude-haiku-4-5$0.60$3.0040% offStarter
claude-opus-4-6$3.00$15.0040% offOpus

OpenAI / GPT — up to 40% off

Model IDInput / MTokOutput / MTokSavingsTier
gpt-5$0.76$6.00~40% offStarter
gpt-5.1$0.76$6.00~40% offStarter
gpt-5.2$1.06$8.4015-40% offStarter
gpt-5-codex$0.76$6.00~40% offStarter
gpt-5-codex-mini$0.14$1.20~40% offStarter
gpt-5.1-codex$0.76$6.00~40% offStarter
gpt-5.1-codex-mini$0.14$1.20~40% offStarter
gpt-5.1-codex-max$0.76$6.00~40% offStarter
gpt-5.2-codex$1.06$8.4015-40% offStarter
gpt-5.3-codex$1.06$8.4015-40% offStarter
gpt-5.3-codex-spark$1.06$8.4015-40% offStarter

Gemini (Google) — competitive pricing

Model IDInput / MTokOutput / MTokSavingsTier
gemini-3-pro-official$1.76$10.5612% offStarter
gemini-3-pro-preview-official$1.76$10.5612% offStarter
gemini-3-flash-official$0.44$2.6412% offStarter
gemini-3-flash-preview-official$0.44$2.6412% offStarter
gemini-3.1-pro$0.05$0.30NominalStarter
gemini-3.1-pro-preview-official$1.76$10.5612% offStarter
gemini-3.1-fast$0.55$3.30Low costStarter
gemini-3.1-thinking$0.55$3.30Low costStarter
gemini-3.1-flash-lite-preview-official$0.22$1.32Low costStarter
gemini-2.5-pro-official$1.10$8.8012% offStarter
gemini-2.5-flash-official$0.26$2.20Low costStarter
gemini-2.5-flash-lite-official$0.09$0.35Ultra lowStarter
gemini-2.0-flash-official$0.13$0.53Ultra lowStarter
gemini-2.0-flash-lite-official$0.07$0.26Ultra lowStarter

Other Models (DeepSeek, Qwen, GLM, Kimi, MiniMax)

Model IDProviderInput / MTokOutput / MTokTier
deepseek-v3.2DeepSeek$0.44$1.76Starter
glm-5Zhipu$0.44$1.98Starter
qwen3.5-plusAlibaba$0.44$2.64Starter
qwen3.5-flashAlibaba$0.13$1.32Starter
qwen3-maxAlibaba$0.77$3.08Starter
kimi-k2.5Moonshot$0.44$2.31Starter
MiniMax-M2.5MiniMax$0.23$0.92Starter

Free / Promotional

Model IDInput / MTokOutput / MTokTier
nano-banana-2$0.05$0.30Starter

10. Authentication

All API keys use the ck_ prefix. The proxy accepts multiple authentication header formats:

HeaderFormatUsed By
x-api-keyck_...Claude Code, Anthropic SDK
AuthorizationBearer ck_...OpenCode, OpenAI SDK, cURL
anthropic-api-keyck_...Alternative Anthropic header
x-goog-api-keyck_...Gemini CLI compatibility

Forwarded headers

The proxy forwards anthropic-version (defaults to 2023-06-01) and anthropic-beta headers to the upstream Anthropic API. Streaming is fully supported via Server-Sent Events (SSE).

11. Rate Limits & Errors

Rate limits

Requests per hour

1,000

Minimum credit balance

200 credits ($2.00)

Streaming timeout

300s (5 min)

Rate limit info is returned in response headers: x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset.

Error responses

All errors return JSON:

json
{
  "error": {
    "type": "error_type",
    "message": "Human-readable description"
  }
}
StatusTypeCause
400invalid_request_errorMissing required parameters
401authentication_errorInvalid or missing API key
402insufficient_creditsCredit balance below $2.00
403access_deniedModel not available at your tier
429rate_limit_errorRate limit exceeded (1,000/hr)

12. Tiers

Tiers are determined by cumulative top-up amount. Higher tiers unlock additional models.

Starter
$19.99+ cumulative top-up

Unlocks:

  • Claude Sonnet 4.5
  • GPT-5.2 / GPT-5.3 Codex
  • Gemini 3.0 Pro & Flash
  • API key creation
Opus
$99.99+ cumulative top-up

Everything in Starter, plus:

  • Claude Opus 4.6
  • Priority queue

13. Audio Generation (Fish Audio)

Text-to-speech, voice cloning, and speech recognition powered by Fish Audio. Requires Starter tier ($19.99+).

Endpoint

POST https://zenn.ceo/api/v1/audio/generations
GET  https://zenn.ceo/api/v1/audio/generations   (list models)

Available Models

Model IDTypeCreditsPriceRequired Input
audio-ttsText to Speech2$0.020text
audio-cloneVoice Clone2$0.020text + audio
audio-asrSpeech Recognition1$0.010audio

Text to Speech

cURL
curl -X POST https://zenn.ceo/api/v1/audio/generations \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "audio-tts",
    "text": "Hello, welcome to Zenn!",
    "format": "mp3"
  }'

Optional parameters: format (mp3, wav, opus), temperature, reference_id (existing voice model ID).

Voice Clone

cURL
curl -X POST https://zenn.ceo/api/v1/audio/generations \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "audio-clone",
    "text": "Say this in the cloned voice",
    "audio": "https://example.com/reference-voice.mp3"
  }'

The audio field is a URL to the reference voice sample for zero-shot cloning.

Speech Recognition (ASR)

cURL
curl -X POST https://zenn.ceo/api/v1/audio/generations \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "audio-asr",
    "audio": "https://example.com/speech.mp3",
    "language": "en"
  }'

Response Format

TTS / Voice Clone returns an audio URL:

TTS Response
{
  "model": "audio-tts",
  "created": 1709654321,
  "data": [{ "url": "https://storage.zenn.ceo/generated/audio/..." }]
}

ASR returns transcribed text:

ASR Response
{
  "model": "audio-asr",
  "created": 1709654321,
  "text": "Hello, welcome to Zenn!",
  "duration": 2.5
}

Ready to start?

One key works across Claude Code, OpenCode, OpenClaw, Codex CLI, Gemini CLI, and Cursor. Top up credits and create your API key.

Get CreditsManage API Keys
Logo
Zenn.ceoInteligencia de Frontera para Todos
XX (Twitter)GitHubLinkedInEmail
Product
  • Chat
  • API
  • Pricing
Empresa
  • About
  • Contacto
  • Política de cookies
  • Política de privacidad
  • Términos de servicio
  • Política de reembolso
Todos los sistemas normales
•Construido desde California con Amor ❤️
© Copyright 2026. Todos los Derechos Reservados.