Sign in

Ocost API

View as Markdown

Send Ocost a business document, such as an invoice, an order or a contract. Get it back as JSON, and search everything your business keeps in Ocost.

WhatValue
Addresshttps://api.ocost.io/public/v1
KeyAuthorization: Bearer ocost_sk_…, from Settings › API
FormatJSON, files as multipart/form-data, errors as RFC 9457 problems
Documentsocost.document.v1, in EN 16931 terms
WhereThe EU. Documents never train a model.

The routes

RouteDoes
POST /public/v1/filesSend a file
GET /public/v1/filesFiles changed since a time or cursor
GET /public/v1/files/{file_id}A file and its status
GET /public/v1/files/{file_id}/contentThe original bytes
GET /public/v1/files/{file_id}/documentIts first document
GET /public/v1/documents/{document_id}Any document
DELETE /public/v1/files/{file_id}Erase a file for good
GET /public/v1/searchSearch by words and meaning

Start with the Quickstart. The API reference has every field.

Using with AI assistants

Claude, ChatGPT, Cursor and other assistants read these guides as Markdown:

  • https://docs.ocost.io/llms.txt: a map of every guide
  • https://docs.ocost.io/llms-full.txt: every guide in one file
  • https://docs.ocost.io/openapi.json: the OpenAPI document
  • Copy page for AI, beside each title

A prompt for an Odoo integration:

Text
Read https://docs.ocost.io/llms.txt and the guides it links, the Odoo guide first. Then write an Odoo 19 module that sends the PDF of a draft vendor bill to the Ocost API, polls the file until it is read, and fills the bill's partner, number, dates and lines from its ocost.document.v1 without posting it. Keep the API key in the system parameter ocost.api_key.