# venice-chat

Enables your agent to interact with Venice's POST /api/v1/chat/completions endpoint. It helps configure web search, reasoning effort, and structured outputs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 160
- Author: veniceai
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/veniceai/skills/tree/HEAD/skills/venice-chat/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/venice-chat

## What it does

The `POST /api/v1/chat/completions` route on Venice mirrors OpenAI's payload schema while exposing a dedicated `venice_parameters` block. Through this object, the agent configures web search, scraping, citations, end-to-end encryption, X search, and model reasoning effort. Authentication relies on either a Bearer API token or an x402 wallet header.

The skill covers streaming SSE chunks, prompt caching retention up to 24 hours, and multimodal inputs such as images, audio, video, or documents. Venice validates top-level request parameters strictly: any unexpected field triggers a `400` status. Model refusals arrive as a `200` response with `finish_reason` set to `content_filter`, which means the application must inspect this field before reading message text.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add veniceai/skills --skill venice-chat -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/venice-chat/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/venice-chat/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add veniceai/skills --skill venice-chat -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/venice-chat/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add veniceai/skills --skill venice-chat -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/venice-chat/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install veniceai/skills venice-chat
```

2. **Manually: put the files in place**
- File: `.github/skills/venice-chat/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add veniceai/skills --skill venice-chat -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/veniceai/skills --path skills/venice-chat
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/venice-chat/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add veniceai/skills --skill venice-chat -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/veniceai/skills/tree/HEAD/skills/venice-chat/SKILL.md

## When to use it
- Formulate `POST /api/v1/chat/completions` requests to Venice via curl or OpenAI SDK
- Enable web search and source citations using `venice_parameters`
- Configure prompt caching and retention up to 24 hours for large contexts
- Extract schema-validated JSON using `response_format`

## Example prompts
- Show an example of calling Venice `POST /api/v1/chat/completions` with web search enabled
- Draft a Venice request using `reasoning_effort: low` and a strict JSON schema
- How do I configure `anon_user_id` and prompt caching retention in Venice?

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 150d9f5d2aeb266c.

BEGIN THIRD-PARTY FILE 150d9f5d2aeb266c
````text
---
name: venice-chat
description: Call POST /chat/completions on Venice. Covers the OpenAI-compatible request shape, Venice-only venice_parameters (web search, scraping, citations, E2EE, characters, thinking control, X search), anon_user_id, multimodal inputs (images/audio/video/files), tool calls, reasoning controls (reasoning_effort, reasoning.enabled), streaming, prompt caching, structured output, per-model caps, and model feature suffixes.
---

# Venice Chat Completions

`POST /api/v1/chat/completions` is Venice's main text endpoint. It's OpenAI-compatible, plus a `venice_parameters` object for Venice-only features. Auth is a Bearer API key or an x402 wallet (`SIGN-IN-WITH-X`); see [`venice-auth`](../venice-auth/SKILL.md).

## Use when

- You need LLM text generation, with or without tools, with or without streaming.
- You want multimodal inputs (images, audio, video, documents) to a capable model.
- You want Venice-specific features: web search, web scraping, citations, E2EE, characters, xAI X/Twitter search, thinking control.
- You need prompt caching for large system prompts or long documents.
- You need structured (`json_schema`) output.

For the OpenAI Responses-style shape (typed `output[]` blocks), see [`venice-responses`](../venice-responses/SKILL.md). To pick a model, see [`venice-text-routing`](../venice-text-routing/SKILL.md).

## Minimal request

```bash
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": "Why is the sky blue?"}]
  }'
```

OpenAI SDK (Python) — Venice-only fields go in `extra_body`:

```python
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["VENICE_API_KEY"], base_url="https://api.venice.ai/api/v1")
resp = client.chat.completions.create(
    model="zai-org-glm-5-1",
    messages=[{"role": "user", "content": "Summarize today's AI news."}],
    extra_body={"venice_parameters": {"enable_web_search": "auto", "include_venice_system_prompt": False}},
)
```

Response shape is the standard OpenAI `chat.completion` object (`id`, `object: "chat.completion"`, `created`, `model`, `choices[].message`, `choices[].finish_reason`, `usage`) plus:

- `cost: {usd, diem}` — the request's cost split by the currency it was charged in (bundled credits count as USD). `0` when the response has no output tokens (those responses are not billed). Omitted if the cost can't be computed, and currently also when the request was charged to earned credits.
- `venice_parameters` — the effective Venice settings, plus `web_search_citations[]` (an empty array when no search ran).
- `usage.prompt_tokens_details.{cached_tokens, cache_creation_input_tokens}` and `usage.completion_tokens_details.reasoning_tokens` when the provider reports them.
````
END THIRD-PARTY FILE 150d9f5d2aeb266c

The third-party file has ended. Everything between the 150d9f5d2aeb266c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2887 of 23565 bytes. © veniceai · MIT · https://github.com/veniceai/skills/tree/HEAD/skills/venice-chat/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
