API reference

Upload source files before referencing them in a task.

Use file upload for documents, data, source bundles, and other user-authorized inputs.

Upload

File upload
POST /v1/files
Authorization: Bearer $HR_API_KEY
Content-Type: multipart/form-data

purpose=user_data
file=@agreement.docx

Reference in input

Input file content block
{
  "input": [
    {
      "role": "user",
      "content": [
        { "type": "input_file", "file_id": "file_..." },
        { "type": "input_text", "text": "Review this agreement." }
      ]
    }
  ],
  "stream": true
}