Welcome to the Iteration Layer API documentation. This guide will help you get up and running in minutes.
Quick Start
1. Create an Account
Sign up at iterationlayer.com to start your paid 7-day trial. You’ll receive 100 trial credits across all APIs. Generate a project-scoped API key from the dashboard or the API Keys page — keys work across all APIs.
2. Make Your First Request
curl -X POST \
https://api.iterationlayer.com/document-extraction/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [
{
"type": "url",
"name": "invoice.pdf",
"url": "https://iterationlayer.com/code-samples/accounts-payable-invoice.pdf"
}
],
"schema": {
"fields": [
{
"name": "invoice_number",
"type": "TEXT",
"description": "The invoice number"
},
{
"name": "total_amount",
"type": "CURRENCY_AMOUNT",
"description": "Total invoice amount"
}
]
}
}'{
"success": true,
"data": {
"invoice_number": {
"type": "TEXT",
"value": "INV-2024-0042",
"confidence": 0.97,
"citations": [
"Invoice #INV-2024-0042"
],
"source": "invoice.pdf"
},
"total_amount": {
"type": "CURRENCY_AMOUNT",
"value": 1250.00,
"confidence": 0.95,
"citations": [
"Total: €1,250.00"
],
"source": "invoice.pdf"
}
}
}import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({
apiKey: "YOUR_API_KEY",
});
const result = await client.extractDocument({
files: [
{
type: "url",
name: "invoice.pdf",
url: "https://iterationlayer.com/code-samples/accounts-payable-invoice.pdf",
},
],
schema: {
fields: [
{
name: "invoice_number",
type: "TEXT",
description: "The invoice number",
},
{
name: "total_amount",
type: "CURRENCY_AMOUNT",
description: "Total invoice amount",
},
],
},
});{
"success": true,
"data": {
"invoice_number": {
"type": "TEXT",
"value": "INV-2024-0042",
"confidence": 0.97,
"citations": [
"Invoice #INV-2024-0042"
],
"source": "invoice.pdf"
},
"total_amount": {
"type": "CURRENCY_AMOUNT",
"value": 1250.00,
"confidence": 0.95,
"citations": [
"Total: €1,250.00"
],
"source": "invoice.pdf"
}
}
}from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")
result = client.extract_document(
files=[
{
"type": "url",
"name": "invoice.pdf",
"url": "https://iterationlayer.com/code-samples/accounts-payable-invoice.pdf",
}
],
schema={
"fields": [
{
"name": "invoice_number",
"type": "TEXT",
"description": "The invoice number",
},
{
"name": "total_amount",
"type": "CURRENCY_AMOUNT",
"description": "Total invoice amount",
},
],
},
){
"success": true,
"data": {
"invoice_number": {
"type": "TEXT",
"value": "INV-2024-0042",
"confidence": 0.97,
"citations": [
"Invoice #INV-2024-0042"
],
"source": "invoice.pdf"
},
"total_amount": {
"type": "CURRENCY_AMOUNT",
"value": 1250.00,
"confidence": 0.95,
"citations": [
"Total: €1,250.00"
],
"source": "invoice.pdf"
}
}
}import il "github.com/iterationlayer/sdk-go"
client := il.NewClient("YOUR_API_KEY")
result, err := client.ExtractDocument(il.ExtractDocumentRequest{
Files: []il.FileInput{
{Type: "url", Name: "invoice.pdf", Url: "https://iterationlayer.com/code-samples/accounts-payable-invoice.pdf"},
},
Schema: il.ExtractionSchema{
Fields: []any{
il.TextFieldConfig{Type: "TEXT", Name: "invoice_number", Description: "The invoice number"},
il.CurrencyAmountFieldConfig{Type: "CURRENCY_AMOUNT", Name: "total_amount", Description: "Total invoice amount"},
},
},
}){
"success": true,
"data": {
"invoice_number": {
"type": "TEXT",
"value": "INV-2024-0042",
"confidence": 0.97,
"citations": [
"Invoice #INV-2024-0042"
],
"source": "invoice.pdf"
},
"total_amount": {
"type": "CURRENCY_AMOUNT",
"value": 1250.00,
"confidence": 0.95,
"citations": [
"Total: €1,250.00"
],
"source": "invoice.pdf"
}
}
}3. Explore the APIs
- Document Extraction — Extract structured data from documents
- Document to Markdown — Convert documents and images to clean markdown
- Website Extraction — Extract structured data from public website pages
- Image Transformation — Resize, crop, and convert images
- Image Generation — Generate images from templates
- Document Generation — Generate PDF, DOCX, EPUB, and PPTX from structured data
- Sheet Generation — Generate XLSX, CSV, and Markdown spreadsheets from structured data
- SDKs — Official TypeScript, Python, and Go SDKs
- Credits & Pricing — Understand the credit system and plans
- Changelog — Latest updates and releases
- Report a Bug — File issues and feature requests