---
title: "Extract data from a receipt or ticket image"
method: POST
path: "/api/receipts/extract"
tags: ["Receipts"]
---

# Extract data from a receipt or ticket image

`POST /api/receipts/extract`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/receipts/extract`
- Auth: API key in header `X-API-Key`

Extracts structured data from receipt photos, tickets, and invoice images using the configured AI provider.

**Supported document types:** Cash receipts, restaurant bills, parking tickets, train/flight/bus tickets, taxi receipts, hotel invoices, fuel receipts, general invoices.

**Supported file formats:** JPEG, PNG, WebP, GIF, TIFF, PDF

Returns structured JSON with receipt type, amounts, VAT breakdown, line items, type-specific metadata, SKR03/SKR04 account suggestions, language/country detection, plausibility checks, and image quality hints.

Configure one provider with `AI_PROVIDER` plus `OPENAI_API_KEY`, `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, or `OPENROUTER_API_KEY`. This endpoint uses AI processing and consumes additional API credits.

## Response `200`

Extracted receipt data

## Other responses

- `400`: No file uploaded or unsupported file type
- `500`: Extraction failed

---

[API](https://skmtc.dev/dokmatiq/apis/docgen-api.md) · [All operations](https://skmtc.dev/dokmatiq/apis/docgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dokmatiq/apis/docgen-api/revisions/3fa1a922764d?raw)
