Skip to main content
The HTTP API gives your own software everything the console can do: ask questions, stream answers, manage knowledge and assistants, and read usage.

How to integrate

Call the API from your backend. Your server holds the API key, calls MITHUNAI, and returns answers and citations to your interface. Browsers cannot call the API directly from another origin, and must not hold an API key. The only endpoints designed for browsers on your own site are the widget endpoints.

A minimal integration

Reuse the conversation_id for follow-up questions so the assistant keeps the context of the conversation.

Build a good client

  • Render citations. Link each citation’s title to its url. Verification is most of the value.
  • Treat abstention as a normal answer. Show it as a reply; do not retry it or fall back to another model. Consider offering a “report missing content” action.
  • Stream for people, wait for machines. Use streaming when a person is watching, and the complete-answer endpoint for scripts and jobs.
  • Send an idempotency key with each question so a retry after a network failure returns the original answer rather than asking, and paying, twice.
  • One question at a time per conversation. A second concurrent question in the same conversation is refused with 409.
  • Back off on 429, honouring Retry-After. See Rate limits.
  • Ignore unknown fields and event types. New optional fields can be added within v1.

Next

Authentication

Create and use API keys.

API reference

Every endpoint, with examples.
Last modified on September 26, 2026