# Rynko - Enterprise Governance Layer for Production AI

> Markdown mirror of DialtoneApp's public top-site detail page for `rynko.dev`.

URL: https://dialtoneapp.com/top-sites/rynko.dev/index.md
Canonical HTML: https://dialtoneapp.com/top-sites/rynko.dev

## Summary

- Domain: `rynko.dev`
- Website: https://rynko.dev
- Description: callable surface | score 34 | purchase read only
- Label: callable_surface
- Payment surface: Not available
- Purchase boundary: read_only
- Control boundary: unknown
- Rank: 866

## robots

~~~text
# Allow all search engines
User-agent: *
Allow: /

# Disallow admin/internal pages
Disallow: /api/

# Sitemap location
Sitemap: https://www.rynko.dev/sitemap.xml
~~~

## llms

~~~text
# Rynko

> Rynko is a document generation platform that creates professional PDF and Excel documents from JSON templates with dynamic data in a single API call. Design templates in a visual editor, then generate documents programmatically via API.

**Core Value**: Replace complex PDF generation setups (Puppeteer, wkhtmltopdf, DocRaptor) with one simple API. Design once, generate unlimited documents.

## Key API Endpoint

`POST https://api.rynko.dev/api/v1/documents/generate` - Generate PDF or Excel from template

## Rendering Engine

Rynko uses a **native rendering engine** (not HTML-to-PDF conversion):
- **Sub-second generation**: 200-500ms typical (vs 3-8s for HTML-to-PDF)
- **Yoga Layout Engine**: Facebook's Flexbox engine (same as React Native)
- **28 Component Types**: Text, tables, charts, QR codes, barcodes, form fields
- **8 Chart Types**: Bar, line, pie, doughnut, area, radar, polar area, scatter
- **10 Barcode Formats**: Code128, Code39, EAN-13/8, UPC-A/E, ITF-14, PDF417, DataMatrix, QR
- **9 PDF Form Fields**: Text, textarea, checkbox, radio, dropdown, signature, date, button, image
- **TextRuns**: JSON-based rich text (no HTML parsing, zero XSS surface)
- **Hybrid Logic**: JavaScript expressions + Excel formulas in same template

## Pricing

### Subscription Tiers

| Tier | Documents/Month | Project Members | Price |
|------|-----------------|--------------|-------|
| Free | 50 | 1 | $0 |
| Starter | 500 | 3 | $19/mo |
| Growth | 2,500 | 10 | $49/mo |
| Scale | 10,000 | Unlimited | $99/mo |

### Credit Packs (One-Time Purchase)

| Pack | Documents | Price | Per Doc |
|------|-----------|-------|---------|
| Small | 500 | $15 | $0.03 |
| Large | 2,500 | $50 | $0.02 |

**Key Features by Tier**:
- **Free**: Watermarked documents, 1 environment
- **Starter**: No watermark, webhooks, 2 environments
- **Growth**: PDF form fields, Google Sheets add-on, batch generation, 5 environments
- **Scale**: Priority support, SLA, unlimited environments

## Quick Example

```javascript
const response = await fetch('https://api.rynko.dev/api/v1/documents/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    templateId: 'invoice-template',
    format: 'pdf',
    variables: {
      invoiceNumber: 'INV-2026-001',
      customerName: 'Acme Corp',
      items: [
        { description: 'Consulting', quantity: 10, price: 150.00 }
      ],
      total: 1500.00
    }
  })
});

const { downloadUrl, statusUrl } = await response.json();
```

## Rynko Extract — AI Data Extraction

Rynko Extract is a schema-driven AI extraction engine that turns unstructured files (PDF, images, Excel, CSV, JSON, XML, text) into structured JSON with per-field confidence scores. Supports multi-file extraction with conflict detection, and integrates with Flow for automated validation.

- **API**: `POST /api/extract/jobs` — Create extraction job
- **Discovery**: `POST /api/extract/discover` — AI suggests schema from sample files
- **Flow Integration**: `POST /api/flow/gates/:gateId/extract` — Extract + validate in one call
- **Full Reference**: https://rynko.dev/llms-extract.txt

