Skip to main content

models

Creates, updates, deletes, gets or lists a models resource.

Overview​

Namemodels
TypeResource
Idopenai.models.models

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe model identifier, which can be referenced in the API endpoints.
createdinteger (unixtime)The Unix timestamp (in seconds) when the model was created.
objectstringThe object type, which is always "model". (model)
owned_bystringThe organization that owns the model.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmodelopenai-organization, openai-project
listselectopenai-organization, openai-project
deletedeletemodelopenai-organization, openai-project

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
modelstringThe model to delete
openai-organizationstringOptionally scope the request to a specific organization (overrides the default associated with the API key). Addressable in SQL as openai_organization.
openai-projectstringOptionally scope the request to a specific project (overrides the default associated with the API key). Addressable in SQL as openai_project.

SELECT examples​

OK

SELECT
id,
created,
object,
owned_by
FROM openai.models.models
WHERE model = '{{ model }}' -- required
AND "openai-organization" = '{{ openai-organization }}'
AND "openai-project" = '{{ openai-project }}'
;

DELETE examples​

No description available.

DELETE FROM openai.models.models
WHERE model = '{{ model }}' --required
AND "openai-organization" = '{{ openai-organization }}'
AND "openai-project" = '{{ openai-project }}'
;