> ## 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 Speech to Text

> Create a transcription job.



## OpenAPI

````yaml /api-reference/openapi.json post /v2/jobs
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:
  /v2/jobs:
    post:
      summary: Create Job
      description: Create a transcription job.
      requestBody:
        description: Request body containing the job payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobRequestBody'
      responses:
        '200':
          description: Successful response with job id
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/CreateJobResponse'
                      message:
                        type: string
                        example: >-
                          Transcription started, you will receive en email when
                          it's ready
        '400':
          description: Validation error response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - properties:
                      message:
                        type: string
                        example: The Media Url field is required!
        '500':
          description: Internal server error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    CreateJobRequestBody:
      type: object
      required:
        - type
        - apiKey
        - mediaUrl
        - title
        - language
      properties:
        type:
          type: string
          enum:
            - TRANSCRIPTION
          example: TRANSCRIPTION
        apiKey:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        mediaUrl:
          type: string
          format: uri
          minLength: 1
          example: https://example.com/audio.mp3
        title:
          type: string
          minLength: 1
          example: Meeting Notes
        language:
          type: string
          enum:
            - ar
            - en
          example: ar
          description: Language code for the media being transcribed
        processingType:
          type: string
          enum:
            - async
            - sync
          default: async
          example: async
        webhookUrl:
          type: string
          format: uri
          minLength: 1
          example: https://webhook.site/123
        webhookAuth:
          type: object
          required:
            - authKey
            - authSecret
          properties:
            authKey:
              type: string
              minLength: 1
              example: key123
            authSecret:
              type: string
              minLength: 1
              example: secret456
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Operation completed successfully
        messageKey:
          type: string
          example: OPERATION_SUCCESSFUL
    CreateJobResponse:
      type: object
      required:
        - jobId
      properties:
        jobId:
          type: string
          example: ed9b5601-f731-441a-8500-d9fc7610ef8f
    ValidationErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 9400
        message:
          type: string
          example: Field must be a string!
        messageKey:
          type: string
          example: FieldMustBeString
    InternalServerErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: integer
          example: 500
        message:
          type: string
          example: Internal server error
  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>'

````