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

# Create Generation



## OpenAPI

````yaml weaver POST /generations
openapi: 3.0.2
info:
  title: Kua.ai Weaver API
  version: '1.0'
servers:
  - url: https://api.kua.ai/weaver/api/v2
security: []
paths:
  /generations:
    post:
      summary: Create Generation
      operationId: CreateGeneration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGenerationRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
          description: Successful Response
components:
  schemas:
    CreateGenerationRequest:
      type: object
      properties:
        applicationId:
          minLength: 1
          type: string
        documentId:
          type: string
        environment:
          $ref: '#/components/schemas/Environment'
        inputs:
          type: object
          additionalProperties:
            type: string
        manual:
          default: false
          type: boolean
    Generation:
      type: object
      properties:
        accountId:
          type: string
        applicationId:
          type: string
        applicationName:
          type: string
        completedAt:
          type: integer
        createdAt:
          type: integer
        documentId:
          type: string
        documentTitle:
          type: string
        errorCode:
          type: string
        errorMessage:
          $ref: '#/components/schemas/ErrorHint'
        id:
          type: string
        inputs:
          type: object
          additionalProperties:
            type: string
        invocationId:
          type: string
        productId:
          type: string
        productTitle:
          type: string
        result:
          allOf:
            - type: string
            - $ref: '#/components/schemas/KResults'
            - $ref: '#/components/schemas/KProduct'
        resultType:
          allOf:
            - $ref: '#/components/schemas/KOutputType'
          default: TEXT
        status:
          $ref: '#/components/schemas/GenerationStatus'
        title:
          type: string
        workspaceId:
          type: string
    Environment:
      type: object
      properties:
        language:
          type: string
        model:
          $ref: '#/components/schemas/LLMFamily'
          default: gpt-3.5-turbo
        system_prompt:
          type: string
        temperature:
          default: 0.7
          type: number
        tone:
          type: string
        writing_style:
          type: string
    ErrorHint:
      type: object
      properties:
        en:
          type: string
        zh:
          type: string
    KResults:
      type: object
      properties:
        results:
          type: object
          additionalProperties:
            type: string
    KProduct:
      type: object
      properties:
        brand:
          type: string
        description:
          type: string
        feature:
          type: string
        id:
          type: string
        images:
          items:
            type: string
          type: array
        keywords:
          items:
            type: string
          type: array
        link:
          type: string
        specification:
          type: string
        title:
          type: string
        videos:
          items:
            type: string
          type: array
    KOutputType:
      enum:
        - TEXT
        - RESULTS
      type: string
    GenerationStatus:
      enum:
        - RUNNING
        - SUCCESS
        - FAILED
      type: string
    LLMFamily:
      enum:
        - gpt-3.5-turbo
        - gpt-4
        - gpt-4o
        - claude-3-sonnet
        - claude-3-haiku
      type: string

````