Base URL: https://api.ramlabs.dev
All authenticated endpoints require Authorization: Bearer header.
Create a free API key (no auth required).
Request:
{ "email": "you@example.com", "name": "My App" }
Response (201):
{
"id": "uuid",
"key": "rex_...",
"prefix": "rex_abcd1234",
"name": "My App",
"email": "you@example.com",
"plan": "free",
"monthlyLimit": 100,
"rateLimit": 60,
"message": "Store this key securely — it cannot be retrieved again."
}
Extract structured data from a document.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
document | string | Yes | Document content (text or base64-encoded) |
documentType | string | No | "text" (default), "pdf", or "image" |
schema | string or object | Yes | Template name or custom schema object |
options | object | No | { model, temperature, maxTokens, includeConfidence } |
{
"data": { "...extracted fields..." },
"confidence": { "field_name": 0.95 },
"model": "claude-sonnet-4-20250514",
"usage": { "inputTokens": 245, "outputTokens": 180 },
"processingTimeMs": 1250
}
List available pre-built schema templates.
Get full details of a specific schema template.
Get current API key info and 30-day usage stats.
Revoke the current API key (irreversible).
Get current plan, limits, and monthly usage.
Create a checkout session for a paid plan.
Get the subscription management portal URL.
| Plan | Requests/min | Extractions/month | Price |
|---|---|---|---|
| Free | 60 | 100 | $0 |
| Starter | 60 | 1,000 | $49/mo |
| Pro | 120 | 5,000 | $199/mo |
| Scale | 300 | 25,000 | $499/mo |
| Code | HTTP | Description |
|---|---|---|
MISSING_DOCUMENT | 400 | No document provided |
MISSING_SCHEMA | 400 | No schema provided |
UNKNOWN_TEMPLATE | 400 | Invalid template name |
INVALID_SCHEMA | 400 | Custom schema missing name or fields |
EXTRACTION_FAILED | 500 | AI extraction error |