API Overview

Watch our quick guide to get started with the Monkt API

RESTful Endpoints

Simple and intuitive API endpoints for all operations

Secure Authentication

Token-based authentication for all API requests

Flexible Data Format

Support for JSON, multipart, and URL-based inputs

API Documentation

Transform your documents programmatically using our powerful REST API. All API requests require authentication using your API token.

Quick Reference

Pagination

?page=1&page_size=20

Default: 20 items per page
Max: 100 items

Filtering

?created__gte=2024-01-01

Use field__operator format

Ordering

?ordering=-created

Prefix with - for descending

Common Operations

Authentication

Include your API token in the Authorization header for all requests:

Authorization: Token your-api-token-here

Transformations

GET /api/transformations/

List all your transformations

curl -H "Authorization: Token your-api-token" \
  https://monkt.com/api/transformations/
POST /api/transformations/

Upload files for transformation

curl -X POST \
  -H "Authorization: Token your-api-token" \
  -F "files=@/path/to/document.pdf" \
  https://monkt.com/api/transformations/
POST /api/transformations/

Transform content from a URL

curl -X POST \
  -H "Authorization: Token your-api-token" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/article"}' \
  https://monkt.com/api/transformations/
GET /api/transformations/{uuid}/

Get details of a specific transformation

curl -H "Authorization: Token your-api-token" \
  https://monkt.com/api/transformations/{uuid}/
DELETE /api/transformations/{uuid}/

Delete a transformation

curl -X DELETE \
  -H "Authorization: Token your-api-token" \
  https://monkt.com/api/transformations/{uuid}/

Schemas

GET /api/schemas/

List all your schemas

curl -H "Authorization: Token your-api-token" \
  https://monkt.com/api/schemas/
POST /api/schemas/

Create a new schema

curl -X POST \
  -H "Authorization: Token your-api-token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Invoice Schema",
    "schema": {
      "type": "object",
      "properties": {
        "invoice_number": {"type": "string"},
        "amount": {"type": "number"},
        "date": {"type": "string"}
      },
      "required": ["invoice_number", "amount"]
    }
  }' \
  https://monkt.com/api/schemas/

JSON Transformations

GET /api/transformations/{uuid}/json/

Get JSON transformation (auto mode)

curl -H "Authorization: Token your-api-token" \
  -o output.json \
  https://monkt.com/api/transformations/{uuid}/json/
GET /api/transformations/{uuid}/json/{schema_uuid}/

Get JSON transformation with specific schema

curl -H "Authorization: Token your-api-token" \
  -o output.json \
  https://monkt.com/api/transformations/{uuid}/json/{schema_uuid}/

Deep Extract

POST /api/transformations/

Create a deep extract transformation

curl -X POST \
  -H "Authorization: Token your-api-token" \
  -F "file=@/path/to/document.pdf" \
  -F "deep_extract=true" \
  https://monkt.com/api/transformations/
GET /api/transformations/{uuid}/deep-extract/{format}/

Download deep extract files in various formats

Available formats:

  • zip - All extracted files in ZIP format
  • json-full - Deterministic JSON extraction (full)
  • json-simple - Deterministic JSON extraction (simple)
  • markdown - Markdown format
  • markdown-refs - Markdown with references
# Download ZIP archive
curl -H "Authorization: Token your-api-token" \
  -o extracted_files.zip \
  https://monkt.com/api/transformations/{uuid}/deep-extract/zip/

# Download full JSON
curl -H "Authorization: Token your-api-token" \
  -o extraction.json \
  https://monkt.com/api/transformations/{uuid}/deep-extract/json-full/

# Download markdown with references
curl -H "Authorization: Token your-api-token" \
  -o extraction.md \
  https://monkt.com/api/transformations/{uuid}/deep-extract/markdown-refs/

Prompts

GET /api/prompts/

List all your prompts with filtering options

curl -H "Authorization: Token your-api-token" \
  "https://monkt.com/api/prompts/?json_output=true&ordering=-created"
POST /api/prompts/

Create a new prompt

curl -X POST \
  -H "Authorization: Token your-api-token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Extract Dates",
    "prompt": "Extract all dates from the text in ISO format",
    "json_output": true
  }' \
  https://monkt.com/api/prompts/
GET /api/transformations/{uuid}/prompt/{prompt_uuid}/

Apply a prompt to a transformation

curl -H "Authorization: Token your-api-token" \
  -o output.txt \
  https://monkt.com/api/transformations/{uuid}/prompt/{prompt_uuid}/

Filtering Reference

Transformations

  • status=completed
  • words_count__gte=100
  • mime_type=application/pdf
  • created__gte=2024-01-01
  • is_deep_extract=true

Schemas

  • name__icontains=invoice
  • created__gte=2024-01-01
  • ordering=-created

Prompts

  • json_output=true
  • name__icontains=extract
  • ordering=-created

Rate Limits

Free Plan

  • 100 requests per day
  • 5 MB max file size
  • Basic transformations only

Pro Plan

  • Unlimited requests
  • 50 MB max file size
  • Advanced transformations
  • Priority support