POST /v1/files
Method: POSTEndpoint: /v1/files
This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API.
Request Parameters
Header Parameters
text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters multipart/form-data
text
file
file
Required
// provider-specific example normalized for English documentation
JSONL
// provider-specific example normalized for English documentation
// provider-specific example normalized for English documentation
purpose
// provider-specific example normalized for English documentation
// provider-specific example normalized for English documentation
// provider-specific example normalized for English documentationExample Request
Shell
bash
curl --location --request POST '/v1/files' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'file=@""'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
id
string
Required
object
string
Required
bytes
integer
Required
created_at
integer
Required
filename
string
RequiredExample
json
{
"id": "file-BK7bzQj3FfZFXr7DbL6xJwfo",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "mydata.jsonl",
"url": "https://cdn.gptbest.vip/file/cdn/20240731/dhLR1YlDyY0hdsuG1cGTGtJmwtwrvA.png"
}