## Rynko Flow — AI Output Validation

Rynko Flow is an AI output validation gateway. Agents submit payloads to a Gate; Flow validates them against a schema, expression-based business rules, and optional AI Judge (LLM semantic evaluation), routes edge cases to human approvers, and delivers results via webhook.

- **API**: `POST /api/flow/gates/:gateId/run` — Submit payload for validation
- **AI Judge**: Optional LLM evaluation layer — define criteria in plain English, get structured pass/fail verdicts with confidence scores. Available on paid tiers.
- **Full Reference**: https://rynko.dev/llms-flow.txt

## Core Documentation

- [Getting Started](/getting-started): Create account, API keys, first document
- [Generating Documents](/developer-guide/generating-documents): Complete API guide
- [Template Schema](/developer-guide/template-schema): JSON schema for templates

## Integrations

### Official SDKs
- **Node.js**: `@rynko/sdk` — npm: https://www.npmjs.com/package/@rynko/sdk | GitHub: https://github.com/rynko-dev/sdk-node
- **Python**: `rynko` — PyPI: https://pypi.org/project/rynko/ | GitHub: https://github.com/rynko-dev/sdk-python
- **Java**: `dev.rynko:sdk` — Maven: https://central.sonatype.com/artifact/dev.rynko/sdk | GitHub: https://github.com/rynko-dev/sdk-java

### No-Code Platforms
- Zapier, Make.com, n8n

### Other
- Google Sheets Add-on: Mail merge and batch document generation
- Webhooks: Real-time document.generated, document.failed events
- MCP Server: AI agent integration for Claude, GPT, etc.

## Output Formats

| Feature | PDF | Excel |
|---------|-----|-------|
| Charts | Yes | Yes (as images for consistency) |
| Tables | Yes | Yes (with Excel formulas) |
| QR/Barcodes | Yes | Yes |
| Form Fields | Yes (9 types) | No |
| Flexbox Layout | Yes (Yoga) | No |
| Multi-page/sheet | Yes | Yes |
| Custom Fonts | Yes | No |

## Security

- TLS 1.3 encryption
- Signed download URLs (time-limited)
- GDPR compliant
- SOC 2 Type II (in progress)

## Links

- Website: https://rynko.dev
- Docs: https://docs.rynko.dev
- API Reference: https://docs.rynko.dev/api-reference
- Status: https://status.rynko.dev
- Node.js SDK: https://www.npmjs.com/package/@rynko/sdk
- Python SDK: https://pypi.org/project/rynko/
- Java SDK: https://central.sonatype.com/artifact/dev.rynko/sdk
- SDK Reference: https://docs.rynko.dev/llms-sdk-reference.txt
- Flow Reference: https://rynko.dev/llms-flow.txt
- Extract Reference: https://rynko.dev/llms-extract.txt
~~~

## llms-full

~~~text
# Rynko Complete Documentation

> This file contains comprehensive Rynko documentation for LLM consumption.
> Rynko is a document generation platform for creating professional PDF and Excel documents.
> Last Updated: January 2026

---

## Overview

Rynko is a document generation API that creates professional PDF and Excel documents from JSON templates with dynamic data. The platform uses a **native rendering engine** (not HTML-to-PDF conversion) for sub-second document generation.

**Key Differentiators:**
- **Sub-second generation**: 200-500ms typical vs 3-8s for HTML-to-PDF approaches
- **Yoga Layout Engine**: Facebook's Flexbox engine (same as React Native) for pixel-perfect PDF layouts
- **Hybrid Logic**: JavaScript expressions + Excel formulas in the same template
- **TextRuns**: JSON-based rich text formatting without HTML parsing (zero XSS surface)
- **Visual Consistency**: Charts rendered as images for identical appearance across all viewers

---

## Pricing

### Subscription Tiers

| Tier | Documents/Month | Project Members | Environments | Retention | Price |
|------|-----------------|--------------|------------|-----------|-------|
| Free | 50 | 1 | 1 | 1 day | $0/month |
| Starter | 500 | 3 | 2 | 1 day | $19/month |
| Growth | 2,500 | 10 | 5 | 3 days | $49/month |
| Scale | 10,000 | Unlimited | Unlimited | 3 days | $99/month |

