Engineering

Streaming, budgets and receipts.

By James Miano. Published 27 October 2026.

Streaming

POST /v1/agent/chat/completions now accepts stream: true. It returns Server-Sent Events, masks the upstream model, and emits a final receipt event with usage and cost. Agent chat is still capped at 4,096 output tokens. MCP and A2A remain non-streaming.

Budgets

Agent-created keys accept daily_cap_usd and monthly_cap_usd. A key over its cap returns HTTP 402 before the upstream call runs. The same cap can be updated later with POST /v1/agents/keys/{id}/budget.

Receipts

A quote returns a quote_id. Pass it to the call with quote_id or X-Fikra-Quote-Id. The response carries a receipt id, and GET /v1/agent/receipts/{id} returns the model, usage, quoted price and actual cost. Receipts do not contain prompt or response bodies.

SDKs

Python and TypeScript clients cover quotes, streaming, receipts, agent account creation and per-key budgets. See /sdk.

The quote endpoint itself is paid, like the call. A quote is valid for 10 minutes and is bound to the account or payer that requested it.