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