### Credit Packs (One-Time Purchase)

| Pack | Documents | Price | Per Document |
|------|-----------|-------|--------------|
| Small | 500 | $15 | $0.03 |
| Large | 2,500 | $50 | $0.02 |

### Features by Tier

**Free Tier:**
- 50 documents/month (watermarked)
- 1 project member, 1 environment
- Visual template designer
- REST API access
- Community support

**Starter Tier ($19/month):**
- 500 documents/month (no watermark)
- 3 project members, 2 environments
- Webhook notifications
- Email support

**Growth Tier ($49/month):**
- 2,500 documents/month
- 10 project members, 5 environments
- PDF form fields (9 types)
- Google Sheets add-on
- Batch generation (async)
- 3-day document retention

**Scale Tier ($99/month):**
- 10,000 documents/month
- Unlimited project members & environments
- Priority support with SLA
- Static IP add-on available

### Account Policies

- **Credits never expire** while account is active
- **Active account**: Any login, API call, or integration use within 12 months
- **Dormant accounts**: After 12 months inactivity, credits reset to zero
- **Templates preserved**: Always retained even for dormant accounts

---

## API Reference

### Base URL

```
https://api.rynko.dev/api
```

### Authentication

All API requests require authentication via Bearer token:

```
Authorization: Bearer YOUR_API_KEY
```

API keys are created in the dashboard under Settings > API Keys.

### Document Generation

#### Generate Document

```http
POST /v1/documents/generate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "templateId": "invoice-template",
  "format": "pdf",
  "variables": {
    "invoiceNumber": "INV-2026-001",
    "customerName": "Acme Corp",
    "items": [
      { "description": "Consulting", "quantity": 10, "price": 150.00 }
    ],
    "total": 1500.00
  }
}
```

**Response (Sync - small documents):**
```json
{
  "jobId": "doc_abc123",
  "status": "completed",
  "downloadUrl": "https://cdn.rynko.dev/documents/...",
  "expiresAt": "2026-01-21T12:00:00Z"
}
```

**Response (Async - large documents):**
```json
{
  "jobId": "doc_abc123",
  "status": "processing",
  "statusUrl": "https://api.rynko.dev/api/v1/documents/jobs/doc_abc123",
  "estimatedWaitSeconds": 5
}
```

#### Check Job Status

```http
GET /v1/documents/jobs/{jobId}
```

**Response:**
```json
{
  "jobId": "doc_abc123",
  "status": "completed",
  "downloadUrl": "https://cdn.rynko.dev/documents/...",
  "format": "pdf",
  "createdAt": "2026-01-20T10:00:00Z",
  "completedAt": "2026-01-20T10:00:00.450Z"
}
```

**Status values:** `pending`, `processing`, `completed`, `failed`

#### Batch Generation

```http
POST /v1/documents/batch
Content-Type: application/json

{
  "templateId": "invoice-template",
  "format": "pdf",
  "items": [
    { "variables": { "invoiceNumber": "INV-001", ... } },
    { "variables": { "invoiceNumber": "INV-002", ... } },
    { "variables": { "invoiceNumber": "INV-003", ... } }
  ]
}
```

### Templates

#### List Templates

```http
GET /v1/templates?type=attachment&limit=20&offset=0
```

#### Get Template

```http
GET /v1/templates/{templateId}
```

Templates can be identified by:
- **UUID**: `550e8400-e29b-41d4-a716-446655440000`
- **Short ID**: `atpl_a1b2c3d4`
- **Slug**: `invoice-template`

### Webhooks

#### Create Webhook Subscription

```http
POST /v1/webhook-subscriptions
Content-Type: application/json

{
  "url": "https://your-server.com/webhooks/rynko",
  "events": ["document.generated", "document.failed"],
  "description": "Production webhook"
}
```

**Webhook Events:**
- `document.generated` - Document successfully created
- `document.failed` - Document generation failed
- `document.downloaded` - Document was downloaded
- `batch.completed` - Batch generation finished

