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

# Create Customized AI Content Route

> Generates AI content based on the specified transcription job ID and parameters.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/jobs/ai-content/custom
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/jobs/ai-content/custom:
    post:
      summary: Generate Customized AI Content
      description: >-
        Generates AI content based on the specified transcription job ID and
        parameters.
      operationId: generateCustomizedAIContent
      parameters:
        - name: jobId
          in: query
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                aiParts:
                  type: array
                  description: >-
                    The AI parts to generate content for. AI parts array should
                    have at least one AI part object, with an aiPart (title),
                    the language to return the content for the part in, and the
                    prompt to use.
                  items:
                    type: object
                    properties:
                      aiPart:
                        type: string
                        description: >-
                          The AI part title for the content. The AI part title
                          must be unique for the job.
                        minLength: 1
                      language:
                        type: string
                        description: >-
                          The language to return the content for the part in.
                          The language must be one either 'ar' or 'en'.
                        enum:
                          - ar
                          - en
                      prompt:
                        type: string
                        description: >-
                          The prompt to use for generating the content of the AI
                          part. Please make sure to use descriptive and
                          appropriate instructions here to get the best content
                          possible.
                    required:
                      - aiPart
                      - language
                      - prompt
                  minLength: 1
                webhookUrl:
                  type: string
                  format: uri
                  nullable: true
                webhookAuth:
                  type: object
                  description: >-
                    Authorization header to be sent in this format:
                    `Authorization: [authKey] [authSecret]`
                  properties:
                    authKey:
                      type: string
                      example: Token
                      nullable: true
                    authSecret:
                      type: string
                      example: Secret
                      nullable: true
              required:
                - aiParts
        description: Parameters for generating AI content.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiContentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AiContentResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
        message:
          type: string
          default: success
        data:
          type: object
          properties:
            id:
              type: string
            title:
              type: string
            model:
              type: string
            type:
              type: string
              enum:
                - AI_CONTENT
            processingType:
              type: string
            webhookUrl:
              type: string
            totalCost:
              type: number
            usageTime:
              type: string
            mediaUrl:
              type: string
              format: uri
            jobResponse:
              type: object
              default: null
            status:
              type: string
              enum:
                - PENDING
                - COMPLETED
                - FAILED
            relevantJobId:
              type: string
            apiKeyId:
              type: string
            billingId:
              type: string
            userId:
              type: string
            systemModelKey:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````