Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.writerzroom.com/llms.txt

Use this file to discover all available pages before exploring further.

Generation does not complete in the initial create request. You poll the status endpoint using the request_id returned from the original generation call. This keeps the API predictable for long-running content jobs.

Status Overview

Submit
Start a generation request.
Store
Save the returned request ID.
Poll
Check status at intervals.
Resolve
Return content or handle failure.

Request

GET https://api.writerzroom.com/v1/generate/status/{request_id}
Authorization: Bearer YOUR_API_KEY

Response: In Progress

{
  "request_id": "req_xyz789",
  "status": "processing",
  "stage": "writer",
  "progress": 60
}

Response: Completed

{
  "request_id": "req_xyz789",
  "status": "completed",
  "content": {
    "id": "cnt_abc123",
    "title": "The Future of AI in Content Marketing",
    "body": "...",
    "word_count": 1842,
    "created_at": "2026-03-10T20:03:42Z"
  }
}

Response: Failed

{
  "request_id": "req_xyz789",
  "status": "failed",
  "error": "Missing required input field: audience"
}

How to Poll

async function pollStatus(requestId, apiKey) {
  const maxAttempts = 30;
  const intervalMs = 8000;

  for (let i = 0; i < maxAttempts; i++) {
    const res = await fetch(
      `https://api.writerzroom.com/v1/generate/status/${requestId}`,
      { headers: { Authorization: `Bearer ${apiKey}` } }
    );

    const data = await res.json();

    if (data.status === "completed") return data.content;
    if (data.status === "failed") throw new Error(data.error);

    await new Promise((resolve) => setTimeout(resolve, intervalMs));
  }

  throw new Error("Generation timed out");
}

Polling Guidance

1

Submit the generation request

Send the original generation request and store the returned request_id.
2

Poll at a controlled interval

Check status every 5 to 10 seconds.
3

Stop on terminal status

Stop polling when status returns completed or failed.
4

Log unresolved jobs

If polling times out, log the request_id for support and audit review.
Poll every 5–10 seconds with a maximum of 20–30 attempts covering roughly 3 minutes. If status is still processing after that, log the request_id and contact support.

Generate Content

Submit the request that creates a generation job.

Endpoints Reference

Review available API endpoints.
Last modified on May 10, 2026