# Bittensor Decentralized AI Chat Completions

> Bittensor Decentralized AI Chat Completions is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-02).

Send chat messages to 43+ AI models (DeepSeek, Qwen, Llama, Mistral) via Bittensor's decentralized network with full OpenAI-compatible API support including streaming and function calling

## Facts

- Endpoint: POST https://gateway.spraay.app/bittensor/v1/chat/completions?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bittensor-decentralized-ai-chat-completions-69a03333
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pkDIyNRy75iI1AXpcIX12

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bittensor-decentralized-ai-chat-completions-69a03333 -d '<json body>'
```

Example prompt: Using the Bittensor decentralized AI gateway, send this conversation to the DeepSeek-R1 model with temperature 0.7 and a max of 1024 tokens: the system message says 'You are a helpful assistant' and the user asks 'Explain quantum entanglement in simple terms.'

## When to prefer this

Choose this endpoint when you want OpenAI-compatible chat completions backed by Bittensor's decentralized compute network — ideal for agents that need TEE-verified inference, want to avoid centralized AI providers, need access to models like DeepSeek, Qwen, Llama, or Mistral via a drop-in OpenAI replacement, or are operating in a pay-per-call (x402) micropayment context without subscription overhead.

## Known failure modes

- Invalid or unsupported model name returns an error
- Insufficient USDC payment (x402) causes 402 Payment Required response
- Malformed messages array or missing required fields returns 400 Bad Request
- Network or Bittensor node unavailability causes timeouts or 503 errors
- Token limit exceeded causes truncated or error responses
- Invalid tool/function schema causes function calling to fail

## How this service works

Chat completions via Bittensor decentralized AI. Fully OpenAI-compatible. 43+ models (DeepSeek, Qwen, Llama, Mistral). Streaming, function calling, TEE-verified. Drop-in: just change base_url.

## Output

Returns an OpenAI-compatible chat completion object containing the assistant's response message, finish reason, token usage stats, and optionally streamed chunks or function call arguments depending on the request configuration.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "tools": {
   "type": "array"
  },
  "stream": {
   "type": "boolean"
  },
  "messages": {
   "type": "array"
  },
  "max_tokens": {
   "type": "number"
  },
  "temperature": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bittensor-decentralized-ai-chat-completions-69a03333/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
