Retrieve file
An uploaded file, or the output or error file of one of your batches once the batch is settled.
ApiKeyAuthAuthorization<token>file_id*stringThe id of a file.
Successful response
application/json- response
bytes*integercreated_at*integerUnix seconds.
expires_at?integerUnix seconds. Absent on batch result files, which the provider keeps for its own retention period.
filename*stringid*stringfile-… for an uploaded file; <batch_id>_output or <batch_id>_error for a batch result file.
object*"file""file"purpose*string"batch""batch_output"status*"processed""processed"curl -X GET 'https://api.ohmygpt.com/v1/files/string'{ "bytes": 0, "created_at": 0, "expires_at": 0, "filename": "string", "id": "string", "object": "file", "purpose": "batch", "status": "processed"}Still stuck? Live chat · [email protected] · Telegram group
List files GET
Your uploaded files that have not expired. Batch result files are not listed; read them by ID. Requires an admin API key or the console session. Other keys get 403 and can still read a file by its ID.
Upload file POST
Upload a JSONL file to use as Batch input. The upload is checked right away: the file must be UTF-8 and every line must be a JSON object, and an error names the line. Each request in the file is checked against the endpoint when you create the batch.