cli/resources/models/index.md +0 −187 deleted
File Deleted View Diff
1# Models
2
3## List models
4
5`$ openai models list`
6
7**get** `/models`
8
9Lists the currently available models, and provides basic information about each one such as the owner and availability.
10
11### Returns
12
13- `ListModelsResponse: object { data, object }`
14
15 - `data: array of Model`
16
17 - `id: string`
18
19 The model identifier, which can be referenced in the API endpoints.
20
21 - `created: number`
22
23 The Unix timestamp (in seconds) when the model was created.
24
25 - `object: "model"`
26
27 The object type, which is always "model".
28
29 - `owned_by: string`
30
31 The organization that owns the model.
32
33 - `object: "list"`
34
35### Example
36
37```cli
38openai models list \
39 --api-key 'My API Key'
40```
41
42#### Response
43
44```json
45{
46 "data": [
47 {
48 "id": "id",
49 "created": 0,
50 "object": "model",
51 "owned_by": "owned_by"
52 }
53 ],
54 "object": "list"
55}
56```
57
58## Retrieve model
59
60`$ openai models retrieve`
61
62**get** `/models/{model}`
63
64Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
65
66### Parameters
67
68- `--model: string`
69
70 The ID of the model to use for this request
71
72### Returns
73
74- `model: object { id, created, object, owned_by }`
75
76 Describes an OpenAI model offering that can be used with the API.
77
78 - `id: string`
79
80 The model identifier, which can be referenced in the API endpoints.
81
82 - `created: number`
83
84 The Unix timestamp (in seconds) when the model was created.
85
86 - `object: "model"`
87
88 The object type, which is always "model".
89
90 - `owned_by: string`
91
92 The organization that owns the model.
93
94### Example
95
96```cli
97openai models retrieve \
98 --api-key 'My API Key' \
99 --model gpt-4o-mini
100```
101
102#### Response
103
104```json
105{
106 "id": "id",
107 "created": 0,
108 "object": "model",
109 "owned_by": "owned_by"
110}
111```
112
113## Delete a fine-tuned model
114
115`$ openai models delete`
116
117**delete** `/models/{model}`
118
119Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
120
121### Parameters
122
123- `--model: string`
124
125 The model to delete
126
127### Returns
128
129- `model_deleted: object { id, deleted, object }`
130
131 - `id: string`
132
133 - `deleted: boolean`
134
135 - `object: string`
136
137### Example
138
139```cli
140openai models delete \
141 --api-key 'My API Key' \
142 --model ft:gpt-4o-mini:acemeco:suffix:abc123
143```
144
145#### Response
146
147```json
148{
149 "id": "id",
150 "deleted": true,
151 "object": "object"
152}
153```
154
155## Domain Types
156
157### Model
158
159- `model: object { id, created, object, owned_by }`
160
161 Describes an OpenAI model offering that can be used with the API.
162
163 - `id: string`
164
165 The model identifier, which can be referenced in the API endpoints.
166
167 - `created: number`
168
169 The Unix timestamp (in seconds) when the model was created.
170
171 - `object: "model"`
172
173 The object type, which is always "model".
174
175 - `owned_by: string`
176
177 The organization that owns the model.
178
179### Model Deleted
180
181- `model_deleted: object { id, deleted, object }`
182
183 - `id: string`
184
185 - `deleted: boolean`
186
187 - `object: string`