Create conversation items
Call Create conversation first, then replace conv_123 with the returned conv_ ID.
POST
/model/v1/conversations/{conversation_id}/items● SupportedRequest parameters
conversation_idstringrequiredpath: Id of the conversation, the
idof the object returned by createConversation (it looks like conv_...). Another tenant's conversation, an unknown id and a deleted conversation all answer 404 conversation_not_found.itemsarrayrequiredItems to append, between 1 and 20 per request. Router support (supported): Verified to take effect.
Verified to take effect.
Returns
200 list
Appends items to a conversation (up to 20 per call) and returns exactly the appended items.
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Request
curl
# Call Create conversation first, then replace conv_123 with the returned conv_ ID.
curl https://api.deepraxis.com/model/v1/conversations/conv_123/items \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[{"role":"user","content":"你好"}]}'Python
# Call Create conversation first, then replace conv_123 with the returned conv_ ID.
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/model/v1",
api_key="$PRAXIS_API_KEY",
)
items = client.conversations.items.create(
"conv_123",
items=[{"role": "user", "content": "你好"}],
)TypeScript
// Call Create conversation first, then replace conv_123 with the returned conv_ ID.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/model/v1",
apiKey: "$PRAXIS_API_KEY",
});
const items = await client.conversations.items.create("conv_123", {
items: [{ role: "user", content: "你好" }],
});Response 200
{
"object": "list",
"data": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "你好"
}
],
"id": "item_c4f0566ddc4f4208b79a7c9c",
"status": "completed"
}
],
"first_id": "item_c4f0566ddc4f4208b79a7c9c",
"last_id": "item_c4f0566ddc4f4208b79a7c9c",
"has_more": false
}Response
HTTP 200
The items just added
application/json
| Name | Type | Description |
|---|---|---|
| object | string | Object type; always list. |
| data | array<object> | Items of the conversation, in the order the list requested. |
| first_id | string | Id of the first item of this page; null for an empty page. |
| last_id | string | Id of the last item of this page; null for an empty page. |
| has_more | boolean | Whether more items exist beyond this page; pass last_id as after to read them. |