Skip to main content
A conversation is the same thing as a conversation on rhizomeai.com: you send a question, Rhizome’s research agent searches the regulatory corpus, and you get back a cited answer, plus any reports or files it wrote. You can then ask follow-ups in the same conversation. Conversations started through the API appear in your account on rhizomeai.com, and conversations started there can be continued through the API. A research run takes 1 to 10 minutes, so the API is asynchronous:
  1. Start a conversation. The call returns in about a second with a conversation_id and status: "running".
  2. Read the conversation with wait=45 until status is no longer running. Each call holds up to 45 seconds and returns as soon as the run ends.
  3. Read the answer and citations from the last turn. Fetch documents the agent wrote, if any.
  4. Send a follow-up and poll again.
Nothing depends on keeping a connection open: the run continues on Rhizome’s side whatever your client does. To cancel one, stop it.

Statuses

A conversation’s status is its latest message’s status.

Answers and citations

answer is markdown. Citations appear in it as [1], [2], matching the index of an entry in the turn’s citations. Citation numbers continue across the turns of a conversation. A link of the form doc:<id> in an answer points at an entry in the conversation’s documents. Each citation gives the source document’s name, dataset, date and page, and a url that opens the source in the conversation on rhizomeai.com.

Retries and idempotency

Send an Idempotency-Key header with each message to make retries safe. If a request times out and you retry it with the same key, you get the conversation or turn the first request created instead of a second run. Keys are scoped to your account; use a new one, such as a UUID, for each message. Reusing a key with a different message is a 422.

Plans and limits

Runs use the plan of the API key’s owner, as on rhizomeai.com: on a free plan each message counts against the monthly question limit, and a message over the limit is a 402. Downloading Word, Excel and PowerPoint files needs a paid plan. An account can have 3 conversations running at once, counting those started on rhizomeai.com. A message that would start a fourth is a 429 with code concurrent_conversations and a Retry-After header; send it again once a run finishes. Request bodies are JSON, up to 1 MB.

Errors

Errors return {"error": {"code", "message", "field", "request_id"}}, as on every API v3 endpoint; field names the value at fault when there is one. Every response has an X-Request-Id header. See Errors.

Example

Python