Toy examples
Hello-world demos rarely survive contact with real traffic.
Guides
Practical, opinionated guides for the patterns that matter: structured output, routing strategies, safe retries, batch processing and spend control.
for common workloads
using the actual API
retries, limits and spend
The problem
Hello-world demos rarely survive contact with real traffic.
Best practices live in threads, posts and old tickets.
Retries, limits and costs only show up when volume does.
Capabilities
Ask for JSON with named fields, set temperature to 0, and validate before you store.
When to send a capability, when to pin a model_id, and when to set an account default.
Retry 429, 502 and 503 with backoff and the same Idempotency-Key.
Pace workers under your rate limit and key each item for idempotent metering.
Stable prompts get cache hits. Keep variable data at the end and boilerplate consistent.
Cap max_tokens, use lower-priced models for routine work and watch the usage dashboard.
Use cases
From raw text to validated JSON.
Draft replies grounded in your own policy text.
A model per step, with fail-over and cost per step.
Batch generation with predictable cost.
How it works
Start with the workload closest to yours.
Run the prompts before writing code.
Copy the request shape into your integration.
Control
API keys are shown once at creation and stored only as a hash. Revoke any key instantly from Settings.
Every request carries its own receipt: tokens in, tokens out, latency and price. Nothing is billed that you cannot trace.
Per-account rate limits and a free monthly allowance keep experiments safe before they become production.
You choose exactly what you send. Repeat prompts can be served from your cache, and cache hits are never billed.
For developers
Send a prompt and a capability, or name a model. One bearer key, one small JSON body, and a full receipt on every response.
curl https://YOUR-DOMAIN/api/ainf/inference \
-H "Authorization: Bearer $AI_INFERENCE_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"prompt":"Summarise this ticket in one line","capability":"chat"}'Yes. Every example uses POST /api/ainf/inference with the real body fields and headers.
No. The API is plain HTTPS and JSON, so the patterns apply to any language.
With the quickstart, then the guide closest to your workload.
Yes. Email our team with the workload you want covered.
Start with the quickstart and build from there.