> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venice.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Venice API

> Venice API documentation — private, unrestricted access to OpenAI-compatible chat, image, audio, and video models behind one API key.

<div className="venice-hero-copy">
  <p className="venice-hero-tagline">The API for private, unrestricted access to intelligence.</p>
  <p className="venice-hero-subtitle">OpenAI-compatible chat, image, audio, and video behind one API key.</p>

  <div className="venice-hero-ctas">
    <a className="venice-hero-cta venice-hero-cta-primary" href="https://venice.ai/settings/api">Get an API key →</a>
    <a className="venice-hero-cta" href="/overview/getting-started">Get started</a>
  </div>
</div>

<CodeGroup>
  ```bash curl theme={"system"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org-glm-5-1",
      "messages": [{"role": "user", "content": "Build without permission."}]
    }'
  ```

  ```ts TypeScript theme={"system"}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: process.env.VENICE_API_KEY,
    baseURL: "https://api.venice.ai/api/v1",
  });

  const res = await client.chat.completions.create({
    model: "zai-org-glm-5-1",
    messages: [{ role: "user", content: "Build without permission." }],
  });
  ```

  ```python Python theme={"system"}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ["VENICE_API_KEY"],
      base_url="https://api.venice.ai/api/v1",
  )

  res = client.chat.completions.create(
      model="zai-org-glm-5-1",
      messages=[{"role": "user", "content": "Build without permission."}],
  )
  ```
</CodeGroup>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">Endpoints</p>
  <h2 className="venice-section-title">One API for every modality</h2>
  <p className="venice-section-subtitle">Chat, image, audio, video, and embeddings behind one API key.</p>
</div>

<div className="venice-apis-grid">
  <a className="venice-api-card" href="/api-reference/endpoint/chat/completions">
    <span className="venice-api-card-name">Chat Completions</span>
    <p className="venice-api-card-desc">OpenAI-compatible chat with reasoning, tool use, and streaming across 100+ text models.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">Streaming</span>
      <span className="venice-api-card-chip">Tools</span>
      <span className="venice-api-card-chip">Vision</span>
    </div>

    <span className="venice-api-card-action">See reference →</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/image/generations">
    <span className="venice-api-card-name">Image Generation</span>
    <p className="venice-api-card-desc">Text-to-image, image-to-image, upscaling, and background removal across photorealistic, stylized, and uncensored models.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">Text-to-image</span>
      <span className="venice-api-card-chip">Image-to-image</span>
      <span className="venice-api-card-chip">Upscale</span>
    </div>

    <span className="venice-api-card-action">See reference →</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/audio/speech">
    <span className="venice-api-card-name">Audio</span>
    <p className="venice-api-card-desc">Text-to-speech with 50+ multilingual voices, plus speech-to-text transcription for any audio file.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">TTS</span>
      <span className="venice-api-card-chip">Transcription</span>
      <span className="venice-api-card-chip">50+ voices</span>
    </div>

    <span className="venice-api-card-action">See reference →</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/video/queue">
    <span className="venice-api-card-name">Video</span>
    <p className="venice-api-card-desc">Text-to-video, image-to-video, and reference-to-video through a sync or async job queue.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">Text-to-video</span>
      <span className="venice-api-card-chip">Image-to-video</span>
      <span className="venice-api-card-chip">Reference-to-video</span>
    </div>

    <span className="venice-api-card-action">See reference →</span>
  </a>
</div>

<p className="venice-apis-extras">
  Plus <a href="/api-reference/endpoint/embeddings/generate">embeddings</a>, <a href="/guides/features/file-inputs">file inputs</a>, <a href="/guides/integrations/venice-mcp">MCP tools</a>, and <a href="/guides/integrations/x402-venice-api">wallet payments</a>. <a className="venice-apis-extras-cta" href="/api-reference">View all endpoints →</a>
</p>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">Agents</p>
  <h2 className="venice-section-title">Built for AI agents</h2>
  <p className="venice-section-subtitle">Private inference, MCP tools, and wallet-funded workflows for messaging, coding, and onchain agents.</p>