**Webhook Payload:**
```json
{
  "event": "document.generated",
  "timestamp": "2026-01-20T12:00:00.000Z",
  "data": {
    "jobId": "doc_abc123",
    "templateId": "atpl_xyz789",
    "format": "pdf",
    "status": "completed",
    "downloadUrl": "https://cdn.rynko.dev/documents/..."
  }
}
```

**Signature Verification:**
```javascript
const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expectedSig = crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
  return `v1=${expectedSig}` === signature;
}

// In your webhook handler:
const signature = req.headers['x-rynko-signature'];
const isValid = verifySignature(req.body, signature, webhookSecret);
```

---

## Template Components

Rynko templates support 28 component types across 4 categories.

### Basic Components (7)

| Component | Type | PDF | Excel | Description |
|-----------|------|-----|-------|-------------|
| Text | `text` | Yes | Yes | Plain text with styling |
| Heading | `heading` | Yes | Yes | H1-H6 headings |
| TextRuns | `textRuns` | Yes | Yes | Rich text with inline formatting |
| Image | `image` | Yes | Yes | Images from URL or base64 |
| Line | `line` | Yes | No | Horizontal line |
| Rectangle | `rectangle` | Yes | No | Rectangle shape |
| Spacer | `spacer` | Yes | No | Vertical spacing |
| Page Break | `pageBreak` | Yes | Yes | Force page/sheet break |

### Layout Components (5)

| Component | Type | PDF | Excel | Description |
|-----------|------|-----|-------|-------------|
| Container | `container` | Yes | No | Wrapper with styling |
| Columns | `columns` | Yes | Yes | Multi-column layout |
| Column | `column` | Yes | Yes | Single column in Columns |
| Table Layout | `tableLayout` | Yes | Yes | Grid-based layout |
| Loop | `loop` | Yes | Yes | Iterate over array data |

### Advanced Components (7)

| Component | Type | PDF | Excel | Description |
|-----------|------|-----|-------|-------------|
| Chart | `chart` | Yes | Yes | 8 chart types |
| QR Code | `qrCode` | Yes | Yes | QR code generation |
| Barcode | `barcode` | Yes | Yes | 10 barcode formats |
| Data Table | `dataTable` | Yes | Yes | Dynamic table from array |
| Calculated Variable | `calculatedVariable` | Yes | Yes | JavaScript expressions |
| Conditional | `conditional` | Yes | Yes | Show/hide based on condition |
| Section | `section` | Yes | Yes | Reusable section |

### Form Fields (9) - PDF Only

| Component | Type | Description |
|-----------|------|-------------|
| Text Field | `textField` | Single-line text input |
| Checkbox | `checkboxField` | Boolean checkbox |
| Radio | `radioField` | Radio button group |
| Dropdown | `dropdownField` | Select dropdown |
| Date Field | `dateField` | Date picker |
| Signature | `signatureField` | Signature placeholder |
| Textarea | `textareaField` | Multi-line text input |
| Number | `numberField` | Numeric input |
| Button | `buttonField` | Action button |

---

## Chart Types (8)

All charts are rendered as images for visual consistency across platforms.

| Type | Description | Best For |
|------|-------------|----------|
| `bar` | Vertical bar chart | Comparing categories |
| `line` | Line chart | Trends over time |
| `pie` | Pie chart | Proportional data |
| `doughnut` | Hollow pie chart | Proportional with center content |
| `area` | Filled line chart | Volume over time |
| `radar` | Radar/spider chart | Multi-axis comparison |
| `polarArea` | Radial segments | Categorical comparison |
| `scatter` | X-Y scatter plot | Correlation analysis |

**Chart Example:**
```json
{
  "type": "chart",
  "props": {
    "chartType": "bar",
    "dataSource": "{{salesData}}",
    "xAxis": "month",
    "yAxis": "revenue",
    "title": "Monthly Revenue",
    "colors": ["#2563eb", "#10b981", "#f59e0b"],
    "showLegend": true,
    "width": 600,
    "height": 400
  }
}
```

