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

# Generate article idea with content prompt

> Generate an intelligent article idea with targeted keywords and return a clean XML prompt for third-party content generation systems.

This endpoint creates a durable workflow that:
- Selects customer avatar using priority-weighted randomization
- Chooses primary and related keyword targets
- Determines optimal blog format using AI
- Generates unique article concept and comprehensive XML prompt

**Authentication:**
- **Admin API keys**: Must provide account_id in request body, can generate ideas for any account
- **Account API keys**: Automatically use their associated account (account_id ignored if provided)

**Requirements:**
- Account must have at least one customer avatar configured
- Account must have unused keyword targets available
- Account business information must be configured




## OpenAPI

````yaml post /api/v1/content/articles/ideas
openapi: 3.1.0
info:
  title: SuprSonic API
  version: 1.0.0
  description: API for autonomous content generation and blog management
  contact:
    name: SuprSonic API Support
    url: https://www.suprsonic.com/support
    email: support@suprsonic.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://www.suprsonic.com
    description: Production server
  - url: http://localhost:3000
    description: Development server
security: []
tags: []
paths:
  /api/v1/content/articles/ideas:
    post:
      tags:
        - Content Generation
      summary: Generate article idea with content prompt
      description: >
        Generate an intelligent article idea with targeted keywords and return a
        clean XML prompt for third-party content generation systems.


        This endpoint creates a durable workflow that:

        - Selects customer avatar using priority-weighted randomization

        - Chooses primary and related keyword targets

        - Determines optimal blog format using AI

        - Generates unique article concept and comprehensive XML prompt


        **Authentication:**

        - **Admin API keys**: Must provide account_id in request body, can
        generate ideas for any account

        - **Account API keys**: Automatically use their associated account
        (account_id ignored if provided)


        **Requirements:**

        - Account must have at least one customer avatar configured

        - Account must have unused keyword targets available

        - Account business information must be configured
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  type: string
                  format: uuid
                  description: >-
                    Account UUID (required for admin API keys, ignored for
                    account API keys)
                  example: 550e8400-e29b-41d4-a716-446655440000
              examples:
                admin_request:
                  summary: Admin API key request
                  description: >-
                    Admin keys must specify which account to generate content
                    for
                  value:
                    account_id: 550e8400-e29b-41d4-a716-446655440000
                account_request:
                  summary: Account API key request
                  description: Account keys automatically use their associated account
                  value: {}
      responses:
        '200':
          description: Article idea generated successfully with XML prompt
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      prompt:
                        type: string
                        description: >-
                          Clean XML-formatted prompt ready for third-party
                          content generation
                      workflow_id:
                        type: string
                        description: Inngest workflow ID for tracking and observability
                      _links:
                        type: object
                        properties:
                          self:
                            type: string
                            format: uri
        '400':
          description: Bad request - Invalid input data or missing requirements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - API key cannot access specified account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error - Workflow execution failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AdminApiKey: []
        - AccountApiKey: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Invalid request data
            details:
              type: object
  securitySchemes:
    AdminApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin API key for managing accounts and creating content
    AccountApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Account-specific API key for accessing account data

````