01 · FIRST REQUEST
Start with cURL
Anonymous traffic needs no API key. Signed-in traffic uses a key created on the account page.
curl https://andy.mindcraft-ce.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer andy_YOUR_KEY" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Explain redstone simply."}],
"max_tokens": 800
}'
Routes
GET /api/v1/modelsPOST /api/v1/chat/completionsPOST /api/v1/responsesThe same routes under /v1 remain available for compatibility. New integrations should prefer /api/v1.
02 · CLIENT LIBRARIES
Use OpenAI-compatible SDKs
Python
from openai import OpenAI
client = OpenAI(
base_url="https://andy.mindcraft-ce.com/api/v1",
api_key="andy_YOUR_KEY",
)
result = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Hello!"}],
max_tokens=800,
)
print(result.choices[0].message.content)JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://andy.mindcraft-ce.com/api/v1",
apiKey: "andy_YOUR_KEY",
});
const result = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Hello!" }],
max_tokens: 800,
});
console.log(result.choices[0].message.content);03 · ROUTING
Models and auto
auto tries enabled models in the exact order shown below. Retryable provider failures move to the next candidate inside the same request. A concrete model ID pins that model and does not use the alias chain.
Loading the live loadout…
model field inside an upstream response may contain the provider’s ID. Use X-Andy-Model to see which public model actually handled the request, and X-Andy-Attempted-Models when all candidates fail.Context and output
The context window is the total room for input plus generated output. Set max_tokens or max_output_tokens explicitly; asking for an unnecessarily large output can leave too little room for the prompt and make an auto candidate ineligible.
04 · LIVE POLICY
Rate limits
Rate limits control request speed. Authenticated traffic must satisfy both its account tier and the registered-network limit; the stricter value wins.
Loading active limits…
A zero or omitted value means unlimited for that field. Concurrent limits cap requests that are in flight, not requests per time window.
05 · ALLOWANCE
Usage quotas
Quotas are separate from rate limits. They track rolling session, UTC daily, and UTC weekly allowance. Account and per-key self-imposed caps can only tighten the tier allowance.
Loading active quotas…
Request multiplier
A model’s multiplier affects request units only. At 2×, one successful request consumes 2 request units in every active quota window. At 0.5×, two successful requests consume 1 unit total. Token usage is never multiplied—it uses the provider’s reported input and output tokens.
10,000 tokens → 10,000 tokens
10,000 tokens → 10,000 tokens
10,000 tokens → 10,000 tokens
Quota admission is preflight-only. The final admitted request can pass a token ceiling because its exact token count is known only after the provider responds.
06 · SSE
Streaming
Set "stream": true for OpenAI-style server-sent events. For authenticated requests Andy asks the provider to include a final usage frame so token quotas remain accurate. If the provider omits it, a conservative preflight estimate is booked.
curl "https://andy.mindcraft-ce.com/api/v1/chat/completions" \
-H "Authorization: Bearer andy_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","stream":true,"max_tokens":800,
"messages":[{"role":"user","content":"Write a haiku."}]}'
A failure before the first SSE frame can fail over. Once response bytes reach the client, a mid-stream provider failure cannot be replayed safely.
07 · INPUT SAFETY
Images and moderation
Text and image inputs are screened before generation. Choose a model whose live metadata declares image input. Audio, video, uploaded files, and file IDs are rejected because they cannot be inspected by the current safety path.
Moderation fails closed: if the safety provider is unavailable or returns an unreadable verdict, the generation provider is not contacted.
08 · DEBUGGING
Error reference
rate_limit_exceededToo many requests or too much concurrency. Retry after the returned interval.quota_exceededA session, daily, weekly, account, or key allowance is exhausted.unsupported_modalityThe chosen model does not accept one of the submitted input types.context_length_exceededEstimated input plus requested output does not fit the selected candidate.moderation_unavailableSafety screening could not produce a trustworthy verdict. Retry later.all_models_failedEvery candidate in an alias or fallback chain returned a retryable failure.09 · DATA
What usage data contains
Public metrics store only hour, public model, endpoint, request count, and successful response count. Private account analytics add account/key identifiers, request units, and input/output token totals. Neither system stores prompt text, response text, raw IPs, emails in public metrics, API secrets, or request bodies.
API key secrets are returned once. Only keyed hashes are stored, so a key cannot be recovered later—create a replacement if it is lost.