---
title: "Upload a file to the server. the body must be a file content."
method: POST
path: "/files"
tags: ["files"]
---

# Upload a file to the server. the body must be a file content.

`POST /files`

Uploads a file to the server. The body must contain the file content.

## Response `201`

Created - The file has been successfully uploaded

- FileResponse
  - `uuid` string, uuid, required — A UUID string
  - `sha256` string, required — SHA256 hash of the file content
  - `size` integer, required — File size in bytes; -1 if unknown

## Other responses

- `400` — Bad Request - Invalid request parameters
- `401` — Unauthorized - Invalid or missing authentication credentials. Either the `Authorization` bearer token is missing or invalid, or the `Project` header is missing.
- `403` — Forbidden - Token does not have sufficient permissions
- `404` — Not Found - The requested resource does not exist

---

[API](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api.md) · [All operations](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nebius/nebius-openai-compatible-inference-api/revisions/0fb323abba3c/schema)
