Guides

From first call to production confidence

Practical, opinionated guides for the patterns that matter: structured output, routing strategies, safe retries, batch processing and spend control.

Proven patterns

for common workloads

Real request shapes

using the actual API

Production ready

retries, limits and spend

The problem

What is slowing you down today

Toy examples

Hello-world demos rarely survive contact with real traffic.

Scattered advice

Best practices live in threads, posts and old tickets.

Surprises at scale

Retries, limits and costs only show up when volume does.

Capabilities

Everything you need, nothing you don't

Structured output

Ask for JSON with named fields, set temperature to 0, and validate before you store.

Routing strategies

When to send a capability, when to pin a model_id, and when to set an account default.

Safe retries

Retry 429, 502 and 503 with backoff and the same Idempotency-Key.

Batch processing

Pace workers under your rate limit and key each item for idempotent metering.

Prompt hygiene

Stable prompts get cache hits. Keep variable data at the end and boilerplate consistent.

Spend control

Cap max_tokens, use lower-priced models for routine work and watch the usage dashboard.

Use cases

What teams run on it

01

Document extraction

From raw text to validated JSON.

02

Support assist

Draft replies grounded in your own policy text.

03

Agent workflows

A model per step, with fail-over and cost per step.

04

Content at scale

Batch generation with predictable cost.

How it works

From sign-up to production

  1. 1

    Pick a guide

    Start with the workload closest to yours.

  2. 2

    Try it in the playground

    Run the prompts before writing code.

  3. 3

    Ship it

    Copy the request shape into your integration.

Control

Built so you stay in charge

Keys you control

API keys are shown once at creation and stored only as a hash. Revoke any key instantly from Settings.

Spend you can see

Every request carries its own receipt: tokens in, tokens out, latency and price. Nothing is billed that you cannot trace.

Limits you set

Per-account rate limits and a free monthly allowance keep experiments safe before they become production.

Data you decide on

You choose exactly what you send. Repeat prompts can be served from your cache, and cache hits are never billed.

For developers

One endpoint. Every model.

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"}'

Questions, answered

Do the guides use the real API?

Yes. Every example uses POST /api/ainf/inference with the real body fields and headers.

Are the guides language-specific?

No. The API is plain HTTPS and JSON, so the patterns apply to any language.

Where do I start?

With the quickstart, then the guide closest to your workload.

Can I request a guide?

Yes. Email our team with the workload you want covered.

Learn the patterns, ship the feature

Start with the quickstart and build from there.