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}/

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

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