DocsGet started
Osarai documentation
Rent a GPU of your own, run an open model on it, and call it with the OpenAI or Anthropic API from your code, your terminal agent or your editor.
Osarai rents a dedicated GPU for you, starts an open model on it (Qwen3.8, gpt-oss and others) and gives you one HTTPS endpoint that speaks three API formats:
- OpenAI Chat Completions at
https://osarai.xyz/v1/chat/completions, the format most tools and SDKs use. - OpenAI Responses at
https://osarai.xyz/v1/responses, used by Codex CLI. - Anthropic Messages at
https://osarai.xyz/v1/messages, used by Claude Code and the Anthropic SDKs.
You pay for GPU time by the hour from a prepaid balance, not per token, and nobody else shares your machine.
- Quickstart Top up, deploy a model and make your first request in about fifteen minutes.
- Coding agents Use your GPU from opencode, Claude Code, Codex CLI, Crush, Aider and more.
- API reference Every endpoint, parameter and response field, with copy-ready examples.
- Models and limits Which model to pick, context sizes, tool calling and reasoning.
How it works
Output
your code / agent ──HTTPS──▶ Osarai API (https://osarai.xyz)
│ checks your API key and balance
│ picks your running instance
▼
your GPU instance (vLLM + the model)- Deploy a model from the dashboard. Osarai rents a GPU, downloads the model and starts it. That takes 10 to 20 minutes the first time.
- Create an API key on the Keys page. Keys start with
qck_. - Point your tool at the base URL below and use the key. Requests reach only your own instances.
Base URL
| API format | Base URL | Authentication |
|---|---|---|
| OpenAI (Chat Completions, Responses) | https://osarai.xyz/v1 | Authorization: Bearer qck_… |
| Anthropic (Messages) | https://osarai.xyz | x-api-key: qck_… or Authorization: Bearer qck_… |
Anthropic clients add /v1/messages themselves, so they take the site address without /v1.
A first request
Terminal
curl "https://osarai.xyz/v1/chat/completions" \
-H "Authorization: Bearer $OSARAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.8-27b",
"messages": [{"role": "user", "content": "Write a haiku about GPUs."}]
}'Python
from openai import OpenAI
import os
client = OpenAI(base_url="https://osarai.xyz/v1", api_key=os.environ["OSARAI_API_KEY"])
reply = client.chat.completions.create(
model="qwen3.8-27b",
messages=[{"role": "user", "content": "Write a haiku about GPUs."}],
)
print(reply.choices[0].message.content)TypeScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://osarai.xyz/v1", apiKey: process.env.OSARAI_API_KEY });
const reply = await client.chat.completions.create({
model: "qwen3.8-27b",
messages: [{ role: "user", content: "Write a haiku about GPUs." }],
});
console.log(reply.choices[0].message.content);