The Napisati Public API is a REST API that gives you programmatic access to everything in your account — generation types, style rules, generations, webhooks, team, and profile.
All requests are authenticated with an API key. All responses are JSON. The API is versioned under /api/v1.
Quick exports
Base URL
https://napisati.com/api/v1Authentication
Every request must include your API key in the Authorization header as a Bearer token. API keys start with sk_live_.
Authorization: Bearer sk_live_<your_key>You can create and manage your API keys in Settings → API Keys. A key is shown once at creation — store it somewhere safe.
Never expose your API key in client-side code, public repos, or frontend JavaScript. Treat it like a password.
Request format
For POST and PATCH requests, send a JSON body with the Content-Type: application/json header.
curl -X POST https://napisati.com/api/v1/generate \
-H "Authorization: Bearer sk_live_<your_key>" \
-H "Content-Type: application/json" \
-d '{"input_text": "Write a LinkedIn intro", "generation_type_id": "<uuid>"}'Response format
All successful responses wrap the payload in a data field. List endpoints also include pagination metadata.
// Single resource
{ "data": { "id": "uuid", ... } }
// List response
{
"data": [ ... ],
"total": 42,
"page": 1,
"limit": 20,
"total_pages": 3
}Error format
All errors return an appropriate HTTP status code and a JSON body with a machine-readable code and a human-readable error message.
{
"error": "Human-readable description",
"code": "MACHINE_CODE",
"details": { ... }, // optional extra context
"upgrade_url": "/settings/billing" // only on 402 responses
}| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | Missing or invalid API key |
| 402 | PLAN_LIMIT_REACHED | Action not allowed on your current plan |
| 400 | VALIDATION_ERROR | Missing or invalid request parameters |
| 400 | INPUT_TOO_LONG | input_text exceeds your plan's word limit |
| 403 | FORBIDDEN | You don't have permission for this action |
| 404 | NOT_FOUND | Resource doesn't exist or belongs to another user |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests — check X-RateLimit-* headers |
| 429 | DAILY_LIMIT_REACHED | Daily generation soft limit reached |
| 500 | DB_ERROR | Unexpected server error |
Rate limiting
Every response includes rate limit headers so you can track your current window.
X-RateLimit-Limit: 100 # max requests/minute for this endpoint
X-RateLimit-Remaining: 87 # remaining in current window
X-RateLimit-Reset: 1741965660 # epoch timestamp when window resets| Endpoint group | Limit | Window |
|---|---|---|
| All endpoints (standard) | 100 req | per minute, per API key |
| /api/v1/generate | 20 req | per minute, per API key |
When rate limited you get 429 with a Retry-After header (seconds until window resets).
Plan limits
Write operations that exceed your plan limits return 402 PLAN_LIMIT_REACHED. The response always includes an upgrade_url.
| Resource | Free | Writer | Pro | Team |
|---|---|---|---|---|
| API Access | ❌ | ✅ | ✅ | ✅ |
| Generations/month | 20 | 300 | ∞ | ∞ |
| Words/generation | 500 | 2 000 | 5 000 | 5 000 |
| Generation Types | 3 | 20 | ∞ | ∞ |
| Style Rules | 15 | ∞ | ∞ | ∞ |
| Webhooks | 0 | 5 | ∞ | ∞ |
| Daily soft limit | — | — | 200 | 500 |
Pagination
All list endpoints support page-based pagination via page and limit query parameters. Default page size is 20, max is 50.
GET /api/v1/generations?page=2&limit=10