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

# Generate meta tags

> Generate optimized meta title and description for a page topic using AI. Results are cached for 24 hours for identical topics.



## OpenAPI

````yaml https://api.surnex.io/openapi.json post /v1/content/meta-tags
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/content/meta-tags:
    post:
      tags:
        - Content Generation
      summary: Generate meta tags
      description: >-
        Generate optimized meta title and description for a page topic using AI.
        Results are cached for 24 hours for identical topics.
      operationId: generate_meta_tags_v1_content_meta_tags_post
      parameters:
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaTagRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_MetaTagResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    MetaTagRequest:
      properties:
        topic:
          type: string
          maxLength: 500
          minLength: 1
          title: Topic
          description: Page topic or subject.
        target_keywords:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 10
            - type: 'null'
          title: Target Keywords
          description: Optional focus keywords.
        description_length:
          type: integer
          maximum: 300
          minimum: 50
          title: Description Length
          description: Max meta description length.
          default: 160
      type: object
      required:
        - topic
      title: MetaTagRequest
      description: Request for AI-generated meta tags.
    APIResponse_MetaTagResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/MetaTagResponse'
            - type: 'null'
      type: object
      title: APIResponse[MetaTagResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MetaTagResponse:
      properties:
        topic:
          type: string
          title: Topic
        results:
          items:
            $ref: '#/components/schemas/MetaTagResult'
          type: array
          title: Results
      type: object
      required:
        - topic
        - results
      title: MetaTagResponse
      description: Response containing generated meta tags.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MetaTagResult:
      properties:
        title:
          type: string
          title: Title
          description: Generated meta title.
        description:
          type: string
          title: Description
          description: Generated meta description.
        title_length:
          type: integer
          title: Title Length
          description: Character count of the title.
        description_length:
          type: integer
          title: Description Length
          description: Character count of the description.
        keyword_density:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Keyword Density
      type: object
      required:
        - title
        - description
        - title_length
        - description_length
      title: MetaTagResult
      description: A generated meta tag set.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````