> ## Documentation Index
> Fetch the complete documentation index at: https://developers.octaviatech.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate full content (title, slug, summary, body)

> Multi-step pipeline with timeouts & fallbacks. `body` is returned as a stringified HTML-wrapper like `<div>{"body":"<div>…</div>"}</div>`.



## OpenAPI

````yaml /api-reference/ai-cms/openapi-TAGTEST.json post /ai/generateContent
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /ai/generateContent:
    post:
      tags:
        - AI Automation
      summary: Generate full content (title, slug, summary, body)
      description: >-
        Multi-step pipeline with timeouts & fallbacks. `body` is returned as a
        stringified HTML-wrapper like `<div>{"body":"<div>…</div>"}</div>`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - text
              properties:
                text:
                  type: string
                  description: High-level topic or brief; can include structure hints
                wordCount:
                  type: integer
                  description: Target words for body (default ~800)
            examples:
              Basic:
                value:
                  text: Write a beginner-friendly guide to intermittent fasting
                  wordCount: 1200
      responses:
        '200':
          description: OK (generated)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Content generated successfully
                data:
                  title: 'Intermittent Fasting: A Beginner’s Guide'
                  slug: intermittent-fasting-a-beginners-guide
                  summary: Short meta summary (<= 180 chars)…
                  body: <div>{"body":"<div><p>…</p></div>"}</div>
                  tokens:
                    used: 1600
                    remaining: 8400
                    limit: 10000
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AiContentResult'
        '406':
          description: Validation failed
        '500':
          description: Failed to generate content
components:
  schemas:
    Envelope:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        data:
          type:
            - object
            - 'null'
      required:
        - success
        - statusCode
        - message
        - data
    AiContentResult:
      type: object
      properties:
        title:
          type: string
        slug:
          type: string
        summary:
          type: string
        body:
          type: string
        aiGenerationId:
          type: string
        tokens:
          $ref: '#/components/schemas/Tokens'
    Tokens:
      type: object
      required:
        - used
        - remaining
        - limit
      properties:
        used:
          type: integer
        remaining:
          type: integer
        limit:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````