Skip to content
中文

Retrieve a conversation item

Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.

GET/openai/v1/conversations/{conversation_id}/items/{item_id}● Supported

Official OpenAI docs ↗

Request parameters

  • conversation_idstringrequired

    path:

  • item_idstringrequired

    path:

Returns

200

Reads a single item of a conversation by ID.

Errors follow the OpenAI format — see error codes

Request

curl
# Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
curl https://api.deepraxis.com/openai/v1/conversations/conv_123/items/item_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

item = client.conversations.items.retrieve(
    "item_123",
    conversation_id="conv_123",
)
TypeScript
// Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

const item = await client.conversations.items.retrieve("item_123", {
  conversation_id: "conv_123",
});

Response 200

{
  "type": "message",
  "role": "user",
  "content": [
    {
      "type": "input_text",
      "text": "你好"
    }
  ],
  "id": "item_1482e1c810964bdf900fda01",
  "status": "completed"
}

Response

HTTP 200

The item

application/json

Name Type Description
$ object