curl -X POST https://rhizomeai.com/api/v3/conversations/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: 0c9e5d1b-8f3a-4b7e-a2c6-1d4f7e9b3a52" \
-d '{"message": "Which of them are cardiovascular devices?"}'
import uuid
import requests
conversation_id = "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
response = requests.post(
f"https://rhizomeai.com/api/v3/conversations/{conversation_id}/messages",
headers={"x-api-key": "YOUR_API_KEY", "Idempotency-Key": str(uuid.uuid4())},
json={"message": "Which of them are cardiovascular devices?"},
)
response.raise_for_status()
{
"conversation_id": "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01",
"turn_index": 1,
"status": "running",
"url": "https://rhizomeai.com/ask/v3/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
}
Conversations
Send a follow-up
Ask a follow-up in an existing conversation
POST
/
api
/
v3
/
conversations
/
{conversation_id}
/
messages
curl -X POST https://rhizomeai.com/api/v3/conversations/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: 0c9e5d1b-8f3a-4b7e-a2c6-1d4f7e9b3a52" \
-d '{"message": "Which of them are cardiovascular devices?"}'
import uuid
import requests
conversation_id = "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
response = requests.post(
f"https://rhizomeai.com/api/v3/conversations/{conversation_id}/messages",
headers={"x-api-key": "YOUR_API_KEY", "Idempotency-Key": str(uuid.uuid4())},
json={"message": "Which of them are cardiovascular devices?"},
)
response.raise_for_status()
{
"conversation_id": "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01",
"turn_index": 1,
"status": "running",
"url": "https://rhizomeai.com/ask/v3/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
}
Adds a message to a conversation and returns at once, while the agent works on it. The agent sees the whole conversation, and citation numbers continue from the earlier turns. Reply this way to a
Plus
needs_input turn too. Read the conversation with wait to get the answer.
The conversation must not be running: send the next message once the previous one has finished, or stop it first.
Path parameters
string
required
The conversation’s id.
Headers
string
Makes a retry safe: a second request with the same key returns the turn the
first one created, with
200 instead of 202, and starts nothing. If that
message was stopped, its status is stopped. See Start a
conversation.Request body
string
required
The follow-up message.
Response
202 Accepted when the run started; 200 OK for a retry with an Idempotency-Key already used. Same fields as Start a conversation, with turn_index the new message’s turn.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | invalid_request | A body that isn’t JSON, a missing or empty message, or a bad Idempotency-Key |
| 402 | quota_exhausted | The free plan’s monthly questions are used up |
| 404 | not_found | No conversation with this id in your account |
| 409 | turn_in_flight | The conversation is still running a message |
| 422 | idempotency_key_reused | The key was already used with a different message |
| 429 | concurrent_conversations | 3 conversations are already running. Retry after Retry-After seconds. |
401, 413 and the rate limit’s 429, see Errors.
curl -X POST https://rhizomeai.com/api/v3/conversations/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: 0c9e5d1b-8f3a-4b7e-a2c6-1d4f7e9b3a52" \
-d '{"message": "Which of them are cardiovascular devices?"}'
import uuid
import requests
conversation_id = "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
response = requests.post(
f"https://rhizomeai.com/api/v3/conversations/{conversation_id}/messages",
headers={"x-api-key": "YOUR_API_KEY", "Idempotency-Key": str(uuid.uuid4())},
json={"message": "Which of them are cardiovascular devices?"},
)
response.raise_for_status()
{
"conversation_id": "3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01",
"turn_index": 1,
"status": "running",
"url": "https://rhizomeai.com/ask/v3/3b1f8c6e-2a4d-4c1e-9f2a-7d5e6b8c9a01"
}