Skip to content

Attaching files

Attach files when the question depends on something the providers can’t find on the web: a spec, requirements, meeting notes, a PDF or a screenshot. Every provider receives each file as text, sent with the question.

Read directly Plain text, Markdown, and PDFs with a text layer
Read by Claude Images (image/png, image/jpeg, image/webp) up to 5 MB, and scanned PDFs without a text layer up to 50 pages. Claude transcribes their text and describes what they show (charts, diagrams, screenshots), and providers receive that description, not the file
Sent to providers The first 200,000 characters of each file’s text
Size Up to 25 MB per file, 10 files per research

Files are uploaded straight to storage in three steps, so large files never pass through the API.

  1. Create the file. Send its name, type and exact size:

    Terminal window
    curl https://deeperesearch.com/v1/files \
    -H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "filename": "requirements.pdf", "mime_type": "application/pdf", "size_bytes": 482133 }'

    The response includes the file id and an upload object with a signed url, the method (PUT), the headers to send and when the URL expires.

  2. Upload the bytes to that URL:

    Terminal window
    curl -X PUT "$UPLOAD_URL" \
    -H "Content-Type: application/pdf" \
    --data-binary @requirements.pdf
  3. Finish the upload:

    Terminal window
    curl -X POST https://deeperesearch.com/v1/files/FILE_ID/complete \
    -H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY"

    The file’s status becomes processing while its text is read. Poll GET /v1/files/{id} until it’s ready: usually a few seconds, or up to a minute or two for an image or scanned PDF that Claude reads. text_chars shows how much text was found, and note explains anything unusual, such as an image Claude described, a file that was cut short, or a scanned PDF too long to read.

Pass the ids of ready files as attachments:

{
"query": "Which of these requirements are hardest to meet with off-the-shelf job queues?",
"vendors": "balanced",
"max_cost_usd": 20,
"attachments": ["FILE_ID"]
}

A file that isn’t ready yet fails with attachment_not_ready; an id that isn’t in your organization fails with attachment_not_found.

File statuses: awaiting_upload, processing, ready or failed.