API Reference
- Introduction
- Authentication
- Headers
- Errors
- Supported Providers
- SDKs
- API Details
Chat Completions
Portkey Endpoints
Embeddings
Other APIs
Completions
Moderations
Fine-tuning
Assistants
- Assistants
- Threads
- Messages
- Runs
- Run Steps
Upload File
POST
/
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" \
-F purpose="fine-tune" \
-F file="@mydata.jsonl"
{
"id": "<string>",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "<string>"
}
Body
multipart/form-data
Response
200 - application/json
OK
The File
object represents a document that has been uploaded to OpenAI.
Was this page helpful?
curl https://api.portkey.ai/v1/files \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
-F purpose="fine-tune" \
-F file="@mydata.jsonl"
{
"id": "<string>",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "<string>"
}