Loading...
Loading...
Generate documents programmatically. Browse templates, generate AI-powered documents, and manage everything via our REST API.
The CreateDocs.ai API is a RESTful service that lets you integrate AI-powered document generation into your applications. Use it to browse our library of templates, generate customized documents with AI, and retrieve or list your generated documents.
https://createdocs.ai/api/v1Authorization headerAll API requests require an API key passed in the Authorization header as a Bearer token. You can generate an API key from your dashboard settings.
Authorization: Bearer <api-key>
curl -H "Authorization: Bearer sk_live_abc123def456" \ https://createdocs.ai/api/v1/templates
Keep your API key secret. Do not expose it in client-side code or public repositories. If compromised, rotate it immediately from your dashboard.
/api/v1/templatesAllList available templates with filtering and pagination.
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | No | Search templates by name or description |
| category | string | No | Filter by category slug |
| page | integer | No | Page number (default: 1) |
| perPage | integer | No | Items per page (default: 20, max: 100) |
{
"data": [
{
"id": "clx1abc23",
"name": "Non-Disclosure Agreement",
"slug": "non-disclosure-agreement",
"description": "A standard mutual NDA for business partnerships.",
"category": {
"id": "clxcat01",
"name": "Legal",
"slug": "legal"
},
"inputSchema": { ... },
"isPublic": true,
"createdAt": "2025-09-15T10:30:00Z"
}
],
"meta": {
"total": 3638,
"page": 1,
"perPage": 20,
"totalPages": 182
}
}/api/v1/templates/:idAllGet a single template with its full input schema and metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Template ID |
{
"id": "clx1abc23",
"name": "Non-Disclosure Agreement",
"slug": "non-disclosure-agreement",
"description": "A standard mutual NDA for business partnerships.",
"category": {
"id": "clxcat01",
"name": "Legal",
"slug": "legal"
},
"inputSchema": {
"type": "object",
"properties": {
"party_name": { "type": "string", "title": "Party Name" },
"effective_date": { "type": "string", "title": "Effective Date" },
"confidential_info": { "type": "string", "title": "Confidential Information" }
},
"required": ["party_name"]
},
"outputFormat": "markdown",
"estimatedTokens": 1500,
"createdAt": "2025-09-15T10:30:00Z"
}/api/v1/documents/generateStarterGenerate a new document from a template using AI. Consumes 1 credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| templateId | string | Yes | ID of the template to use |
| inputs | object | Yes | Key-value pairs matching the template inputSchema |
| options.tone | string | No | Tone of the output: formal, casual, friendly, professional (default: professional) |
| options.length | string | No | Output length: short, standard, detailed (default: standard) |
{
"templateId": "clx1abc23",
"inputs": {
"party_name": "Acme Corp",
"effective_date": "2026-04-01"
},
"options": {
"tone": "formal",
"length": "standard"
}
}{
"id": "doc_abc123xyz",
"content": "# NON-DISCLOSURE AGREEMENT\n\nThis Non-Disclosure Agreement (\"Agreement\") is entered into as of April 1, 2026...",
"format": "markdown",
"creditsUsed": 1,
"createdAt": "2026-03-28T14:22:00Z"
}/api/v1/documents/:idAllRetrieve a specific generated document by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Document ID |
{
"id": "doc_abc123xyz",
"templateId": "clx1abc23",
"templateName": "Non-Disclosure Agreement",
"content": "# NON-DISCLOSURE AGREEMENT\n\n...",
"format": "markdown",
"inputs": {
"party_name": "Acme Corp",
"effective_date": "2026-04-01"
},
"createdAt": "2026-03-28T14:22:00Z",
"updatedAt": "2026-03-28T14:22:00Z"
}/api/v1/documentsAllList all documents generated by the authenticated user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number (default: 1) |
| perPage | integer | No | Items per page (default: 20, max: 100) |
{
"data": [
{
"id": "doc_abc123xyz",
"templateId": "clx1abc23",
"templateName": "Non-Disclosure Agreement",
"format": "markdown",
"createdAt": "2026-03-28T14:22:00Z"
}
],
"meta": {
"total": 47,
"page": 1,
"perPage": 20,
"totalPages": 3
}
}/api/v1/usageAllGet current usage statistics including daily, weekly, and monthly credit consumption.
{
"plan": "Pro",
"usage": {
"daily": {
"used": 12,
"limit": 50,
"remaining": 38,
"resetsAt": "2026-03-29T00:00:00Z"
},
"weekly": {
"used": 87,
"limit": 275,
"remaining": 188,
"resetsAt": "2026-03-31T00:00:00Z"
},
"monthly": {
"used": 312,
"limit": 1000,
"remaining": 688,
"resetsAt": "2026-04-01T00:00:00Z"
}
},
"bonusCredits": 50
}API calls that generate documents consume credits. Each plan has daily, weekly, and monthly limits. When a limit is reached, requests return a 429 Too Many Requests error until the limit resets.
| Plan | Daily | Weekly | Monthly | Price |
|---|---|---|---|---|
| Free | 3 | 10 | 15 | $0 |
| Solo | 50 | 275 | 1,000 | $67/mo |
| Team | 200 | 1,000 | 4,000 | $109/seat/mo |
| Business | 500 | 2,500 | 15,000 | $179/seat/mo |
| Enterprise | Custom | Custom | Custom | Custom |
Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset.
Connect CreateDocs.ai to 6,000+ apps via Zapier. Use the Generate Document action to create documents from any Zapier trigger — new CRM contact, form submission, webhook, or calendar event.
Pro Plan required
API access and Zapier integration require a Pro plan or above.
https://createdocs.ai/api/v1/zapierX-API-Key: your_api_keyPOST https://createdocs.ai/api/v1/zapier
X-API-Key: sk_live_your_api_key
Content-Type: application/json
{
"template_id": "clx1abc23",
"title": "NDA for {{contact_name}}",
"fields": {
"party_name": "{{contact_name}}",
"effective_date": "{{today}}",
"state": "California"
},
"output_format": "markdown"
}{
"id": "doc_abc123",
"title": "NDA for Acme Corp",
"content": "NON-DISCLOSURE AGREEMENT\n\nThis Agreement is entered into...",
"download_url": "https://createdocs.ai/api/v1/documents/doc_abc123/download?token=...",
"document_url": "https://createdocs.ai/dashboard/documents/doc_abc123",
"template_name": "Non-Disclosure Agreement",
"output_format": "markdown",
"created_at": "2026-04-11T14:22:00.000Z"
}The download_url is valid for 1 hour. The document_url is a permanent link to the document in your dashboard.
Use the Zapier authentication test step with a GET request to verify your API key:
GET https://createdocs.ai/api/v1/zapier
X-API-Key: sk_live_your_api_key
# Returns:
{
"authenticated": true,
"user": { "name": "Your Name", "email": "[email protected]" },
"tenant": { "name": "Your Workspace", "plan": "PRO" }
}All errors follow a consistent JSON format. The HTTP status code indicates the error category.
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Daily generation limit reached. Resets at 2026-03-29T00:00:00Z.",
"status": 429
}
}| Status | Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Missing or invalid parameters in the request body |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | API key does not have permission for this action |
| 404 | NOT_FOUND | The requested resource does not exist |
| 422 | VALIDATION_ERROR | Request body failed validation against the template schema |
| 429 | RATE_LIMIT_EXCEEDED | Credit limit reached for the current period |
| 500 | INTERNAL_ERROR | An unexpected error occurred on the server |
Complete examples showing how to generate a document using different languages.
# List templates
curl -X GET "https://createdocs.ai/api/v1/templates?category=legal&perPage=10" \
-H "Authorization: Bearer sk_live_your_api_key"
# Generate a document
curl -X POST "https://createdocs.ai/api/v1/documents/generate" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"templateId": "clx1abc23",
"inputs": {
"party_name": "Acme Corp",
"effective_date": "2026-04-01"
},
"options": {
"tone": "formal",
"length": "standard"
}
}'
# Check usage
curl -X GET "https://createdocs.ai/api/v1/usage" \
-H "Authorization: Bearer sk_live_your_api_key"const API_KEY = 'sk_live_your_api_key';
const BASE_URL = 'https://createdocs.ai/api/v1';
// List templates
const templates = await fetch(`${BASE_URL}/templates?category=legal`, {
headers: { 'Authorization': `Bearer ${API_KEY}` },
}).then(res => res.json());
console.log(templates.data);
// Generate a document
const doc = await fetch(`${BASE_URL}/documents/generate`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
templateId: 'clx1abc23',
inputs: {
party_name: 'Acme Corp',
effective_date: '2026-04-01',
},
options: { tone: 'formal', length: 'standard' },
}),
}).then(res => res.json());
console.log(doc.id, doc.content);
// Get usage
const usage = await fetch(`${BASE_URL}/usage`, {
headers: { 'Authorization': `Bearer ${API_KEY}` },
}).then(res => res.json());
console.log(usage);import requests
API_KEY = "sk_live_your_api_key"
BASE_URL = "https://createdocs.ai/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# List templates
templates = requests.get(
f"{BASE_URL}/templates",
headers=headers,
params={"category": "legal", "perPage": 10},
).json()
print(templates["data"])
# Generate a document
doc = requests.post(
f"{BASE_URL}/documents/generate",
headers={**headers, "Content-Type": "application/json"},
json={
"templateId": "clx1abc23",
"inputs": {
"party_name": "Acme Corp",
"effective_date": "2026-04-01",
},
"options": {"tone": "formal", "length": "standard"},
},
).json()
print(doc["id"], doc["content"])
# Check usage
usage = requests.get(f"{BASE_URL}/usage", headers=headers).json()
print(usage)