{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-foundry/json-schema/azure-ai-foundry-file-info-schema.json",
  "title": "FileInfo",
  "description": "Represents an agent that can call the model and use tools.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-ai-foundry-files-api-openapi.yml#/components/schemas/FileInfo",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "description": "The object type, which is always 'file'.",
      "enum": [
        "file"
      ],
      "x-ms-enum": {
        "modelAsString": false
      }
    },
    "id": {
      "type": "string",
      "description": "The identifier, which can be referenced in API endpoints."
    },
    "bytes": {
      "type": "integer",
      "format": "int32",
      "description": "The size of the file, in bytes."
    },
    "filename": {
      "type": "string",
      "description": "The name of the file."
    },
    "created_at": {
      "type": "integer",
      "format": "unixtime",
      "description": "The Unix timestamp, in seconds, representing when this object was created.",
      "x-ms-client-name": "createdAt"
    },
    "purpose": {
      "$ref": "#/$defs/FilePurpose",
      "description": "The intended purpose of a file."
    },
    "status": {
      "$ref": "#/$defs/FileState",
      "description": "The state of the file. This field is available in Azure OpenAI only."
    },
    "status_details": {
      "type": "string",
      "description": "The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.",
      "x-ms-client-name": "statusDetails"
    }
  },
  "required": [
    "object",
    "id",
    "bytes",
    "filename",
    "created_at",
    "purpose"
  ],
  "$defs": {
    "FilePurpose": {
      "type": "string",
      "description": "The possible values denoting the intended usage of a file.",
      "enum": [
        "assistants",
        "assistants_output",
        "vision"
      ],
      "x-ms-enum": {
        "name": "FilePurpose",
        "modelAsString": true,
        "values": [
          {
            "name": "agents",
            "value": "assistants",
            "description": "Indicates a file is used as input to agents."
          },
          {
            "name": "agentsOutput",
            "value": "assistants_output",
            "description": "Indicates a file is used as output by agents."
          },
          {
            "name": "vision",
            "value": "vision",
            "description": "Indicates a file is used as input to a vision operation."
          }
        ]
      }
    },
    "FileState": {
      "type": "string",
      "description": "The state of the file.",
      "enum": [
        "uploaded",
        "pending",
        "running",
        "processed",
        "error",
        "deleting",
        "deleted"
      ],
      "x-ms-enum": {
        "name": "FileState",
        "modelAsString": true,
        "values": [
          {
            "name": "uploaded",
            "value": "uploaded",
            "description": "The file has been uploaded but it's not yet processed. This state is not returned by Azure OpenAI and exposed only for\ncompatibility. It can be categorized as an inactive state."
          },
          {
            "name": "pending",
            "value": "pending",
            "description": "The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state."
          },
          {
            "name": "running",
            "value": "running",
            "description": "The operation has started to be processed. It can be categorized as an active state."
          },
          {
            "name": "processed",
            "value": "processed",
            "description": "The operation has successfully processed and is ready for consumption. It can be categorized as a terminal state."
          },
          {
            "name": "error",
            "value": "error",
            "description": "The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state."
          },
          {
            "name": "deleting",
            "value": "deleting",
            "description": "The entity is in the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility.\nIt can be categorized as an active state."
          },
          {
            "name": "deleted",
            "value": "deleted",
            "description": "The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a\nterminal state."
          }
        ]
      }
    }
  }
}