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

# Generate Alternatives

> Generate status quo / incumbent alternative analysis from source materials using AI.



## OpenAPI

````yaml post /api/v2/alternative/generate
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/alternative/generate:
    post:
      tags:
        - Alternative
      summary: Generate Alternatives
      description: >-
        Generate status quo / incumbent alternative analysis from source
        materials using AI.
      operationId: generateAlternatives
      requestBody:
        description: Alternative generation input with source materials
        content:
          application/json:
            schema:
              type: object
              properties:
                primaryOfferingOId:
                  type: string
                  description: >-
                    Primary Offering to use as context when generating
                    alternatives. If not provided, the primary company attached
                    to the Workspace will be used.
                  example: o_123456
                linkingStrategy:
                  allOf:
                    - $ref: '#/components/schemas/LinkingStrategy'
                    - description: >-
                        Strategy for linking generated alternatives to offerings
                        (products/services)
                alternatives:
                  $ref: '#/components/schemas/AlternativeGenerationInputs'
                brandVoiceOId:
                  type: string
                  description: Brand voice oId to apply to generated alternatives
                  example: bv_123456
              required:
                - alternatives
      responses:
        '200':
          description: Alternatives generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        oId:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        deletedAt:
                          type: string
                          nullable: true
                        archivedAt:
                          type: string
                          nullable: true
                        name:
                          type: string
                        internalName:
                          type: string
                        description:
                          type: string
                        active:
                          type: boolean
                          default: true
                        data:
                          type: object
                          nullable: true
                          properties:
                            whereItWorks:
                              type: array
                              items:
                                type: string
                            whereItBreaks:
                              type: array
                              items:
                                type: string
                            whoChampionsThisApproach:
                              type: array
                              items:
                                type: string
                            whyOurApproachIsSuperior:
                              type: array
                              items:
                                type: string
                            perceivedBenefits:
                              type: array
                              items:
                                type: string
                            hiddenCostsAndPitfalls:
                              type: array
                              items:
                                type: string
                            customFields:
                              $ref: '#/components/schemas/CustomDataFields'
                          required:
                            - whereItWorks
                            - whereItBreaks
                            - whoChampionsThisApproach
                            - whyOurApproachIsSuperior
                            - perceivedBenefits
                            - hiddenCostsAndPitfalls
                        user:
                          type: object
                          nullable: true
                          properties:
                            oId:
                              type: string
                              nullable: true
                            firstName:
                              type: string
                              nullable: true
                              description: >-
                                The first name of the user who created the
                                alternative
                              example: John
                            lastName:
                              type: string
                              nullable: true
                              description: >-
                                The last name of the user who created the
                                alternative
                              example: Doe
                        workspace:
                          type: object
                          nullable: true
                          properties:
                            oId:
                              type: string
                              nullable: true
                      required:
                        - oId
                        - createdAt
                        - updatedAt
                        - name
                        - internalName
                        - description
                required:
                  - _metadata
                  - data
        '400':
          description: Bad request - invalid sources or unable to process
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '404':
          description: Offering not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    LinkingStrategy:
      oneOf:
        - $ref: '#/components/schemas/LinkingStrategyAll'
        - $ref: '#/components/schemas/LinkingStrategySpecific'
      discriminator:
        propertyName: mode
        mapping:
          ALL:
            $ref: '#/components/schemas/LinkingStrategyAll'
          SPECIFIC:
            $ref: '#/components/schemas/LinkingStrategySpecific'
      default:
        mode: ALL
      description: Strategy for linking this persona to offerings (products/services)
    AlternativeGenerationInputs:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: >-
              Optional name for the alternative - if provided, will be used as
              the entity name
            example: Spreadsheet + email stack
          sources:
            type: array
            items:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - TEXT
                    - URL
                    - RESOURCE
                  description: The type of source material
                  example: TEXT
                value:
                  type: string
                  minLength: 1
                  description: The source content (text, URL, or name)
                  example: Lead generation and qualification for enterprise sales
              required:
                - type
                - value
            description: Source materials to generate the alternative analysis from
        required:
          - sources
      minItems: 1
      description: >-
        Array of alternative generation requests - each object generates one
        status-quo / incumbent analysis
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          description: API usage
          example: 0
        requestId:
          type: string
          description: Request ID
          example: requestId
        message:
          type: string
          description: Message
          example: message
        timestamp:
          type: string
          description: Timestamp
          example: '2021-01-01T00:00:00.000Z'
      required:
        - requestId
        - timestamp
    CustomDataFields:
      type: array
      items:
        $ref: '#/components/schemas/CustomDataFieldItem'
    LinkingStrategyAll:
      type: object
      properties:
        mode:
          type: string
          enum:
            - ALL
          description: >-
            Link to all active offerings in the workspace (products, services,
            and solutions)
          example: ALL
      required:
        - mode
    LinkingStrategySpecific:
      type: object
      properties:
        mode:
          type: string
          enum:
            - SPECIFIC
          description: >-
            Link to specific offerings by their IDs (products, services, and
            solutions)
          example: SPECIFIC
        offeringOIds:
          type: array
          items:
            type: string
            minLength: 1
          minItems: 1
          description: >-
            Array of offering IDs to link to (supports product, service, and
            solution oIds)
          example:
            - px_123
            - sc_456
            - sv_789
      required:
        - mode
        - offeringOIds
    CustomDataFieldItem:
      type: object
      properties:
        title:
          type: string
        value:
          type: array
          items:
            type: string
      required:
        - title
        - value
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````