One OpenAI-compatible endpoint for every model.
Anything that works with OpenAI works here: change the base URL and the key. Each request is routed across models from several providers, and moves to the next one when a model is rate limited, down or slow.
Private preview · Free models at 15/min, 400/day on a new account
from openai import OpenAI client = OpenAI( + base_url="http://localhost:4321/v1", + api_key=os.environ["SCOUTCODE_KEY"], ) res = client.chat.completions.create( model="auto", messages=[{"role": "user", "content": "Hello!"}], )
curl http://localhost:4321/v1/chat/completions \
-H "Authorization: Bearer $SCOUTCODE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{ "role": "user", "content": "Hello!" }]
}'When a model fails, the next one answers.
A request makes up to 10 upstream attempts. Streams wait for the first chunk before committing to a model, so a failure before the first token never reaches you.
- Attempt 1Rate limited, moves on
- Attempt 2No first token in 30 seconds, moves on
- Attempt 3Answered
Name a model, or let the route choose.
The model field never has to change for a tool to work. Call GET /models to see what's available to you.
auto- The server’s route: an ordered list of presets, tried top to bottom until one answers.
gpt-oss-120b- A preset by id or name. Its provider models go first, then usually the auto route if they all fail.
gpt-4o- Unknown names, like a tool’s default model, are treated as auto rather than rejected.
Every answer says who served it.
Response headers name the preset and provider that answered, how many attempts it took, what the request cost and what your account has left. Streams from token-priced models leave out the cost and balance, since they're charged after the headers are sent.
x-scoutcode-preset gpt-oss-120b x-scoutcode-provider groq x-scoutcode-attempts 3 x-scoutcode-cost 0.002 x-scoutcode-balance 4.998
Pay only for answered requests.
Free models cost nothing and have request limits instead. Paid models are priced per request, per million tokens or both, at the price of the model that answered. Failed requests are free.
During the private preview, the operator adds money to accounts. See every price.
- Free, new account
- 15/min, 400/day
- Free, account with money
- 40/min, 5,000/day
- Paid models
- Priced per model.
autoskips the ones your account can't afford
Works in the tools you already use.
Cline, Roo Code, Kilo Code, Continue, Aider, and anything else with an OpenAI-compatible provider option. Setup for each.
aider --openai-api-base http://localhost:4321/v1 \
--openai-api-key <your key> \
--model openai/autoOPENAI_BASE_URL=http://localhost:4321/v1 OPENAI_API_KEY=<your key>
More than chat completions.
Streaming
Server-sent events in the OpenAI format. A stream that fails before its first token still falls back.
Tool calling
The OpenAI function format. Requests with tools skip models known not to support them.
Images
Send image parts in the message content, and the request goes to vision models first.
Batches
Up to 5,000 chat requests in one call, worked through in the background for you to collect later.
Speech to text
Send a multipart form or raw audio to /audio/transcriptions and get the text back, using Deepgram.
Image generation
Experimental: send a prompt to /images/generations and get images back, made by the image models the admin added from OpenRouter.
Jev decisions
Send text and typed questions to TypeSafe’s decision model, and get structured answers with probabilities.
Command review
The safety check behind Scout’s auto mode: ask whether a shell command should be held for a person.
Calls from the browser
The API allows cross-origin requests, and its response headers are exposed through CORS.
Questions
What happens to my requests?
ScoutCode doesn't write request contents to its database. It holds each one in memory for 10 minutes for the request log, and the model's provider handles it under its own terms.
What if every model is busy?
You get a 429 with a Retry-After header. The official OpenAI SDKs retry it automatically, twice by default.
What if a stream breaks partway?
ScoutCode can't switch models once tokens are flowing, so the stream simply ends. Check for [DONE] or a finish_reason if completeness matters.
Want a coding agent instead? Scout is our harness for Windows, with the tools, permissions and undo around any model on this API.
Meet Scout →