Developers

BREAD for your agents.

The same models as the chat, from your own code. The API speaks OpenAI's format, so any OpenAI client, agent framework or tool works by changing two settings: the base URL and the key.

Base URL
api.breadai.io/v1
Chat price
A$0.001 / 1K tokens
Free trial
500,000 tokens
Paid in
BREAD

Quick start

  1. Create a developer account on the developer dashboard (or use your chat account) and link a Phantom wallet there.
  2. Create an API key on the dashboard and copy it; it is shown once. Your first key comes with a free trial of 500,000 tokens, one per wallet.
  3. Point any OpenAI client at the base URL below with your key.
  4. To keep going after the trial, turn on BREAD payments on the dashboard. Calls are then charged to your wallet in BREAD, and the dashboard shows what each one cost.
curl
curl https://api.breadai.io/v1/chat/completions \
  -H "Authorization: Bearer $BREAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bread-auto",
    "messages": [{"role": "user", "content": "Summarise why bread rises in one sentence."}]
  }'
Python (openai package)
from openai import OpenAI

client = OpenAI(base_url="https://api.breadai.io/v1", api_key="bread_sk_...")

reply = client.chat.completions.create(
    model="bread-auto",   # the best model with a free host; or name one, e.g. bread-chat-27b
    messages=[{"role": "user", "content": "Summarise why bread rises in one sentence."}],
)
print(reply.choices[0].message.content)
JavaScript (openai package), streaming
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.breadai.io/v1", apiKey: process.env.BREAD_API_KEY });

const stream = await client.chat.completions.create({
  model: "bread-chat-8b",
  messages: [{ role: "user", content: "Write a haiku about sourdough." }],
  stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
Tool calling (Python)
from openai import OpenAI
import json

client = OpenAI(base_url="https://api.breadai.io/v1", api_key="bread_sk_...")
tools = [{"type": "function", "function": {
    "name": "get_weather",
    "description": "Current weather for a city",
    "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
}}]
messages = [{"role": "user", "content": "What's the weather in Sydney?"}]

reply = client.chat.completions.create(model="bread-chat-8b", messages=messages, tools=tools)
call = reply.choices[0].message.tool_calls[0]
args = json.loads(call.function.arguments)          # {"city": "Sydney"}

result = {"temp": 22, "sky": "sunny"}                # your code runs the tool, not BREAD
messages += [reply.choices[0].message, {"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)}]
final = client.chat.completions.create(model="bread-chat-8b", messages=messages, tools=tools)
print(final.choices[0].message.content)
JSON mode (Python)
reply = client.chat.completions.create(
    model="bread-chat-8b",
    response_format={"type": "json_object"},
    messages=[{"role": "user", "content": "Classify: 'the crust was perfect'. Reply as JSON with sentiment and score."}],
)
data = json.loads(reply.choices[0].message.content)   # {"sentiment": "positive", "score": 0.95}

Models and pricing

Prices are fixed in Australian cents and paid in BREAD at the live price, so the cost of a call doesn't move with the token.

bread-autoRecommended. The best chat model with a free host when your request is routed: Pro 27B, then 12B, then 8B (a vision model when you send images). The reply's bread.model says which answered. Same price.
bread-chat-8bLlama 3.1 8B, 8K context. A$0.001 per 1,000 tokens (prompt and reply).
bread-vision-7bQwen2.5-VL 7B, reads images, 8K context. A$0.0005 per 1,000 tokens plus A$0.002 per image. Send images as base64 data URLs.
bread-code-7bQwen2.5-Coder 7B, for code and coding agents, 16K context. A$0.001 per 1,000 tokens.
bread-chat-12bGemma 4 12B, a stronger all-rounder that also reads images, 16K context. Served by 12 GB cards and up. A$0.001 per 1,000 tokens.
bread-code-9bOrnith 9B, built for coding agents, 16K context. Served by 12 GB cards and up. A$0.001 per 1,000 tokens.
bread-chat-27bQwen 3.6 27B (Bread Pro), near-frontier reasoning, code and images, 16K context. Served by 24 GB cards. A$0.001 per 1,000 tokens.
bread-code-27bQwen 3.6 27B Coding (Bread Code Pro), the strongest coding model here, 16K context. Served by 24 GB cards. A$0.001 per 1,000 tokens.

Bigger models run on hosts with bigger cards; if none is online for a model you get a 503 at once, so try a smaller one or bread-auto. GET /v1/models lists every model with available, online_hosts and free_hosts right now. Every response carries the usual usage block plus a bread field with the job id and its cost in BREAD.

What works today

Supported
  • POST /v1/chat/completions, streaming and non-streaming
  • system, user and assistant messages; developer is treated as system
  • max_tokens or max_completion_tokens (up to 4,096), temperature
  • stream_options.include_usage
  • Tool calling: tools, tool_choice, tool results
  • JSON mode: response_format json_object and json_schema
  • Images on bread-vision-7b as base64 data URLs
  • GET /v1/models
Not yet
  • Parallel requests per call (n greater than 1), logprobs
  • The legacy functions field (use tools)
  • Image URLs (send the image itself as a data URL)

Unsupported options get a clear 400 error, never a silent wrong answer.

Tool calls come from independent GPU hosts. BREAD checks each one against the tools you declared, but treat them as untrusted input: confirm anything that moves money or deletes data. Hosts can see prompts and tool results, so don't send secrets.

Limits and errors

Rate30 requests a minute and 2 at a time, per key. BREAD runs on independent GPUs, so capacity grows as hosts join.
401Missing, unknown or revoked key.
402No wallet linked, or the trial is used up and the wallet can't pay: approve more BREAD in BREAD payments.
429Over the rate or concurrency limit. Wait and retry.
503No GPU node was free in time. Retry shortly.

Errors use OpenAI's format ({ error: { message, type, code } }), so SDKs handle them as usual.