Cobble is an OpenAI-compatible inference API. If your code or tools speak to OpenAI, they speak to Cobble — change the base URL and key, and you're running on recycled silicon and renewable energy.
You'll make your first request in about two minutes.
1. Get your API key
Create a key in the dashboard under API Keys. Store it as an environment variable — never hard-code it:
export COBBLE_API_KEY="sk-cobble-..."2. Point at the API
Everything lives under one base URL:
https://api.cobble.network/v1Standard OpenAI-compatible routes: /v1/chat/completions, /v1/models, /v1/embeddings.
3. Make your first request
curl https://api.cobble.network/v1/chat/completions \
-H "Authorization: Bearer $COBBLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.6-27b",
"messages": [{"role": "user", "content": "Say hello from Cobble."}]
}'If you get a JSON response with a choices array, you're live. If not, see Troubleshooting below.
Use an SDK
Any OpenAI SDK works — just override the base URL.
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.cobble.network/v1",
api_key=os.environ["COBBLE_API_KEY"],
)
response = client.chat.completions.create(
model="qwen/qwen3.6-27b",
messages=[{"role": "user", "content": "Say hello from Cobble."}],
)
print(response.choices[0].message.content)JavaScript / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.cobble.network/v1",
apiKey: process.env.COBBLE_API_KEY,
});
const response = await client.chat.completions.create({
model: "qwen/qwen3.6-27b",
messages: [{ role: "user", content: "Say hello from Cobble." }],
});
console.log(response.choices[0].message.content);Streaming, tool calling, and JSON mode all work through the standard OpenAI request parameters (stream: true, tools, response_format).
Connect a coding agent
Cobble works with the major open coding agents out of the box:
- opencode — terminal coding agent, our recommended starting point
- Hermes Agent — auto-discovers the full Cobble catalog
- OpenClaw — personal AI assistant
- Cursor — chat panel integration (read the caveat first)
How limits work
Your plan covers chat requests inside a rolling 5-hour window — unmetered, no per-token counting. Requests beyond the window, plus OCR and embeddings, draw from your wallet at the published API rates. You control a spend cap in the dashboard; with no wallet spending enabled, requests past the window return 429 until the window rolls forward.
Troubleshooting
| Response | Meaning | Fix |
|---|---|---|
401 | Key missing or malformed | Check the Authorization: Bearer header and that the env var is set in the shell your tool runs from |
403 | Key valid, model not on your plan | Check your plan's model list, or enable wallet spending |
404 on model | Model ID doesn't match the catalog | Run curl https://api.cobble.network/v1/models -H "Authorization: Bearer $COBBLE_API_KEY" and copy the ID exactly |
429 | Window exhausted or concurrency limit hit | Wait for the window to roll, enable wallet spillover, or upgrade your plan |
500 | Something on our side | Retry with backoff; check the status page |
Still stuck? Contact us — include the request ID from the error response.