</div>

<div className="venice-agents-cards">
  <a className="venice-api-card" href="/guides/integrations/ai-agents#agent-apps">
    <span className="venice-api-card-name">Agent apps</span>
    <p className="venice-api-card-desc">Connect Venice to WhatsApp, Telegram, Discord, and more through OpenClaw, Hermes, and NanoClaw.</p>
    <span className="venice-api-card-action">See integrations →</span>
  </a>

  <a className="venice-api-card" href="/guides/integrations/ai-agents#coding-agents">
    <span className="venice-api-card-name">Coding agents</span>
    <p className="venice-api-card-desc">Use Claude Code, Cursor, and Codex CLI with Venice models for private coding workflows.</p>
    <span className="venice-api-card-action">See integrations →</span>
  </a>

  <a className="venice-api-card" href="/guides/integrations/ai-agents#tools-and-skills">
    <span className="venice-api-card-name">MCP + Skills</span>
    <p className="venice-api-card-desc">Expose chat, image, video, audio, and embeddings as MCP tools or runtime skills.</p>
    <span className="venice-api-card-action">See integrations →</span>
  </a>
</div>

<p className="venice-apis-extras">
  <a className="venice-apis-extras-cta" href="/guides/integrations/ai-agents">Explore the AI Agents hub →</a>
</p>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">Models</p>
  <h2 className="venice-section-title">Popular models</h2>
  <p className="venice-section-subtitle">A few of the most-used models on Venice. Use the ID as your `model` parameter.</p>
</div>

<div className="venice-models-grid">
  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">Kimi K2.6</span>
      <span className="venice-model-card-maker">Moonshot AI</span>
    </div>

    <p className="venice-model-card-desc">Open-weights frontier reasoning. Strong long-context and tool use at a fraction of frontier prices.</p>

    <div className="venice-model-card-stats">
      <span>256K context</span>
      <span>\$0.85 / \$4.66 per 1M</span>
      <span className="venice-model-card-privacy">Private</span>
    </div>

    <code className="venice-model-card-id">kimi-k2-6</code>
  </a>

  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">Claude Opus 4.7</span>
      <span className="venice-model-card-maker">Anthropic</span>
    </div>

    <p className="venice-model-card-desc">Best-in-class for coding, planning, and long-horizon agents that need to stay coherent.</p>

    <div className="venice-model-card-stats">
      <span>1M context</span>
      <span>\$6.00 / \$30.00 per 1M</span>
      <span className="venice-model-card-privacy">Anonymized</span>
    </div>

    <code className="venice-model-card-id">claude-opus-4-7</code>
  </a>

  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">GPT-5.5</span>
      <span className="venice-model-card-maker">OpenAI</span>
    </div>

    <p className="venice-model-card-desc">Frontier general intelligence with 1M context. Strong default for chat, RAG, and multi-step reasoning.</p>

    <div className="venice-model-card-stats">
      <span>1M context</span>
      <span>\$6.25 / \$37.50 per 1M</span>
      <span className="venice-model-card-privacy">Anonymized</span>
    </div>

    <code className="venice-model-card-id">openai-gpt-55</code>
  </a>
</div>

<a className="venice-models-cta" href="/overview/models">
  <span className="venice-models-cta-left">
    <span className="venice-models-cta-count">250+ models</span>
    <span className="venice-models-cta-sub">Text, image, audio, and video</span>
  </span>

  <span className="venice-models-cta-action">Browse the catalog →</span>
</a>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">Tools</p>
  <h2 className="venice-section-title">Built‑in tools for chat models</h2>
  <p className="venice-section-subtitle">Turn on web search, attach files, or query a blockchain with `venice_parameters` or a Venice-native endpoint.</p>
</div>

<CardGroup cols={4}>
  <Card title="Web Search" icon="globe" />

  <Card title="Web Scraping" icon="browser" />

  <Card title="File Inputs" icon="file" />

  <Card title="Crypto RPC" icon="link" />
