Documentation

Chat completions, locked to a schema.

InferAPI speaks the chat-completions shape you already use. Point the client at our base URL, pass a JSON schema (or a Zod schema via the SDK), and read typed fields — with optional confidence and bounding boxes.

POST https://api.inferapi.quest/v1/chat/completions

Modalities

Message content may be text, image_url, audio, file, or video. Mix them in one turn when a document and a spoken note belong together.

Structured output

Set response_format to a JSON Schema. The SDK helper responseFormat(schema, name) wraps Zod or JSON Schema for you.

Verifiable fields

Ask for value, confidence, and bounds on each field when you need a crop or a reject threshold — not just a string.

Minimal request

curlv1/chat/completions
curl https://api.inferapi.quest/v1/chat/completions \
  -H "Authorization: Bearer $INFERAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role":"user","content":"Extract family_name from this ID"}
    ],
    "response_format": {"type":"json_schema","json_schema":{"name":"id"}}
  }'
messages + schema InferAPI { fields }

Guardrails

Per-key policy packs cover violent crime, sexual content, self-harm, PII, and election claims for both text and images. Turn packs on in the dashboard request when you write founder@inferapi.quest.

Tools

Optional sandboxes and headless browsing attach to a completion when a field is computed or fetched, not read from pixels. See the SDK for the TypeScript and Python clients.