# General Translation Platform: Создание загрузок файлов
URL: https://generaltranslation.com/ru/docs/platform/openapi/reference/files/create-file-uploads.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Получите предварительно подписанные URL для загрузки методом PUT от 1 до 100 файлов (медиафайлы до 2 ГБ, остальные — до 100 МБ) для операции Upload source files или для переводов; файлы больше 4 МБ необходимо загружать только этим способом. Требуется project:files:write.

{/* Этот файл сгенерирован Fumadocs. Не редактируйте его напрямую. Чтобы внести изменения, повторно выполните команду генерации. */}

## Endpoint

`POST https://api.gtx.dev/v2/projects/{projectId}/files/uploads`

**Operation ID:** `createFileUploads`

**Tags:** `Files`

**Summary:** Create file uploads

Get presigned URLs to PUT 1–100 files (media up to 2GB, others 100MB) for Upload source files or translations; files over 4MB must use one. Requires `project:files:write`.

Authentication: required. Send an API key in the `Authorization: Bearer <key>` header when authenticating.

### Parameters

- `projectId` (path, string, required)
- `gt-api-version` (header, "2026-10-08.v1", required): API contract version. Must be `2026-10-08.v1` or later; requests without it or with an older version return 400.

### Request body (required)

Body (`application/json`, object):
- `files` (object[], required): 1–100 files; each sha256 may appear once.
  - `fileFormat` ("GTJSON" | "JSON" | "YAML" | "MD" | "MDX" | "TS" | "JS" | "HTML" | "TXT" | "PO" | "POT" | "TWILIO_CONTENT_JSON" | "LOTTIE" | "SVG" | "XCSTRINGS" | "DOT_STRINGS" | "DOT_STRINGSDICT" | "ANDROID_STRINGS" | "SRT" | "RESX" | "PNG" | "JPEG" | "MP4", required)
  - `size` (integer, required): File size in bytes: at most 2000000000 for PNG, JPEG and MP4, and 100000000 for other formats.
  - `sha256` (string, required): SHA-256 of the file's bytes, as 64 lowercase hex characters.

### Responses

**200**: Upload target for each file, in request order.
Response body (`application/json`, object):
- `files` (object[], required): One result per file, in order.
  - `sha256` (string, required): SHA-256 of the file's bytes, as 64 lowercase hex characters.
  - `status` ("exists" | "upload_required", required): `exists` when the project already stores these bytes, so the PUT is skipped; `upload_required` otherwise.
  - `upload` (object): Present when `status` is `upload_required`. Register the file through Upload source files or Upload translations within 24 hours; later, the upload may be deleted.
    - `url` (string, required): Presigned URL to PUT the file bytes to.
    - `headers` (object, required): Headers the PUT must send exactly as given.
      - `x-amz-checksum-sha256` (string, required)
    - `expiresAt` (string, required): The PUT must start before this ISO 8601 time.

**400**: The request is malformed or failed validation, including a repeated sha256 or a size over the limit. No URL is issued.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("invalid_request" | "api_version_unsupported" | "api_version_too_old", required)

Response body (`text/html`, string):

**401**: Authentication is missing or invalid.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("unauthenticated" | "api_key_invalid", required)

Response body (`text/html`, string):

**403**: The caller is authenticated but not allowed to perform this operation or access the requested resource.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("ip_not_allowed" | "permission_missing" | "target_inaccessible", required)

Response body (`text/html`, string):

**413**: The request, or the data it would return, exceeds a size or item limit.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("payload_too_large", required)

Response body (`text/html`, string):

**415**: The request body's Content-Type is missing or not supported. Send the body as application/json.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("unsupported_media_type", required)

Response body (`text/html`, string):

**429**: Too many requests. The rate limit was exceeded.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("rate_limited", required)

Response body (`text/html`, string):

**500**: An unexpected server error occurred.
Response body (`application/json`, object):
- `error` (string, required)
- `code` ("internal_error", required)

Response body (`text/html`, string):

Complete OpenAPI 3.1 specification: https://generaltranslation.com/openapi.yaml

OpenAPI schema: [openapi.json](https://generaltranslation.com/openapi.json)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
