Chabi

Developer Reference

Requests

Call any model with the official SDKs: chat, images, web search and JSON output.

Updated November 2026

Requests

Chabi speaks two APIs: OpenAI's Chat Completions at https://chabi.dev/v1/chat/completions for GPT models and every other vendor's models (ids like vendor/model), and Anthropic's Messages at https://chabi.dev/v1/messages for Claude models. Use the official SDKs. Each example comes two ways: SDK, where chabi is your signed-in @chabi/js client and supplies Chabi's address and the user's token, and Plain, with the user's token as the API key, for apps that sign in by hand.

GPT models: the OpenAI SDK

With @chabi/js

import OpenAI from "openai"; const client = new OpenAI({  ...chabi.openai(),  dangerouslyAllowBrowser: true,   // the token only spends this user's credits in this app}); const stream = await client.chat.completions.create({  model: "gpt-6-luna",          // you choose; Chabi never swaps it  messages,  max_completion_tokens: 4096,  // reasoning counts toward this too  reasoning_effort: "none",  stream: true,});

Without the SDK: the user's token as the API key

import OpenAI from "openai"; const client = new OpenAI({  baseURL: "https://chabi.dev/v1",  apiKey: userToken,  dangerouslyAllowBrowser: true,   // the token only spends this user's credits in this app}); const stream = await client.chat.completions.create({  model: "gpt-6-luna",          // you choose; Chabi never swaps it  messages,  max_completion_tokens: 4096,  // reasoning counts toward this too  reasoning_effort: "none",  stream: true,});

Claude models: the Anthropic SDK

With @chabi/js

import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({  ...chabi.anthropic(),  dangerouslyAllowBrowser: true,}); const stream = client.messages.stream({  model: "claude-sonnet-5-5",  max_tokens: 4096,             // thinking counts toward this too  output_config: { effort: "low" },  messages,});

Without the SDK: the user's token as the API key

import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({  baseURL: "https://chabi.dev",  apiKey: userToken,  dangerouslyAllowBrowser: true,}); const stream = client.messages.stream({  model: "claude-sonnet-5-5",  max_tokens: 4096,             // thinking counts toward this too  output_config: { effort: "low" },  messages,});

Other makers' models: chabiAI

DeepSeek, Mistral, Llama, Qwen and every other maker's model (ids like vendor/model, all on the models page) speak OpenAI's API. chabiAI from @chabi/js/ai makes that client for you. It's the official OpenAI client underneath, so streaming, tools and types work as its docs say; it needs openai installed. Without the SDK, use the OpenAI SDK with the base URL and key, as for GPT.

With @chabi/js

import { chabiAI } from "@chabi/js/ai"; const client = chabiAI(chabi); const reply = await client.chat.completions.create({  model: "deepseek/deepseek-v4-flash",  messages,  max_tokens: 4096,}); const image = await client.images.generate({  model: "black-forest-labs/flux-3-image",  prompt: "A brass key on a gold circle, flat illustration",});                             // image.data[0].b64_json

Without the SDK: the user's token as the API key

import OpenAI from "openai"; const client = new OpenAI({  baseURL: "https://chabi.dev/v1",  apiKey: userToken,  dangerouslyAllowBrowser: true,}); const reply = await client.chat.completions.create({  model: "deepseek/deepseek-v4-flash",  messages,  max_tokens: 4096,}); const image = await client.images.generate({  model: "black-forest-labs/flux-3-image",  prompt: "A brass key on a gold circle, flat illustration",});                             // image.data[0].b64_json

Any language: plain HTTP

curl https://chabi.dev/v1/chat/completions \  -H "Authorization: Bearer $USER_TOKEN" \  -H "Content-Type: application/json" \  -d '{"model": "gpt-6-luna", "messages": [{"role": "user", "content": "Hi"}]}'

JSON output

Use each provider's structured outputs; Chabi passes them through. Still check the parsed result in your code.

// OpenAIresponse_format: {  type: "json_schema",  json_schema: { name: "quiz", schema, strict: true },}, // Anthropic: format sits next to effortoutput_config: {  effort: "low",  format: { type: "json_schema", schema },},
  • Everything else in the request goes to the provider as you sent it, so each provider's docs apply. Check MODEL NOTES for what each model accepts.
  • Every model listed reasons before it answers, and that reasoning counts toward max_tokens / max_completion_tokens. Leave room for it, or replies come back cut off or empty.
  • OpenAI: max_tokens is accepted and sent on as max_completion_tokens, which these models require. Only n: 1 is supported.
  • Anthropic: custom tools and web search ({ type: "web_search_20260209", name: "web_search" }) work. max_uses defaults to 5 and can be at most 10. Anthropic's other hosted tools (web fetch, code execution…) and speed, fallbacks, service_tier, inference_geo, mcp_servers, container are refused for now (container is allowed alongside web search).
  • OpenAI web search: use the Responses API, client.responses.create on the same base URL (POST https://chabi.dev/v1/responses), with tools: [{ type: "web_search" }]. Function tools work there too. max_tool_calls defaults to 5 and can be at most 10 with web search. background, previous_response_id, conversation, prompt, service_tier are refused and store is always off, so send the whole conversation in input each time. Web search isn't available on chat-latest or fine-tuned models.
  • GET https://chabi.dev/v1/models lists the models, each with a modality: chat, image, transcription or speech. GET https://chabi.dev/v1/credits returns the signed-in user's balance_credits, and GET https://chabi.dev/v1/me their display name (or null), so your app can show which Chabi account it's using. Apps never get the user's email.

Model notes

Every plan includes every model. You choose the model; Chabi never swaps it for another. See all models.

ModelEndpointCredits per 1M tokens, input / outputRequest notes
gpt-6-astra/v1/chat/completions1,500 / 7,500reasoning_effort low to max (not none). Tool calling needs OpenAI's Responses API, which Chabi doesn't serve yet. Requests over 272K input tokens cost 3,000 / 11,250.
gpt-6.1-sol/v1/chat/completions300 / 1,500reasoning_effort low, medium (default), high, xhigh or max; not none. Tool calling needs the Responses API. Requests over 272K input tokens cost 600 / 2,250.
gpt-6.1-terra/v1/chat/completions150 / 750reasoning_effort none to max (default medium); with none it takes temperature and top_p. Strong on images and technical drawings. Tool calling needs the Responses API.
gpt-6-luna/v1/chat/completions15 / 75reasoning_effort none to max (default medium). Function calling only with reasoning_effort none. Requests over 272K input tokens cost 30 / 112.5.
gpt-5.6-sol/v1/chat/completions750 / 4,500reasoning_effort none to max (default medium). Requests over 272K input tokens cost 1,500 / 6,750.
chat-latest/v1/chat/completions750 / 4,500OpenAI's current ChatGPT model. It changes when OpenAI updates it.
claude-fable-5-1/v1/messages1,500 / 7,500Thinking is always on: leave out thinking, set depth with output_config.effort. Long turns on hard tasks.
claude-opus-5-5/v1/messages600 / 3,000Thinking is always on; output_config.effort defaults to medium. tool_choice any or tool is refused.
claude-sonnet-5-5/v1/messages300 / 1,500Thinking is on unless you send thinking: { type: "between_tools" } (effort high or below, no other thinking fields). Effort defaults to high. tool_choice any or tool is refused.
claude-haiku-5-5/v1/messages15 / 75Thinking is on unless you send thinking: { type: "disabled" } (effort high or below). Effort defaults to medium. Requests over 100K input tokens cost 75 / 375.

None of these models take temperature or top_p while reasoning. The simplest request works on every Claude model: leave out thinking and set output_config.effort. Only Sonnet and Haiku can turn thinking off, each in its own way (see the notes above); the others refuse thinking: { type: "disabled" }.

Models from 44 other makers (214 chat models, such as aion-labs/…, amazon/…, baidu/…, bytedance-seed/…, bytedance/…) and 59 image models are served through OpenRouter, billed by what each request actually cost. See them all with prices.

Speech to text is charged by the minute of audio instead (see SPEECH TO TEXT):

ModelEndpointCredits per minute of audio
gpt-transcribe/v1/audio/transcriptions0.675 (about 40 an hour)
gpt-realtime-2.1-mini/v1/audio/speechabout 3.77 a minute of speech
gpt-realtime-2.1/v1/audio/speechabout 13.14 a minute of speech