---

## Barcode Formats (10)

| Format | Type | Description |
|--------|------|-------------|
| Code 128 | `code128` | Alphanumeric, high density |
| Code 39 | `code39` | Alphanumeric, widely supported |
| EAN-13 | `ean13` | Retail products (13 digits) |
| EAN-8 | `ean8` | Small products (8 digits) |
| UPC-A | `upca` | North American retail (12 digits) |
| UPC-E | `upce` | Compressed UPC (8 digits) |
| ITF-14 | `itf14` | Shipping containers |
| PDF417 | `pdf417` | 2D stacked barcode |
| Data Matrix | `datamatrix` | 2D matrix barcode |
| QR Code | `qrcode` | 2D QR code |

**Barcode Example:**
```json
{
  "type": "barcode",
  "props": {
    "barcodeType": "code128",
    "value": "{{productCode}}",
    "width": 200,
    "height": 80,
    "includeText": true
  }
}
```

---

## TextRuns (Rich Text)

TextRuns provide JSON-based inline formatting without HTML parsing, eliminating XSS vulnerabilities.

**Example:**
```json
{
  "type": "textRuns",
  "runs": [
    { "text": "Invoice ", "bold": true },
    { "text": "#{{invoiceNumber}}", "color": "#2563eb" },
    { "text": " is ", "italic": true },
    { "text": "PAID", "bold": true, "color": "#16a34a" }
  ]
}
```

**TextRun Properties:**
- `text` (required) - The text content
- `bold` - Boolean
- `italic` - Boolean
- `underline` - Boolean
- `strikethrough` - Boolean
- `color` - Hex color (e.g., "#2563eb")
- `backgroundColor` - Hex color
- `fontSize` - Number in points
- `link` - URL string

---

## Logic Components

### Calculated Variables (JavaScript)

Server-side JavaScript expressions evaluated at render time.

```json
{
  "type": "calculatedVariable",
  "name": "lineTotal",
  "expression": "quantity * unitPrice"
}
```

**Supported:**
- Arithmetic: `+`, `-`, `*`, `/`, `%`
- Comparison: `===`, `!==`, `>`, `<`, `>=`, `<=`
- Logical: `&&`, `||`, `!`
- Math functions: `Math.round()`, `Math.max()`, `Math.min()`, `Math.abs()`, etc.
- Array methods: `map`, `filter`, `find`, `some`, `every`, `reduce`
- Ternary: `condition ? valueA : valueB`

### Excel Formulas (Excel Only)

Native Excel formulas that remain editable in generated files.

```json
{
  "header": "Total",
  "excelFormula": "=[@Quantity]*[@[Unit Price]]"
}
```

### Conditional Rendering

Variable names in conditions **must** be wrapped in `{{ }}` — the visual designer requires this syntax.

```json
{
  "type": "conditional",
  "condition": "{{status}} === 'paid'",
  "children": [
    { "type": "text", "content": "Payment received" }
  ]
}
```

### Loop Component

```json
{
  "type": "loop",
  "dataSource": "{{items}}",
  "itemVariable": "item",
  "indexVariable": "index",
  "children": [
    { "type": "text", "content": "{{item.name}}" }
  ]
}
```

---

## Integrations

### Official SDKs

**IMPORTANT — Version specifiers when generating code:**
- **Node.js**: Use `"@rynko/sdk": "latest"` in package.json or just `npm install @rynko/sdk`. Do NOT hardcode a version like `^1.0.0`.
- **Python**: Use `rynko` in requirements.txt (no version pin). Do NOT use `rynko==1.0.0`.
- **Java**: Use version `1.2.1` in pom.xml / build.gradle.

**Node.js** (`@rynko/sdk`):
- npm: https://www.npmjs.com/package/@rynko/sdk
- GitHub: https://github.com/rynko-dev/sdk-node

