cli/resources/conversations/methods/retrieve/index.md +0 −53 deleted
File Deleted View Diff
1## Retrieve a conversation
2
3`$ openai conversations retrieve`
4
5**get** `/conversations/{conversation_id}`
6
7Get a conversation
8
9### Parameters
10
11- `--conversation-id: string`
12
13 The ID of the conversation to retrieve.
14
15### Returns
16
17- `conversation: object { id, created_at, metadata, object }`
18
19 - `id: string`
20
21 The unique ID of the conversation.
22
23 - `created_at: number`
24
25 The time at which the conversation was created, measured in seconds since the Unix epoch.
26
27 - `metadata: unknown`
28
29 Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
30 Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
31
32 - `object: "conversation"`
33
34 The object type, which is always `conversation`.
35
36### Example
37
38```cli
39openai conversations retrieve \
40 --api-key 'My API Key' \
41 --conversation-id conv_123
42```
43
44#### Response
45
46```json
47{
48 "id": "id",
49 "created_at": 0,
50 "metadata": {},
51 "object": "conversation"
52}
53```