---
title: "Upload file"
method: POST
path: "/v1/files"
tags: ["Files"]
---

# Upload file

`POST /v1/files`

Upload a file.

## Response `200`

The uploaded file.

- OpenAIFileObject — OpenAI File object as defined in the OpenAI Files API.
  - `object` 'file' — The object type, which is always 'file'.
  - `id` string, required — The file identifier, which can be referenced in the API endpoints.
  - `bytes` integer, required — The size of the file, in bytes.
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the file was created.
  - `expires_at` integer — The Unix timestamp (in seconds) for when the file will expire.
  - `filename` string, required — The name of the file.
  - `purpose` 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'evals' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data', required — Valid purpose values on the OpenAI File response object.
  - `status` 'uploaded' | 'processed' | 'error', required — Deprecated. The current status of the file.
  - `status_details` string — Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/versions/f3f783962256/schema)
