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

# SEO optimize text (content + metaDescription)



## OpenAPI

````yaml /api-reference/ai-cms/openapi-TAGTEST.json post /ai/seoOptimize
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/seoOptimize:
    post:
      tags:
        - AI Automation
      summary: SEO optimize text (content + metaDescription)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - text
              properties:
                text:
                  type: string
                  description: Raw text/HTML to optimize
                keyword:
                  type: string
                  description: Primary keyword to target
                  example: intermittent fasting
            examples:
              Basic:
                value:
                  text: <p>Article body…</p>
                  keyword: intermittent fasting
      responses:
        '200':
          description: OK (optimized)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: OK
                data:
                  content: <p>Optimized content…</p>
                  metaDescription: Compelling meta (<= 160 chars)…
                  tokens:
                    used: 220
                    remaining: 9780
                    limit: 10000
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AiSeoResult'
        '406':
          description: Validation failed
        '500':
          description: Failed to optimize text for SEO
components:
  schemas:
    Envelope:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        data:
          type:
            - object
            - 'null'
      required:
        - success
        - statusCode
        - message
        - data
    AiSeoResult:
      type: object
      properties:
        contentHtml:
          type: string
        metaDescription:
          type: string
        aiSeoScore:
          type: number
        suggestedKeywords:
          type: array
          items:
            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

````