{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatapi/json-schema/beatapi-file-response-schema.json",
  "title": "FileResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatapi-files-api-openapi.yml#/components/schemas/FileResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/File",
      "description": "Uploaded file metadata and the public HTTPS URL to use in later requests."
    }
  },
  "$defs": {
    "File": {
      "type": "object",
      "required": [
        "id",
        "object",
        "url",
        "key",
        "mime_type",
        "size_bytes",
        "purpose",
        "created_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Uploaded file ID, `file_<uuid>`."
        },
        "object": {
          "type": "string",
          "enum": [
            "file"
          ],
          "description": "Object discriminator; always `file`."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "BeatAPI HTTPS URL to use in workflow or model requests."
        },
        "key": {
          "type": "string",
          "description": "BeatAPI storage key, `u/<random>.<ext>`, for support and diagnostics."
        },
        "mime_type": {
          "type": "string",
          "description": "The canonical MIME type the file is stored and served under, not necessarily the one you sent. `image/jpg` is reported as `image/jpeg`, `audio/mp3` as `audio/mpeg`, and `text/plain` (a `.srt` file) as `application/x-subrip`."
        },
        "size_bytes": {
          "type": "integer",
          "description": "Uploaded file size in bytes."
        },
        "purpose": {
          "type": "string",
          "enum": [
            "input"
          ],
          "description": "File purpose; currently always `input`."
        },
        "created_at": {
          "type": "integer",
          "description": "Unix timestamp when the file was stored."
        }
      }
    }
  }
}