GET
/
files
curl https://api.portkey.ai/v1/files \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
{
  "data": [
    {
      "id": "<string>",
      "bytes": 123,
      "created_at": 123,
      "filename": "<string>",
      "object": "file",
      "purpose": "assistants",
      "status": "uploaded",
      "status_details": "<string>"
    }
  ],
  "object": "list"
}

Authorizations

x-portkey-api-key
string
header
required
x-portkey-virtual-key
string
header
required

Query Parameters

purpose
string

Only return files with the given purpose.

Response

200 - application/json
OK
data
object[]
required

The File object represents a document that has been uploaded to OpenAI.

object
enum<string>
required
Available options:
list