SPB Git

Repository Public

models.md 4.6 KB 274 lines markdown

1# Models23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45## Delete a fine-tuned model67**delete** `/models/{model}`89Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.1011### Path Parameters1213- `model: string`1415### Returns1617- `ModelDeleted object { id, deleted, object }`1819  - `id: string`2021  - `deleted: boolean`2223  - `object: string`2425### Example2627```http28curl https://api.openai.com/v1/models/$MODEL \29    -X DELETE \30    -H "Authorization: Bearer $OPENAI_API_KEY"31```3233#### Response3435```json36{37  "id": "id",38  "deleted": true,39  "object": "object"40}41```4243### Example4445```http46curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \47  -X DELETE \48  -H "Authorization: Bearer $OPENAI_API_KEY"49```5051#### Response5253```json54{55  "id": "ft:gpt-4o-mini:acemeco:suffix:abc123",56  "object": "model",57  "deleted": true58}59```6061## List models6263**get** `/models`6465Lists the currently available models, and provides basic information about each one such as the owner and availability.6667### Returns6869- `data: array of Model`7071  - `id: string`7273    The model identifier, which can be referenced in the API endpoints.7475  - `created: number`7677    The Unix timestamp (in seconds) when the model was created.7879  - `object: "model"`8081    The object type, which is always "model".8283    - `"model"`8485  - `owned_by: string`8687    The organization that owns the model.8889  - `shutdown_date: optional string or null`9091    The date when the model will shut down, or null if not announced.9293- `object: "list"`9495  - `"list"`9697### Example9899```http100curl https://api.openai.com/v1/models \101    -H "Authorization: Bearer $OPENAI_API_KEY"102```103104#### Response105106```json107{108  "data": [109    {110      "id": "id",111      "created": 0,112      "object": "model",113      "owned_by": "owned_by",114      "shutdown_date": "2019-12-27"115    }116  ],117  "object": "list"118}119```120121### Example122123```http124curl https://api.openai.com/v1/models \125  -H "Authorization: Bearer $OPENAI_API_KEY"126```127128#### Response129130```json131{132  "object": "list",133  "data": [134    {135      "id": "model-id-0",136      "object": "model",137      "created": 1686935002,138      "owned_by": "organization-owner",139      "shutdown_date": null140    },141    {142      "id": "model-id-1",143      "object": "model",144      "created": 1686935002,145      "owned_by": "organization-owner",146      "shutdown_date": null147    },148    {149      "id": "model-id-2",150      "object": "model",151      "created": 1686935002,152      "owned_by": "openai",153      "shutdown_date": "2026-10-23"154    },155  ]156}157```158159## Retrieve model160161**get** `/models/{model}`162163Retrieves a model instance, providing basic information about the model such as the owner and permissioning.164165### Path Parameters166167- `model: string`168169### Returns170171- `Model object { id, created, object, 2 more }`172173  Describes an OpenAI model offering that can be used with the API.174175  - `id: string`176177    The model identifier, which can be referenced in the API endpoints.178179  - `created: number`180181    The Unix timestamp (in seconds) when the model was created.182183  - `object: "model"`184185    The object type, which is always "model".186187    - `"model"`188189  - `owned_by: string`190191    The organization that owns the model.192193  - `shutdown_date: optional string or null`194195    The date when the model will shut down, or null if not announced.196197### Example198199```http200curl https://api.openai.com/v1/models/$MODEL \201    -H "Authorization: Bearer $OPENAI_API_KEY"202```203204#### Response205206```json207{208  "id": "id",209  "created": 0,210  "object": "model",211  "owned_by": "owned_by",212  "shutdown_date": "2019-12-27"213}214```215216### Example217218```http219curl https://api.openai.com/v1/models/gpt-6-astra \220  -H "Authorization: Bearer $OPENAI_API_KEY"221```222223#### Response224225```json226{227  "id": "gpt-6-astra",228  "object": "model",229  "created": 1686935002,230  "owned_by": "openai",231  "shutdown_date": "2026-10-23"232}233```234235## Domain Types236237### Model238239- `Model object { id, created, object, 2 more }`240241  Describes an OpenAI model offering that can be used with the API.242243  - `id: string`244245    The model identifier, which can be referenced in the API endpoints.246247  - `created: number`248249    The Unix timestamp (in seconds) when the model was created.250251  - `object: "model"`252253    The object type, which is always "model".254255    - `"model"`256257  - `owned_by: string`258259    The organization that owns the model.260261  - `shutdown_date: optional string or null`262263    The date when the model will shut down, or null if not announced.264265### Model Deleted266267- `ModelDeleted object { id, deleted, object }`268269  - `id: string`270271  - `deleted: boolean`272273  - `object: string`274
Files main
Menu

Theme