> ## 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.

# API Overview

> Use the WriterzRoom API to generate content, check generation status, retrieve templates, retrieve style profiles, and integrate structured content generation into external workflows.

The WriterzRoom API gives teams programmatic access to structured content generation.

Use it to submit generation requests, check status, retrieve available templates, retrieve style profiles, and connect WriterzRoom to external applications or internal workflows.

<Info>
  The API is designed for authenticated server-side usage. Do not expose private API keys in browser code, public repositories, or client-side applications.
</Info>

## API Overview

<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '12px', margin: '1.5rem 0' }}>
  <div style={{ border: '1px solid rgba(128,128,128,0.20)', borderRadius: '14px', padding: '16px', background: 'rgba(255,255,255,0.04)' }}>
    <div style={{ fontWeight: 800 }}>Generate</div>
    <div style={{ fontSize: '13px', color: 'var(--colors-content-secondary)' }}>Create content from templates and styles.</div>
  </div>

  <div style={{ border: '1px solid rgba(128,128,128,0.20)', borderRadius: '14px', padding: '16px', background: 'rgba(255,255,255,0.04)' }}>
    <div style={{ fontWeight: 800 }}>Track</div>
    <div style={{ fontSize: '13px', color: 'var(--colors-content-secondary)' }}>Poll requests until completion or failure.</div>
  </div>

  <div style={{ border: '1px solid rgba(128,128,128,0.20)', borderRadius: '14px', padding: '16px', background: 'rgba(255,255,255,0.04)' }}>
    <div style={{ fontWeight: 800 }}>Configure</div>
    <div style={{ fontSize: '13px', color: 'var(--colors-content-secondary)' }}>Retrieve templates, styles, and verticals.</div>
  </div>

  <div style={{ border: '1px solid rgba(128,128,128,0.20)', borderRadius: '14px', padding: '16px', background: 'rgba(255,255,255,0.04)' }}>
    <div style={{ fontWeight: 800 }}>Integrate</div>
    <div style={{ fontSize: '13px', color: 'var(--colors-content-secondary)' }}>Connect content generation to external systems.</div>
  </div>
</div>

## What You Can Do

<CardGroup cols={2}>
  <Card title="Generate Content" icon="sparkles" href="/api/generate-content">
    Submit a template, style profile, user inputs, and generation tier to create content.
  </Card>

  <Card title="Check Status" icon="activity" href="/api/check-generation-status">
    Poll a generation request by request ID until it completes or fails.
  </Card>

  <Card title="List Templates" icon="layout-template" href="/api/templates-api">
    Retrieve available content templates and their supported parameters.
  </Card>

  <Card title="List Style Profiles" icon="sliders-horizontal" href="/api/style-profiles-api">
    Retrieve available style profiles for tone, voice, depth, and audience behavior.
  </Card>
</CardGroup>

## Core API Flow

<Steps>
  <Step title="Authenticate">
    Send requests with the required Bearer token.
  </Step>

  <Step title="Choose a template and style profile">
    Use template and style profile identifiers to define the content structure and writing behavior.
  </Step>

  <Step title="Submit a generation request">
    Send the topic, audience, objective, dynamic parameters, and generation tier.
  </Step>

  <Step title="Receive a request ID">
    The API returns a request identifier that can be used to check generation progress.
  </Step>

  <Step title="Poll for completion">
    Check the generation status endpoint until the request completes or fails.
  </Step>

  <Step title="Save, export, or publish">
    Use the returned content in your product workflow, CMS, editorial process, or publishing pipeline.
  </Step>
</Steps>

## Base URL

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
https://api.writerzroom.com
```

## Authentication

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
Authorization: Bearer YOUR_API_KEY
```

## Common Integration Patterns

| Pattern             | Use Case                                                        |
| ------------------- | --------------------------------------------------------------- |
| Internal tools      | Generate content inside operational dashboards                  |
| Editorial workflows | Connect WriterzRoom to review and publishing processes          |
| CMS integrations    | Send generated content into external content systems            |
| Product features    | Embed structured generation inside a customer-facing product    |
| Reporting workflows | Generate briefs, summaries, and analysis from structured inputs |

## Operational Guidance

<AccordionGroup>
  <Accordion title="Use server-side API calls">
    Keep API keys on trusted backend services. Do not call WriterzRoom directly from browser code with private credentials.
  </Accordion>

  <Accordion title="Store request identifiers">
    Save every `request_id` returned by generation requests. It is required for polling and useful for support review.
  </Accordion>

  <Accordion title="Validate identifiers before batching">
    Retrieve templates and style profiles before submitting automated batches. This reduces avoidable validation failures.
  </Accordion>

  <Accordion title="Handle long-running jobs">
    Treat generation as asynchronous. Submit the request, store the request ID, then poll status until the job completes or fails.
  </Accordion>
</AccordionGroup>

<Warning>
  Never commit API keys to source control. Rotate keys immediately if exposure is suspected.
</Warning>

<CardGroup cols={2}>
  <Card title="API Authentication" icon="key" href="/api/authentication">
    Review authentication requirements.
  </Card>

  <Card title="Generate Content" icon="sparkles" href="/api/generate-content">
    Submit your first API generation request.
  </Card>

  <Card title="Endpoints Reference" icon="route" href="/api/endpoints">
    Review all documented endpoints.
  </Card>

  <Card title="Direct API Usage" icon="code-2" href="/api/sdk">
    Python and HTTP examples for server-side integration.
  </Card>

  <Card title="Postman Collection" icon="arrow-up-right" href="https://raw.githubusercontent.com/techthumb1/Agentic-Writer-LangGraph/main/mintlify/writerzroom-api.postman_collection.json">
    Import the WriterzRoom collection into Postman.
  </Card>
</CardGroup>
