Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-reference/api-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"og:description": "Complete API reference including authentication, debugging, OpenAI compatibility, and response headers"
---

The Venice API offers HTTP-based REST and streaming interfaces for building AI applications with uncensored models and private inference. You can create with text generation, image creation, embeddings, and more, all without restrictive content policies. Integration examples and SDKs are available in the [documentation](/overview/getting-started). Our API reference is also available as a [OpenAPI YAML spec.](https://api.venice.ai/doc/api/swagger.yaml)
The Venice API offers HTTP-based REST and streaming interfaces for building AI applications with uncensored models and private inference. You can create with text generation, image creation, embeddings, and more, all without restrictive content policies. Integration examples and SDKs are available in the [documentation](/overview/getting-started). Our API reference is also available as an [OpenAPI YAML spec.](https://api.venice.ai/doc/api/swagger.yaml)

Check warning on line 8 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L8

Did you really mean 'SDKs'?

## Authentication

Expand Down Expand Up @@ -99,7 +99,7 @@
{"role": "system", "content": "Your custom system prompt"},
{"role": "user", "content": "Why is the sky blue?"}
],
"venice_parameters": {

Check warning on line 102 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L102

Did you really mean 'venice_parameters'?
"include_venice_system_prompt": false
}
}'
Expand Down Expand Up @@ -151,7 +151,7 @@
| `disable_thinking` | boolean | On supported reasoning models, disable thinking and strip the `<think></think>` blocks from the response | `false` |
| `enable_web_search` | string | Enable web search for this request (`off`, `on`, `auto` - auto enables based on model's discretion)<br/>Additional usage-based pricing applies, see [pricing](/overview/pricing#web-search-and-scraping). | `off` |
| `enable_web_scraping` | boolean | Enable web scraping of up to 5 URLs detected in the user message. Scraped content augments responses and bypasses web search. Only successfully scraped URLs are billed.<br/>Additional usage-based pricing applies, see [pricing](/overview/pricing#web-search-and-scraping). | `false` |
| `enable_x_search` | boolean | Enable xAI's native search (web + X/Twitter) for supported Grok models (e.g., `grok-4-20-beta`). Provides higher quality search results by using xAI's search infrastructure. When enabled, Venice's standard web search is bypassed.<br/>Additional usage-based pricing applies, see [pricing](/overview/pricing#web-search-and-scraping). | `false` |

Check warning on line 154 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L154

Did you really mean 'xAI's'?

Check warning on line 154 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L154

Did you really mean 'xAI's'?
| `enable_web_citations` | boolean | When web search is enabled, request that the LLM cite its sources using `[REF]0[/REF]` format | `false` |
| `include_search_results_in_stream` | boolean | Experimental: Include search results in the stream as the first emitted chunk | `false` |
| `return_search_results_as_documents` | boolean | Surface search results in an OpenAI-compatible tool call named `venice_web_search_documents` for LangChain integration | `false` |
Expand Down Expand Up @@ -190,7 +190,7 @@
| `CF-RAY` | string | Unique identifier for this API request, used for troubleshooting and support requests | Always |
| `x-venice-version` | string | Current version/revision of the Venice API service (e.g., `20250828.222653`) | Always |
| `x-venice-timestamp` | string | Server timestamp when the request was processed (ISO 8601 format) | When timestamp tracking is enabled |
| `x-venice-host-name` | string | Hostname of the server that processed the request | Error responses and debugging scenarios |

Check warning on line 193 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L193

Did you really mean 'Hostname'?
| **Model Information** ||||
| `x-venice-model-id` | string | Unique identifier of the AI model used for the request (e.g., `venice-01-lite`) | Inference endpoints using AI models |
| `x-venice-model-name` | string | Friendly/display name of the AI model used (e.g., `Venice Lite`) | Inference endpoints using AI models |
Expand Down Expand Up @@ -219,7 +219,7 @@
| `x-venice-is-adult-model-content-violation` | string | Indicates if content violates adult model content policies (`true`/`false`) | Image generation endpoints |
| `x-venice-contains-minor` | string | Indicates if image contains minors (`true`/`false`) | Image analysis endpoints with age detection |
| **Client Information** ||||
| `x-venice-middleface-version` | string | Version of the Venice middleface client | Requests from Venice middleface clients |

Check warning on line 222 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L222

Did you really mean 'middleface'?

Check warning on line 222 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L222

Did you really mean 'middleface'?
| `x-venice-mobile-version` | string | Version of the Venice mobile app client | Requests from mobile applications |
| `x-venice-request-timestamp-ms` | number | Client-provided request timestamp in milliseconds | When client provides timestamp in request |
| `x-venice-control-instance` | string | Control instance identifier for debugging | Image generation endpoints for debugging |
Expand Down Expand Up @@ -253,7 +253,7 @@

## Best Practices

1. **Rate Limiting**: Monitor `x-ratelimit-remaining-requests` and `x-ratelimit-remaining-tokens` headers and implement exponential backoff

Check warning on line 256 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L256

Did you really mean 'backoff'?
2. **Balance Monitoring**: Track `x-venice-balance-usd` and `x-venice-balance-diem` headers to avoid service interruptions
3. **System Prompts**: Test with and without Venice's system prompts to find the best fit for your use case
4. **API Keys**: Keep your API keys secure and rotate them regularly
Expand All @@ -264,7 +264,7 @@

While Venice maintains high compatibility with the OpenAI API specification, there are some key differences:

1. **venice_parameters**: Additional configurations like `enable_web_search`, `character_slug`, and `strip_thinking_response` for extended functionality

Check warning on line 267 in api-reference/api-spec.mdx

View check run for this annotation

Mintlify / Mintlify Validation (veniceai) - vale-spellcheck

api-reference/api-spec.mdx#L267

Did you really mean 'venice_parameters'?
2. **System Prompts**: Venice appends your system prompts to defaults that optimize for uncensored responses (disable with `include_venice_system_prompt: false`)
3. **Model Ecosystem**: Venice offers its own [model lineup](/overview/models) including uncensored and reasoning models - use Venice model IDs rather than OpenAI mappings
4. **Response Headers**: Unique headers for balance tracking (`x-venice-balance-usd`, `x-venice-balance-diem`), model deprecation warnings, and content safety flags
Expand Down
4 changes: 2 additions & 2 deletions learn/private-rag-bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ For a private local bot, start with an on-disk local Qdrant path:
qdrant = QdrantClient(path="./qdrant_data")
```

There's a few different ways to handle deployment in production. However if you use a remote Qdrant deployment, remember that your document chunks and metadata will be stored there. Venice can keep the inference layer private, but you should still choose the right Qdrant deployment for your data.
There are a few different ways to handle deployment in production. However if you use a remote Qdrant deployment, remember that your document chunks and metadata will be stored there. Venice can keep the inference layer private, but you should still choose the right Qdrant deployment for your data.

## Loading and Chunking Documents

Expand Down Expand Up @@ -196,7 +196,7 @@ def chunk_text(text: str, chunk_size: int, chunk_overlap: int) -> list[str]:
return chunks
```

A starting chunk size of `1000` characters with `150` characters of overlap is a good default for mixed Markdown and text documents. Smaller chunks can improve precision. Larger chunks can preserve more context. The right setting will often on depend on the kinds of documents you are storing.
A starting chunk size of `1000` characters with `150` characters of overlap is a good default for mixed Markdown and text documents. Smaller chunks can improve precision. Larger chunks can preserve more context. The right setting will often depend on the kinds of documents you are storing.

## Embedding Documents with Venice

Expand Down
2 changes: 1 addition & 1 deletion learn/rust-llm-gateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The reference implementation is a small Rust service with a few clear parts:

*A client sends an OpenAI-compatible request to the gateway. The gateway authenticates the caller, checks rate limits, forwards the request to Venice, and records telemetry along the way.*

As part of the gateway, we'll be ensuring that this service remains horizontally scalable with the least amount of surface area covered when it comes to the API itself. There's a few reasons for this - one of them primarily being that if you have a very high amount of throughput for example, you will almost certainly want to use replicas (i.e., spin up more than 1 of the same service). This means that if you aren't already, architecturally you'll want to put your original service and the replicas behind a load balancer so that if one container or service goes down, the entire service does not experience an outage.
As part of the gateway, we'll be ensuring that this service remains horizontally scalable with the least amount of surface area covered when it comes to the API itself. There are a few reasons for this - one of them primarily being that if you have a very high amount of throughput for example, you will almost certainly want to use replicas (i.e., spin up more than 1 of the same service). This means that if you aren't already, architecturally you'll want to put your original service and the replicas behind a load balancer so that if one container or service goes down, the entire service does not experience an outage.

Additionally, we will also assume that we own API key creation in some manner, although the gateway service shouldn't be minting them in isolation. This will be represented as a Postgres table that we seed when used locally. In production, this would typically be handled by the authentication service. Although it is possible to handle creating an API key upstream for every user who uses your LLM gateway, in practice this is not generally advisable. By offloading this responsibility to the upstream service, you also offload any control you would normally have - which means you can't fully enforce things like rate limiting and spend caps.

Expand Down
Loading