Skip to main content

uploads

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

Overview​

Nameuploads
TypeResource
Idopenai.uploads.uploads

Fields​

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
createinsertfilename, purpose, bytes, mime_typeopenai-organization, openai-project
cancelexecupload_idopenai-organization, openai-project
completeexecupload_id, part_idsopenai-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
upload_idstringThe ID of the Upload.
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.

INSERT examples​

No description available.

INSERT INTO openai.uploads.uploads (
filename,
purpose,
bytes,
mime_type,
expires_after,
"openai-organization",
"openai-project"
)
SELECT
'{{ filename }}' /* required */,
'{{ purpose }}' /* required */,
{{ bytes }} /* required */,
'{{ mime_type }}' /* required */,
'{{ expires_after }}',
'{{ openai-organization }}',
'{{ openai-project }}'
RETURNING
id,
bytes,
created_at,
expires_at,
file,
filename,
object,
purpose,
status
;

Lifecycle Methods​

OK

EXEC openai.uploads.uploads.cancel
@upload_id='{{ upload_id }}' --required,
@openai-organization='{{ openai-organization }}',
@openai-project='{{ openai-project }}'
;