API Documentation
Everything you need to integrate the Repurpose API.
Getting Started
1. Get your API key by signing up:
curl -X POST https://your-app.vercel.app/api/auth/signup \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'This returns your API key. Store it securely — it won't be shown again.
2. Make your first request:
curl -X POST https://your-app.vercel.app/api/v1/repurpose \
-H "Content-Type: application/json" \
-H "x-api-key: rp_live_your_key_here" \
-d '{
"content": "Your blog post or article text here...",
"platforms": ["twitter", "linkedin"],
"tone": "professional"
}'Authentication
Include your API key in the x-api-key header with every request.
| Header | Value | Required |
|---|---|---|
| x-api-key | Your API key (rp_live_...) | Yes |
| Content-Type | application/json | Yes |
POST /api/v1/repurpose
Transform content into platform-specific posts.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | * | The source content to repurpose (10-50,000 chars) |
| source_url | string | * | URL to extract content from (alternative to content) |
| platforms | string[] | Yes | Array of: twitter, linkedin, reddit, email, instagram |
| tone | string | No | professional, casual, witty, authoritative, friendly (default: professional) |
| language | string | No | ISO language code (default: en) |
| hashtags | boolean | No | Include hashtags in output (default: true) |
| thread | boolean | No | Generate Twitter thread instead of single tweet (default: false) |
* Either content or source_url must be provided.
Response
{
"success": true,
"data": {
"twitter": "string | string[]",
"linkedin": "string",
"reddit": { "title": "string", "body": "string" },
"email": { "subject": "string", "preview_text": "string", "body": "string" },
"instagram": "string"
},
"meta": {
"platforms": ["twitter", "linkedin"],
"tone": "professional",
"tokens_used": 847,
"latency_ms": 1203,
"requests_remaining": 99
}
}Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid JSON body |
| 400 | VALIDATION_ERROR | Request body validation failed |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | PLAN_RESTRICTED | Platform not available on your plan |
| 422 | URL_FETCH_ERROR | Failed to fetch content from source URL |
| 429 | RATE_LIMITED | Monthly request limit exceeded |
| 500 | INTERNAL_ERROR | Server error |
Rate Limits
Rate limits are tracked via response headers:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Your monthly request limit |
| X-RateLimit-Remaining | Requests remaining this month |
| Plan | Requests/mo | Platforms | Price |
|---|---|---|---|
| Free | 100 | Twitter, LinkedIn, Reddit | $0 |
| Starter | 1,000 | All platforms | $29/mo |
| Pro | 5,000 | All + bulk | $79/mo |
| Scale | 25,000 | All + webhooks | $199/mo |