```javascript
import { Rynko } from '@rynko/sdk';

const client = new Rynko({ apiKey: 'YOUR_API_KEY' });

const result = await client.documents.generate({
  templateId: 'invoice-template',
  format: 'pdf',
  variables: { invoiceNumber: 'INV-001', ... }
});

// For async documents, wait for completion
if (result.status === 'processing') {
  const completed = await client.documents.waitForCompletion(result.jobId);
  console.log(completed.downloadUrl);
}
```

**Python** (`rynko`):
- PyPI: https://pypi.org/project/rynko/
- GitHub: https://github.com/rynko-dev/sdk-python

```python
from rynko import Rynko

client = Rynko(api_key="YOUR_API_KEY")

result = client.documents.generate(
    template_id="invoice-template",
    format="pdf",
    variables={"invoiceNumber": "INV-001", ...}
)

# For async documents
if result.status == "processing":
    completed = client.documents.wait_for_completion(result.job_id)
    print(completed.download_url)
```

**Java** (`dev.rynko:sdk`):
- Maven Central: https://central.sonatype.com/artifact/dev.rynko/sdk
- GitHub: https://github.com/rynko-dev/sdk-java

```java
import dev.rynko.Rynko;
import dev.rynko.models.GenerateRequest;
import dev.rynko.models.GenerateResult;

Rynko client = new Rynko(System.getenv("RYNKO_API_KEY"));

GenerateResult job = client.documents().generate(
    GenerateRequest.builder()
        .templateId("invoice-template")
        .format("pdf")
        .variable("invoiceNumber", "INV-001")
        .build()
);

GenerateResult completed = client.documents().waitForCompletion(job.getJobId());
System.out.println(completed.getDownloadUrl());
```

### No-Code Platforms

- **Zapier**: Triggers and actions for document generation
- **Make.com**: Full integration with modules
- **n8n**: Community node available

### Google Sheets Add-on

Generate documents from spreadsheet data:
- **Mail Merge**: One document per row
- **Master-Detail**: Group rows into summary documents
- **Variable Mapping**: Map columns to template variables
- **Google Drive**: Save directly to Drive folders

### MCP Server (AI Agents)

Connect AI agents (Claude, GPT) to Rynko for document generation:

```json
{
  "mcpServers": {
    "rynko": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-rynko"],
      "env": {
        "RYNKO_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

---

## Limits & Quotas

| Resource | Free | Starter | Growth | Scale |
|----------|------|---------|--------|-------|
| Documents/month | 50 | 500 | 2,500 | 10,000 |
| Template size | 500KB | 1MB | 2MB | 5MB |
| Variables per request | 100 | 500 | 1,000 | 5,000 |
| Batch size | 5 | 25 | 500 | 2,500 |
| Concurrent jobs | 1 | 1 | 2 | 5 |
| API rate limit | 10/min | 60/min | 120/min | 300/min |

---

## Security & Compliance

- **Encryption**: TLS 1.3 for data in transit, AES-256 for data at rest
- **Download URLs**: Signed, time-limited (24 hours default)
- **Data Retention**: Configurable per tier (1-3 days default)
- **GDPR**: Compliant with data removal requests
- **SOC 2 Type II**: Certification in progress

---

## Error Codes

| Code | Description |
|------|-------------|
| `ERR_AUTH_001` | Invalid or missing API key |
| `ERR_AUTH_004` | Token expired |
| `ERR_TMPL_001` | Template not found |
| `ERR_TMPL_003` | Template validation failed |
| `ERR_DOC_004` | Document generation failed |
| `ERR_QUOTA_001` | Monthly quota exceeded |
| `ERR_QUOTA_002` | Rate limit exceeded |

---

## Links

- **Website**: https://rynko.dev
- **Documentation**: https://docs.rynko.dev
- **API Reference**: https://docs.rynko.dev/api-reference
- **Status Page**: https://status.rynko.dev
- **Support**: support@rynko.dev
- **Node.js SDK (npm)**: https://www.npmjs.com/package/@rynko/sdk
- **Python SDK (PyPI)**: https://pypi.org/project/rynko/
- **Java SDK (Maven)**: https://central.sonatype.com/artifact/dev.rynko/sdk
- **SDK Reference**: https://docs.rynko.dev/llms-sdk-reference.txt
~~~