# Upload a file in one request (/en/reference/media/upload-media)

OpenAPI operation (components in https://api.tebar.app/v1/openapi.json):

```json
[
  {
    "operationId": "uploadMedia",
    "tags": [
      "Media"
    ],
    "summary": "Upload a file in one request",
    "description": "The raw file as the body: an image (up to 8 MB) or a video (up to 300 MB); the type is read from the bytes. JSON or form bodies: 415 raw_body_required. In production the body is limited to 100 MB: use a chunked or presigned upload for larger files.\n\nRequires the write scope.",
    "parameters": [
      {
        "name": "keep",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ]
        }
      },
      {
        "$ref": "#/components/parameters/TebarProfile"
      }
    ],
    "requestBody": {
      "required": true,
      "description": "The file bytes.",
      "content": {
        "application/octet-stream": {
          "schema": {
            "type": "string",
            "format": "binary"
          }
        }
      }
    },
    "responses": {
      "201": {
        "description": "The media, ready to use.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Media"
            }
          }
        }
      },
      "400": {
        "$ref": "#/components/responses/BadRequest"
      },
      "401": {
        "$ref": "#/components/responses/Unauthorized"
      },
      "403": {
        "$ref": "#/components/responses/Forbidden"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      }
    }
  }
]
```