Authorization: Bearer mithunai_sk_…, and answers stream as standard server-sent events, so the HTTP client you already have is enough. A package named @mithunai/sdk on npm or mithunai on PyPI is not published by MITHUNAI; do not install one expecting it to be.
Ask a question and stream the answer
Two calls: create a conversation with an assistant, then post the question to its:stream endpoint. The stream ends with exactly one terminal event, answer.completed, answer.interrupted or answer.error.
ask() helper in Python and Node.js.
What a library would have done for you
Handle these in your own client:- Retries. Retry
429after theRetry-Afterheader, and retry network failures with the sameidempotency_key, so a repeated question returns the stored answer instead of asking twice. See Rate limits. - Errors. Every error body is
{"code": …, "message": …}with a stablecode. See Errors. - Types. The request and response fields are listed on each API reference page. Ignore fields and event types you do not recognise; new optional ones can be added within
v1. - Abstention.
abstained: trueis a successful answer, not an error. Show it; do not retry it.