Nebul Docs

OCR Document

POST
/v1/ocr

Extract text from documents using OCR. Supports PDF documents via URL or base64 content.

curl -X POST https://api.inference.nebul.io/v1/ocr \-H "Content-Type: application/json" \-H "Authorization: Bearer sk-1234" \-d '{    "model": "DeepSeek/DeepSeek-OCR",    "document": {        "type": "document_url",        "document_url": "https://example.com/document.pdf"    }}'

Authorization

X-API-Key<token>

Project-scoped Nebul API key. Also accepted as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Mistral-compatible OCR request

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/ocr" \  -H "Content-Type: application/json" \  -d '{    "document": {}  }'
{  "id": "string",  "model": "string",  "pages": [    {      "index": 0,      "markdown": "string",      "images": [        {}      ],      "dimensions": {}    }  ],  "usage_info": {    "pages_processed": 0,    "doc_size_bytes": 0  }}