Lookio Docs
Lookio websiteOpen Lookio
ResourcesUpload a file
resources

Upload a file

Send the file's bytes as the request body and its name in file_name. The body is the file itself, not multipart: it is streamed to storage without being held in memory, so Content-Length is required. Any Content-Type is accepted; the extension of file_name decides how the file is read. Reads PDF, Word, PowerPoint, Excel, OpenDocument, CSV, Markdown, HTML, text and images (scans and photos through OCR), up to 50 MB depending on the format (GET /v1/account lists the formats and their limits); a format Lookio does not read (.doc, .ppt, .odp, .rtf, .pages, .key, .epub, .zip, .heic) is refused with what to convert it to. By default the resource comes back queued and is read and indexed in the background (seconds for a short text, file or page, minutes for a site). Pass ?wait=true to wait up to 15 seconds for it to finish in one call, or poll GET /v1/resources/{id} (?wait=true works there too) until status is ready or failed. Importing costs no credits.

POST/v1/resources/file

Requires resources:write.

Send the file’s bytes as the request body, with a Content-Length header, and its name in the file_name query parameter. The body is the file itself, not multipart. The extension of the name decides how the file is read.

Terminal
curl "https://api.lookio.app/v1/resources/file?file_name=handbook.pdf&tags=hr" \
  -H "Authorization: Bearer $LOOKIO_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @handbook.pdf

Use --data-binary, not -d: -d alters the bytes. The body is streamed, never held in memory. tags is a comma-separated list.

Each format has its own size limit, from 5 MB for text to 50 MB for a PDF, and GET /v1/account lists the formats and their limits. An unsupported or legacy format is refused with invalid_parameter and advice on what to convert it to, and a file over its limit is refused with request_too_large. See File formats. An upload that ends before all its bytes arrive is refused and creates nothing.

The resource comes back queued. Importing is free. Poll Get a resource until it is ready or failed.

A retried upload with the same Idempotency-Key is recognised by its name, size and query, not by its bytes.

Authorizations

Authorizationbearerin headerrequired

Query parameters

file_namestringrequiredlength: 1–255 chars

The file's name with its extension, which decides how it is read (PDF, Word, Excel, CSV, images, Markdown, HTML…).

titlestringlength: 1–200 chars

Defaults to the file name without its extension.

tagsstringlength: ≤ 2000 chars

Comma-separated tags.

sourcestringlength: ≤ 500 chars

Where this resource comes from, shown with every citation of it: a URL or a mention such as "Employee handbook, 2026 edition". Up to 500 characters; an empty string clears it.

waitboolean | enum<string>

Wait up to 15 seconds for reading and indexing to finish before returning. Short texts, files and pages usually come back ready (or failed) in one call; larger imports return their current status (queued or processing) when the window ends, never an error.

Header parameters

Idempotency-Keystringlength: 1–255 chars

A unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.

Body

application/octet-streamrequired

The file's bytes, unencoded. Content-Length is required.

The raw bytes of the file.

Response

application/json

Add a file

dataobjectrequired
request_idstringrequired

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.