{
  "opencollection": "1.0.0",
  "info": {
    "name": "Llama Platform Agent Data Files API",
    "version": "0.1.0"
  },
  "items": [
    {
      "info": {
        "name": "Files",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Files",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/beta/files",
            "params": [
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "The maximum number of items to return. Defaults to 50, maximum is 1000."
              },
              {
                "name": "page_token",
                "value": "",
                "type": "query",
                "description": "A page token received from a previous list call. Provide this to retrieve the subsequent page."
              },
              {
                "name": "file_ids",
                "value": "",
                "type": "query",
                "description": "Filter by specific file IDs."
              },
              {
                "name": "file_name",
                "value": "",
                "type": "query",
                "description": "Filter by file name (exact match)."
              },
              {
                "name": "external_file_id",
                "value": "",
                "type": "query",
                "description": "Filter by external file ID."
              },
              {
                "name": "order_by",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order."
              },
              {
                "name": "expand",
                "value": "",
                "type": "query",
                "description": "Fields to expand on each file."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List files with optional filtering and pagination.\n\nFilter by `file_name`, `file_ids`, or `external_file_id`.\nSupports cursor-based pagination and custom ordering."
        },
        {
          "info": {
            "name": "Upload File",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/beta/files",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": []
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Upload a file using multipart/form-data.\n\nSet `purpose` to indicate how the file will be used:\n`user_data`, `parse`, `extract`, `classify`, `split`,\n`sheet`, or `agent_app`.\n\nReturns the created file metadata including its ID for use\nin subsequent parse, extract, or classify operations."
        },
        {
          "info": {
            "name": "Query Files",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/beta/files/query",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Query files with filtering and pagination. Deprecated: use `GET /files`."
        },
        {
          "info": {
            "name": "Get File",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/beta/files/:file_id",
            "params": [
              {
                "name": "file_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "expand",
                "value": "",
                "type": "query",
                "description": "Fields to expand."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get file metadata by ID."
        },
        {
          "info": {
            "name": "Delete File",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/v1/beta/files/:file_id",
            "params": [
              {
                "name": "file_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Delete a file from the project."
        },
        {
          "info": {
            "name": "Read File Content",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/beta/files/:file_id/content",
            "params": [
              {
                "name": "file_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "expires_at_seconds",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get a presigned URL to download the file content."
        }
      ]
    }
  ],
  "bundled": true
}