Endpoints
The ScribePilot API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
/v1/generateStart Generation
Start async blog post generation. Returns a runId and statusUrl immediately. Poll the statusUrl for progress.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| topic | string | Yes | The blog topic (minimum 3 characters) |
| targetWordCount | number | No | Target word count (100–5 000). Default: 1500 |
| tone | string | No | Writing tone, e.g. "professional", "casual", "technical". Default: "professional" |
| quality | string | No | "premium" (30 credits/word, Opus), "standard" (20, Sonnet), or "economy" (10, Haiku). Default: "standard" |
| citationMode | string | No | "none", "basic", or "academic". Default: "none" |
| maxAttempts | number | No | Max write/rewrite attempts (1–5). Default: 5 |
| keywords | string[] | No | SEO keywords to incorporate |
| category | string | No | Blog category for organization |
| idempotencyKey | string | No | Unique key for duplicate request prevention |
| options | object | No | Advanced: { customInstructions, sourceUrls, outline } |
{
"topic": "The Future of AI in Content Marketing",
"targetWordCount": 1500,
"tone": "professional",
"quality": "standard",
"keywords": ["AI", "content marketing"],
"category": "Technology"
}{
"runId": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"creditsReserved": 30000,
"balanceAfter": 270000,
"statusUrl": "/api/v1/generate/status?runId=550e8400-..."
}/v1/generate/status?runId={runId}Get Generation Status
Poll for generation progress using the runId from POST /generate. Returns status, currentStep, and progress (0-100).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| runId | string | Yes | The run ID returned from POST /generate (query param) |
{
"runId": "550e8400-...",
"status": "running",
"currentStep": "writing",
"progress": 60,
"attempt": 2,
"result": null
}/v1/generate/cancelCancel Generation
Cancel an in-progress generation. Reserved credits are refunded.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| runId | string | Yes | The run ID to cancel |
{ "runId": "550e8400-..." }{
"status": "cancelled",
"creditsRefunded": 30000
}/v1/creditsGet Credit Balance
Get your current credit balance, plan details, and per-quality pricing.
{
"balance": 270000,
"plan": "pro",
"pricing": {
"premium": 30,
"standard": 20,
"economy": 10
}
}/v1/postsList Posts
Retrieve a paginated list of all generated posts with their status and metadata.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | No | Results per page (default: 20, max: 100) |
| offset | number | No | Pagination offset |
/v1/posts/{id}Get Post
Retrieve the full content and details of a specific post.
/v1/posts/{id}Update Post
Update a post (e.g., change status to published).
/v1/posts/{id}Delete Post
Permanently delete a post.
Base URL
https://www.scribepilot.ai/apiLegacy Field Aliases
For backward compatibility, the generate endpoint also accepts these legacy fields:
style→ mapped totonelength("short" | "medium" | "long") → mapped totargetWordCount(800 / 1500 / 2500)