OhMyGPT
Files

Retrieve file

GET
/v1/files/{file_id}

An uploaded file, or the output or error file of one of your batches once the batch is settled.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

file_id*string

The id of a file.

Response Body

Successful response

application/json
  1. response
bytes*integer
created_at*integer

Unix seconds.

expires_at?integer

Unix seconds. Absent on batch result files, which the provider keeps for its own retention period.

filename*string
id*string

file-… for an uploaded file; <batch_id>_output or <batch_id>_error for a batch result file.

object*"file"
Value in"file"
purpose*string
Value in"batch""batch_output"
status*"processed"
Value in"processed"
Example Request
curl -X GET 'https://api.ohmygpt.com/v1/files/string'
Example Response
{  "bytes": 0,  "created_at": 0,  "expires_at": 0,  "filename": "string",  "id": "string",  "object": "file",  "purpose": "batch",  "status": "processed"}

Was this page helpful?

Still stuck? Live chat · [email protected] · Telegram group