OpenAI API

Models

List and describe the various models available in the API.

Lists the currently available models, and provides basic information about each one such as the owner and availability.

get
https://api.openai.com/v1/models

Response

200 application/json

OK

ListModelsResponse

objectstringrequired

Allowed values:list

dataarrayrequired

Describes an OpenAI model offering that can be used with the API.

Show Child Parameters
get/models
 
200 application/json

Retrieves a model instance, providing basic information about the model such as the owner and permissioning.

get
https://api.openai.com/v1/models/{model}

Path Parameters

modelstringrequired

The ID of the model to use for this request

Example:gpt-4o-mini

Response

200 application/json

OK

Model

Describes an OpenAI model offering that can be used with the API.

idstringrequired

The model identifier, which can be referenced in the API endpoints.

createdintegerrequired

The Unix timestamp (in seconds) when the model was created.

objectstringrequired

The object type, which is always “model”.

Allowed values:model

owned_bystringrequired

The organization that owns the model.

get/models/{model}
 
200 application/json

Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.

delete
https://api.openai.com/v1/models/{model}

Path Parameters

modelstringrequired

The model to delete

Example:ft:gpt-4o-mini:acemeco:suffix:abc123

Response

200 application/json

OK

DeleteModelResponse

idstringrequired
deletedbooleanrequired
objectstringrequired
delete/models/{model}
 
200 application/json

Moderations

Given text and/or image inputs, classifies if those inputs are potentially harmful.