{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orq/json-schema/orq-create-file-request-schema.json",
  "title": "CreateFileRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orq-files-api-openapi.yml#/components/schemas/CreateFileRequest",
  "required": [
    "filename",
    "content"
  ],
  "type": "object",
  "properties": {
    "filename": {
      "type": "string",
      "description": "Name to store for the uploaded file, including extension when available."
    },
    "content": {
      "type": "string",
      "description": "Base64-encoded file contents.",
      "format": "bytes"
    },
    "purpose": {
      "description": "Intended usage category for the uploaded file. Defaults to retrieval\n when omitted.",
      "$ref": "#/$defs/FilePurpose"
    },
    "content_type": {
      "type": "string",
      "description": "MIME type of the uploaded content, for example `application/pdf`."
    },
    "project_id": {
      "type": "string",
      "description": "Project the file is created in. Optional: project-scoped API keys default to the key's bound project; workspace-scoped callers default to the workspace's default project."
    }
  },
  "$defs": {
    "FilePurpose": {
      "type": "string",
      "enum": [
        "FILE_PURPOSE_RETRIEVAL",
        "FILE_PURPOSE_KNOWLEDGE_DATASOURCE",
        "FILE_PURPOSE_BATCH",
        "FILE_PURPOSE_CODE_INTERPRETER"
      ]
    }
  }
}