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

# Optimize article SEO with streaming progress (Server-Sent Events)



## OpenAPI

````yaml /api-reference/ai-cms/openapi-TAGTEST.json post /ai/optimizeArticle/stream
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/optimizeArticle/stream:
    post:
      tags:
        - AI Automation
      summary: Optimize article SEO with streaming progress (Server-Sent Events)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - articleId
              properties:
                articleId:
                  type: string
                primaryKeyword:
                  type: string
                languages:
                  type: array
                  items:
                    type: string
                fields:
                  type: object
                  properties:
                    title:
                      type: boolean
                    summary:
                      type: boolean
                    content:
                      type: boolean
                    tags:
                      type: boolean
      responses:
        '200':
          description: Server-Sent Events stream with optimization progress
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/AIStreamEvent'
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        type: 'null'
components:
  schemas:
    AIStreamEvent:
      type: object
      properties:
        event:
          type: string
          examples:
            - start
            - progress
            - content_chunk
            - complete
            - error
        data:
          type: object
          additionalProperties: true
    Envelope:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        data:
          type:
            - object
            - 'null'
      required:
        - success
        - statusCode
        - message
        - data
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````