</CardGroup>

<Accordion title="Web Search Code Samples">
  Add real-time web search with citations to any text model via `enable_web_search`.

  <CodeGroup>
    ```bash Curl theme={"system"}
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "zai-org-glm-5-1",
        "messages": [{"role": "user", "content": "What are the latest developments in AI?"}],
        "venice_parameters": {
          "enable_web_search": "auto"
        }
      }'
    ```

    ```ts TypeScript theme={"system"}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const completion = await client.chat.completions.create({
      model: "zai-org-glm-5-1",
      messages: [{ role: "user", content: "What are the latest developments in AI?" }],
      // @ts-expect-error - Venice-specific parameter
      venice_parameters: {
        enable_web_search: "auto",
      },
    });

    console.log(completion.choices[0].message.content);
    ```

    ```python Python theme={"system"}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    response = client.chat.completions.create(
        model="zai-org-glm-5-1",
        messages=[{"role": "user", "content": "What are the latest developments in AI?"}],
        extra_body={
            "venice_parameters": {
                "enable_web_search": "auto",
            }
        },
    )

    print(response.choices[0].message.content)
    ```

    ```bash Model Suffix theme={"system"}
    # Alternative: append parameters directly to the model ID
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "zai-org-glm-5-1:enable_web_search=on&enable_web_citations=true",
        "messages": [{"role": "user", "content": "What are the latest developments in AI?"}]
      }'
    ```
  </CodeGroup>
</Accordion>

<Accordion title="Web Scraping Code Samples">
  Set `enable_web_scraping: true` and the model will fetch and read any URLs in the user message before answering.

  <CodeGroup>
    ```bash Curl theme={"system"}
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai-gpt-55",
        "messages": [
          {"role": "user", "content": "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api"}
        ],
        "venice_parameters": {
          "enable_web_scraping": true
        }
      }'
    ```

    ```ts TypeScript theme={"system"}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const response = await client.chat.completions.create({
      model: "openai-gpt-55",
      messages: [
        {
          role: "user",
          content:
            "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api",
        },
      ],
      // @ts-expect-error - Venice-specific parameter
      venice_parameters: {
        enable_web_scraping: true,
      },
    });

    console.log(response.choices[0].message.content);
    ```

    ```python Python theme={"system"}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    response = client.chat.completions.create(
        model="openai-gpt-55",
        messages=[
            {
                "role": "user",
                "content": "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api",
            }
        ],
        extra_body={
            "venice_parameters": {
                "enable_web_scraping": True,
            }
        },
    )

    print(response.choices[0].message.content)
    ```
  </CodeGroup>
</Accordion>

<Accordion title="File Inputs Code Samples">
  Attach PDFs, Office docs, code, and text files (up to 25MB) directly to a chat request. See the [File Inputs guide](/guides/features/file-inputs) for the full format list.

  <CodeGroup>
    ```bash Curl theme={"system"}
    # Encode a local file as a base64 data URL, then send it inline
    FILE_B64=$(base64 q3-report.pdf | tr -d '\n')

    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d "{
        \"model\": \"openai-gpt-55\",
        \"messages\": [
          {
            \"role\": \"user\",
            \"content\": [
              {\"type\": \"text\", \"text\": \"Summarize this report in five bullets and list the main risks.\"},
              {\"type\": \"file\", \"file\": {\"filename\": \"q3-report.pdf\", \"file_data\": \"data:application/pdf;base64,${FILE_B64}\"}}
            ]
          }
        ]
      }"
    ```

    ```ts TypeScript theme={"system"}
    import OpenAI from "openai";
    import { readFile } from "node:fs/promises";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const pdf = await readFile("q3-report.pdf");
    const fileData = `data:application/pdf;base64,${pdf.toString("base64")}`;

    const response = await client.chat.completions.create({
      model: "openai-gpt-55",
      messages: [
        {
          role: "user",
          content: [
            { type: "text", text: "Summarize this report in five bullets and list the main risks." },
            // @ts-expect-error - Venice file input block
            { type: "file", file: { filename: "q3-report.pdf", file_data: fileData } },
          ],
        },
      ],
    });

    console.log(response.choices[0].message.content);
    ```

    ```python Python theme={"system"}
    import base64
    import os
    from pathlib import Path
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    path = Path("q3-report.pdf")
    file_data = "data:application/pdf;base64," + base64.b64encode(path.read_bytes()).decode("utf-8")

    response = client.chat.completions.create(
        model="openai-gpt-55",
        messages=[
            {
                "role": "user",
                "content": [
                    {"type": "text", "text": "Summarize this report in five bullets and list the main risks."},
                    {"type": "file", "file": {"filename": "q3-report.pdf", "file_data": file_data}},
                ],
            }
        ],
    )

    print(response.choices[0].message.content)
    ```
  </CodeGroup>
