---
title: "POST /files"
method: POST
path: "/files"
---

# POST /files

`POST /files`

Uploads a file for use by other operations.

## Query parameters

- `api-version` string, required

## Response `200`

A representation of the uploaded file.

- FileInfo — Represents an agent that can call the model and use tools.
  - `object` 'file', required — The object type, which is always 'file'.
  - `id` string, required — The identifier, which can be referenced in API endpoints.
  - `bytes` integer, required — The size of the file, in bytes.
  - `filename` string, required — The name of the file.
  - `created_at` integer, required — The Unix timestamp, in seconds, representing when this object was created.
  - `purpose` 'assistants' | 'assistants_output' | 'vision', required — The possible values denoting the intended usage of a file.
  - `status` 'uploaded' | 'pending' | 'running' | 'processed' | 'error' | 'deleting' | 'deleted' — The state of the file.
  - `status_details` string — The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/ai-azure-ai-agents.md) · [All operations](https://skmtc.net/azure/apis/ai-azure-ai-agents/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-azure-ai-agents/versions/de4a99f09829/schema)
