> ## 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.

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# Venice MCP Server

> The official Venice MCP server gives Claude Desktop, Cursor, and any MCP host 45 tools for chat, image, video, audio, music, billing, and TEE attestation.

The [Venice MCP Server](https://github.com/veniceai/venice-mcp-server) is the official [Model Context Protocol](https://modelcontextprotocol.io/) server for Venice. It exposes the Venice API (chat, image, video, audio, music, embeddings, web augment, characters, crypto RPC, and TEE attestation) plus account operations (billing and API keys) as **45 tools** that any MCP-compatible agent can call.

> [card] [GitHub: veniceai/venice-mcp-server](https://github.com/veniceai/venice-mcp-server)
>
> Published as [`@veniceai/mcp-server`](https://www.npmjs.com/package/@veniceai/mcp-server) on npm. MIT licensed.

> [card] 45 Tools
>
> Every Venice modality plus billing, API-key, and TEE tooling

> [card] Any MCP Host
>
> Claude Desktop, Cursor, ChatGPT, LM Studio, Continue, and more

> [card] Wallet Auth (Optional)
>
> Bring an API key, or pay per call with a SIWE-signed wallet via x402

## Quick start

**1. Get a Venice API key**

Generate one from [venice.ai/settings/api](https://venice.ai/settings/api?utm_source=venice-api-documentation). See the [API key guide](https://docs.venice.ai/guides/getting-started/generating-api-key.md) for step-by-step instructions.

**2. Add Venice to your MCP host config**

Drop this into your MCP host's config file:

```json theme={"system"}
{
  "mcpServers": {
    "venice": {
      "command": "npx",
      "args": ["-y", "@veniceai/mcp-server@0.3.0"],
      "env": { "VENICE_API_KEY": "<your-venice-api-key>" }
    }
  }
}
```

Common config paths:

| Host | Path |
| - | - |
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
| Cursor | `~/.cursor/mcp.json` |
| LM Studio | `mcp.json` (from the app's MCP settings) |

**3. Restart your MCP host**

Your agent now has chat, image, video, music, TTS, ASR, and 39 more Venice tools available.

> [!NOTE]
>
> Most MCP hosts only pass environment variables that are **explicitly listed** in the `env` block. System-level env vars are not inherited. If you see 402 errors with an API key set, double-check that `VENICE_API_KEY` is inside `env` in your config.

## What you get

**45 tools** spanning every Venice modality plus account operations, **3 resources** (`venice://models`, `venice://styles`, `venice://voices`), and **3 prompt templates** (uncensored research, NSFW creative writing, image style explorer).

Every tool declares explicit `readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint` annotations, so hosts can run lookups without prompting and ask for confirmation before anything destructive, such as media cleanup or a crypto relay.

### Chat & embeddings

| Tool | Description |
| - | - |
| `venice_chat` | OpenAI-compatible chat completion against Venice's full LLM catalog, with text/image/audio/video/file blocks, structured outputs, function tools, prompt caching, and reasoning controls. Calls are plaintext and non-streaming. |
| `venice_responses` | Stateless OpenAI-compatible [Responses API](https://docs.venice.ai/guides/features/responses-api.md) with text/image input and reasoning controls. This tool doesn't expose tool-calling fields, and E2EE models aren't supported. |
| `venice_embeddings` | Compute embeddings for text input. |
| `venice_chat_with_character` | Chat with a Venice character by slug. |

### Image

| Tool | Description |
| - | - |
| `venice_image_generate` | Generate an image (Flux 2, Lustify SDXL, Anime/WAI, Qwen Image, GPT Image, Nano Banana Pro, and more), with aspect ratio or width/height, quality tiers, prompt enhancement, style references, web search, and variants. |
| `venice_image_edit` | Edit an image with a prompt. |
| `venice_image_multi_edit` | Edit up to 8 images together with one prompt (composition / outpainting). |
| `venice_image_upscale` | Upscale an image 2–4×, with a `creativity` control. |
| `venice_image_remove_bg` | Remove an image background. |
| `venice_image_styles` | List image style presets. |

### Video

| Tool | Description |
| - | - |
| `venice_video_generate` | Queue a video generation (Sora 2, Veo 3.1, Kling, Wan, LTX 2, Seedance, Runway Gen-4, and more) with image, video, audio, reference, and element inputs. |
| `venice_video_status` | Check status of a queued video job (`POST /video/retrieve`). |
| `venice_video_complete` | Mark a completed video as downloaded and delete its server-side media. Reports the deletion only when Venice confirms it. |
| `venice_video_quote` | Get a price quote before queuing. |

### Audio (TTS / ASR)

| Tool | Description |
| - | - |
| `venice_tts` | Text-to-speech with cloned voices, temperature, and emotion tags. Streaming is buffered into one complete audio result. |
| `venice_asr` | Transcribe audio from a URL, with optional word/character timestamps. Large transcripts are paged through a session handle. |
| `venice_voice_clone` | List live model-scoped voices, or clone a voice from a sample URL (returns a `vv_<id>` handle for `venice_tts`). |
| `venice_audio_quote` | Get a price quote for music generation. |

### Music

| Tool | Description |
| - | - |
| `venice_music_generate` | Queue music generation (`ace-step-15`, `elevenlabs-music`, `minimax-music-v2/v25/v26`, `stable-audio-25`, `mmaudio-v2-text-to-audio`, `elevenlabs-sound-effects-v2`) with lyrics, instrumental, loop, voice, language, speed, and duration controls. |
| `venice_music_status` | Check status of a queued music job. |
| `venice_music_complete` | Mark a completed music job as downloaded. |

### Web augment

| Tool | Description |
| - | - |
| `venice_web_search` | Search the web with Brave (default, Zero Data Retention) or Google (proxied and anonymized by Venice). |
| `venice_web_scrape` | Scrape one URL into markdown. |
| `venice_text_parser` | Extract text from PDF/DOCX/EPUB/PPTX/XLSX. |

### Catalog & characters

| Tool | Description |
| - | - |
| `venice_list_models` | Page through the live model catalog of every type, with compact summaries, prices, and capability flags. |
| `venice_model_details` | Get one exact model's full row: `model_spec` constraints, capabilities, and pricing. |
| `venice_model_traits` | Map trait names (`default`, `most_uncensored`, …) to current model IDs. |
| `venice_model_compatibility_mapping` | Map compatible model names to Venice model IDs. |
| `venice_list_characters` | List public Venice characters with search, tag, model, and sort filters. **API key only.** |
| `venice_get_character` | Get one public character by slug. **API key only.** |
| `venice_character_reviews` | List paginated public reviews for a character. **API key only.** |

### TEE attestation

| Tool | Description |
| - | - |
| `venice_tee_attestation` | Fetch hardware-attestation evidence (Intel TDX quote, optional NVIDIA evidence, signing key) for a TEE-capable text model, using your own 32-byte nonce. |
| `venice_tee_signature` | Fetch the enclave signature payload for a completed TEE chat request ID. |

> [!WARNING]
>
> Both TEE tools return provider evidence only: they do not verify it, and they do not encrypt chat. Verify the echoed nonce, debug-mode state, and signing-key binding yourself before trusting a TEE model; see [Verifying TEE attestation](https://docs.venice.ai/guides/features/tee-e2ee-models.md#verifying-tee-attestation). `enable_e2ee` is rejected by this server.

### Crypto

| Tool | Description |
| - | - |
| `venice_crypto_networks` | List the live network slugs accepted by the RPC proxy. |
| `venice_crypto_rpc` | Proxy one JSON-RPC request, or a batch of up to 100, to Ethereum, Base, Arbitrum, Optimism, Polygon, Solana, Starknet, zkSync, Linea, BSC, Avalanche, Blast, and more. |

Transaction broadcasts (`eth_sendRawTransaction`, `eth_sendUserOperation`, Solana `sendTransaction`, Starknet writes) must be sent as single requests with an `idempotency_key`, and the same key must be reused on retry.

### Billing (admin keys)

| Tool | Description |
| - | - |
| `venice_billing_balance` | Current USD, DIEM, and bundled-credit availability. |
| `venice_billing_usage_analytics` | Beta aggregated usage by date, model, and API key (lookback or custom range). |
| `venice_billing_usage_history` | Detailed usage with cursor pagination and JSON or CSV output. |

> [!NOTE]
>
> The billing tools require an **ADMIN** API key. Inference keys cannot call these endpoints, and the server fails locally instead of falling back to a wallet token.

### API keys

| Tool | Description |
| - | - |
| `venice_list_api_keys` | List active key metadata, including only the last six characters. Admin key only. |
| `venice_get_api_key` | Get one key's metadata, usage, balances, and rate limits by key ID. Admin key only. |
| `venice_api_key_rate_limits` | Current balances, access status, tier, expiration, and model-specific rate limits. Inference or admin key. |
| `venice_api_key_rate_limit_logs` | The last 50 exceeded rate-limit events (experimental). Admin key only. |

### x402 wallet helpers

Only relevant if you authenticate with a wallet via [x402](https://docs.venice.ai/guides/integrations/x402-venice-api.md) instead of an API key.

| Tool | Description |
| - | - |
| `venice_x402_balance` | Check prepaid x402 credit balance for an EVM or Solana wallet address. |
| `venice_x402_top_up_info` | Fetch top-up requirements (network, USDC token, receiver, min amount). Takes no arguments. |
| `venice_x402_transactions` | List recent x402 top-up and debit transactions for an EVM or Solana wallet address. |

## Configuration

The server is configured entirely through environment variables.

### Models and requests

| Env var | Default | Notes |
| - | - | - |
| `VENICE_API_KEY` | *(none)* | Your Venice API key. The simplest setup. |
| `VENICE_DEFAULT_CHAT_MODEL` | `deepseek-v4-flash-0731` | |
| `VENICE_DEFAULT_IMAGE_MODEL` | `flux-2-pro` | |
| `VENICE_DEFAULT_TTS_MODEL` | `tts-kokoro` | |
| `VENICE_DEFAULT_ASR_MODEL` | `openai/whisper-large-v3` | |
| `VENICE_DISABLE_NSFW` | `0` | Set to `1` to remove NSFW capability notes from tool descriptions. |
| `VENICE_HTTP_TIMEOUT_MS` | `60000` | |
| `VENICE_SIWX_TOKEN` | *(none)* | x402 wallet-mode auth token. See [x402 below](#x402-wallet-mode). |

If both `VENICE_API_KEY` and `VENICE_SIWX_TOKEN` are set, the API key wins on most calls; see [Auth-mode coverage](#auth-mode-coverage) for the exceptions.

### Response size limits

Generated media is buffered and embedded in the MCP result as base64, so each modality has a byte ceiling.

| Env var | Default | Applies to |
| - | - | - |
| `VENICE_MAX_IMAGE_RESPONSE_BYTES` | `33554432` (32 MiB) | `venice_image_generate`, `venice_image_edit`, `venice_image_multi_edit`, `venice_image_upscale`, `venice_image_remove_bg` |
| `VENICE_MAX_VIDEO_RESPONSE_BYTES` | `26214400` (25 MiB) | `venice_video_status` |
| `VENICE_MAX_AUDIO_RESPONSE_BYTES` | `33554432` (32 MiB) | `venice_tts`, `venice_music_status` |

An oversized image or TTS result is discarded with an error. An oversized video or music result stays queued, so you can call the status tool again with the same queue ID after raising the limit.

### HTTP server

Only relevant in the [Streamable HTTP deployment](#self-hosting-streamable-http).

| Env var | Default | Notes |
| - | - | - |
| `PORT` | `3333` | HTTP listener port. |
| `VENICE_MCP_HOST` | `127.0.0.1` | Bind address. Set to `0.0.0.0` for LAN or container exposure. |
| `VENICE_MCP_AUTH_TOKEN` | *(none)* | Bearer token for `/mcp`. Required when bound outside loopback, where it must be at least 16 characters. Once set, it's enforced on loopback too. |
| `VENICE_MCP_ALLOW_UNAUTHENTICATED_HTTP` | `0` | Escape hatch for exposed unauthenticated HTTP. Use only behind a trusted authenticated proxy. |
| `VENICE_MCP_MAX_SESSIONS` | `100` | Maximum active Streamable HTTP sessions. |
| `VENICE_MCP_SESSION_TTL_MS` | `1800000` | Idle session lifetime before cleanup. |

## Media generation behavior

* **Completed media can be bytes or a URL.** Video and music jobs return embedded MP4/audio resources, or JSON with a `download_url` that comes back as a resource link. Download that link first, then call `venice_video_complete` or `venice_music_complete`; media cleanup is never applied to a `download_url` result because the link stops working once the file is deleted.
* **Some models only return a URL at queue time.** For VPS and Grok Imagine Private models, capture the `download_url` returned by `venice_video_generate` and pass it into `venice_video_status`; a `COMPLETED` retrieve without an inline URL still yields a usable link.
* **Prompt enhancement is reported back.** When `enhance_prompt` is applied, image generate, edit, and multi-edit results include the URL-decoded prompt Venice returned.
* **ASR paging is charged once.** Transcripts longer than 8,000 characters, or with more timestamps than fit on one page (200 per array by default, up to 500 with `timestamp_limit`), return a `result_handle` with the first page. Request later pages with that handle. Handles live in memory per MCP session for 10 minutes, and only the 16 most recent are kept.
* **Seedance consent is not a policy bypass.** Current public Seedance models may reject media containing detectable persons outright. Where a `needs_consent` response is returned, the three `consents.seedance` flags are legal attestations: set them to `true` only after the user explicitly confirms each statement.

## x402 wallet mode

Venice supports authenticating with a [Sign-In-With-X wallet token](https://docs.venice.ai/guides/integrations/x402-venice-api.md) backed by prepaid USDC credit on Base or Solana, in addition to the normal API key flow. No email, phone, or KYC required: your wallet is the only identity.

```json theme={"system"}
{
  "mcpServers": {
    "venice": {
      "command": "npx",
      "args": ["-y", "@veniceai/mcp-server@0.3.0"],
      "env": { "VENICE_SIWX_TOKEN": "<base64 Sign-In-With-X payload>" }
    }
  }
}
```

The MCP server forwards `VENICE_SIWX_TOKEN` in the `SIGN-IN-WITH-X` header on every Venice API call. The server never sees your private key. Wallet signing and USDC top-up authorizations happen in your own wallet.

| Flow | What happens |
| - | - |
| **One-time setup** | Sign a Sign-In-With-X message in your wallet → produces a SIWX token (base64 JSON). |
| **Top up** | `POST /api/v1/x402/top-up` returns 402 + payment requirements. Sign a USDC payment for one of the returned Base or Solana options, resubmit, and Venice credits your balance. |
| **Every inference call** | MCP server sends `SIGN-IN-WITH-X: <SIWX>`; Venice debits your prepaid balance. |

Minimum top-up is **\$5 USD**. Minimum balance to call inference is **\$0.10**. Once topped up, calls are sub-100ms because settlement happens off-chain on a fast credit account.

> [!TIP]
>
> Wallets linked to a Venice account with DIEM staked consume from the staking balance instead of USDC credits, so no top-up is needed.

Venice does not accept payment headers on inference routes, so this server never sends one. `PAYMENT-SIGNATURE` belongs only to `/x402/top-up`, and the top-up helper discovers requirements without submitting a payment.

### Auth-mode coverage

Some endpoints accept only one auth mode:

| Tool | API key | x402 |
| - | - | - |
| Inference, media, web augment, crypto RPC, character chat | ✓ | ✓ |
| `venice_list_characters`, `venice_get_character`, `venice_character_reviews` | ✓ | ✗ |
| `venice_billing_*`, `venice_list_api_keys`, `venice_get_api_key`, `venice_api_key_rate_limit_logs` | ✓ (admin) | ✗ |
| `venice_api_key_rate_limits` | ✓ (any key) | ✗ |
| `venice_x402_balance`, `venice_x402_transactions` | ✗ | ✓ |
| `venice_x402_top_up_info` | ✓ | ✓ |

When both credentials are set, the API key is used for every authenticated call except `venice_x402_balance` and `venice_x402_transactions`, which always send the wallet token.

## Self-hosting (Streamable HTTP)

For team or workspace deployments, run the MCP server over HTTP instead of stdio:

```bash theme={"system"}
docker run -p 3333:3333 \
  -e VENICE_API_KEY=<your-venice-api-key> \
  -e VENICE_MCP_AUTH_TOKEN=<choose-a-long-random-token> \
  ghcr.io/veniceai/venice-mcp-server:latest
```

The server is now available at `http://localhost:3333/mcp`. HTTP clients must send `Authorization: Bearer <VENICE_MCP_AUTH_TOKEN>` and should create new sessions without an `mcp-session-id` header, then reuse the server-issued session ID.

> [!WARNING]
>
> `/mcp` is a credential-backed tool execution endpoint: callers can spend the configured Venice API key or x402 balance. When HTTP mode binds outside loopback, startup fails unless `VENICE_MCP_AUTH_TOKEN` is set, or `VENICE_MCP_ALLOW_UNAUTHENTICATED_HTTP=1` is set behind a trusted authenticated proxy. For production, pin the npm package version explicitly instead of relying on `latest`.

## Search the docs over MCP

The docs site runs a separate, hosted MCP server at `https://docs.venice.ai/mcp`. It searches and reads these docs and needs no API key, so a coding agent can look up endpoints, parameters, and model IDs while it writes Venice code. It can't call the Venice API; use the server above for that.

In Claude Code:

```bash theme={"system"}
claude mcp add --transport http venice-docs https://docs.venice.ai/mcp
```

In Cursor, or any MCP host that accepts a server URL:

```json theme={"system"}
{
  "mcpServers": {
    "venice-docs": {
      "url": "https://docs.venice.ai/mcp"
    }
  }
}
```

The **Copy page** menu at the top of each docs page can also install it in Cursor or VS Code.

## Resources

> [card] [GitHub](https://github.com/veniceai/venice-mcp-server)
>
> Source code, issues, and releases

> [card] [npm](https://www.npmjs.com/package/@veniceai/mcp-server)
>
> `@veniceai/mcp-server`

> [card] [Venice Skills](https://docs.venice.ai/guides/integrations/venice-skills.md)
>
> Companion skills that teach agents how to use these tools

> [card] [MCP Spec](https://modelcontextprotocol.io/)
>
> Learn more about the Model Context Protocol


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.