</Accordion>

<Accordion title="Crypto RPC Code Samples">
  Proxy JSON-RPC 2.0 calls across 11 supported chains with your Venice key or an x402 wallet. See the [Crypto RPC reference](/api-reference/endpoint/crypto/rpc) for chains, methods, and credit tiers.

  <CodeGroup>
    ```bash Curl theme={"system"}
    curl https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "jsonrpc": "2.0",
        "method": "eth_blockNumber",
        "params": [],
        "id": 1
      }'
    ```

    ```ts TypeScript theme={"system"}
    const response = await fetch(
      "https://api.venice.ai/api/v1/crypto/rpc/base-mainnet",
      {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.VENICE_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify([
          { jsonrpc: "2.0", method: "eth_chainId", params: [], id: 1 },
          { jsonrpc: "2.0", method: "eth_blockNumber", params: [], id: 2 },
        ]),
      }
    );

    const results = await response.json();
    console.log(results);
    ```

    ```python Python theme={"system"}
    import os
    import requests

    response = requests.post(
        "https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet",
        headers={
            "Authorization": f"Bearer {os.environ['VENICE_API_KEY']}",
            "Content-Type": "application/json",
        },
        json={
            "jsonrpc": "2.0",
            "method": "eth_getBalance",
            "params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"],
            "id": 1,
        },
    )

    print(response.json())
    ```
  </CodeGroup>
</Accordion>

<div className="venice-pricing">
  <div className="venice-section-header">
    <p className="venice-section-eyebrow">Pricing</p>
    <h2 className="venice-section-title">Top up, stake, or pay per request</h2>
    <p className="venice-section-subtitle">Fund an account with credits, stake DIEM for a daily allowance, or skip the account entirely with USDC on Base.</p>
  </div>

  <div className="venice-pricing-grid">
    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">Credits</span>
        <span className="venice-pricing-card-badge">USD or Crypto</span>
      </div>

      <p className="venice-pricing-card-desc">Pay as you go in USD or crypto. Credits never expire and work across every endpoint.</p>
      <a className="venice-pricing-card-cta" href="https://venice.ai/settings/billing">Buy Credits</a>
    </div>

    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">DIEM</span>
        <span className="venice-pricing-card-badge">Daily allowance</span>
      </div>

      <p className="venice-pricing-card-desc">Stake DIEM or VVV once and earn a fixed inference allowance every day, with no per-call charges.</p>
      <a className="venice-pricing-card-cta" href="https://venice.ai/token">Learn about DIEM</a>
    </div>

    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">x402</span>
        <span className="venice-pricing-card-badge">USDC on Base</span>
      </div>

      <p className="venice-pricing-card-desc">Pay per request from any Base wallet in USDC. No account or API key, built for agents.</p>
      <a className="venice-pricing-card-cta" href="/guides/integrations/x402-venice-api">Read x402 Guide</a>
    </div>
  </div>
</div>

Questions or feedback? Join us on [Discord](https://discord.gg/askvenice).
