Create a conversation
POST
/openai/v1/conversations● SupportedRequest body
itemsarrayoptionalVerified to take effect.
metadataobjectoptionalVerified to take effect.
Returns
200 conversation
Creates a conversation, optionally with initial items (up to 20 at a time) and metadata. Conversations are partitioned by tenant; only the creating tenant can reference it.
Errors follow the OpenAI format — see error codes
Request
curl
curl https://api.deepraxis.com/openai/v1/conversations \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metadata":{"topic":"example"}}'Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/openai/v1",
api_key="$PRAXIS_API_KEY",
)
conversation = client.conversations.create(
metadata={"topic": "example"},
)TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/openai/v1",
apiKey: "$PRAXIS_API_KEY",
});
const conversation = await client.conversations.create({
metadata: { topic: "example" },
});Response 200
{
"id": "conv_b667b1f286494a5e8a735d50",
"object": "conversation",
"created_at": 1790319260,
"metadata": {
"topic": "example"
}
}Response
HTTP 200
The created conversation
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Id of the conversation, such as conv_...; use it as conversation_id in conversation calls and as conversation in createResponse. |
| object | string | Object type; always conversation. |
| created_at | integer | Unix time in seconds at which the conversation was created. |
| metadata | object | Up to 16 string key/value pairs; keys at most 64 characters and values at most 512. |