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

# Create batch job

> Submit audio for asynchronous transcription via `application/json`. Provide exactly one input: a public HTTPS `input_url`, an `s3_key` from a preceding presign call, or inline `input_base64`. For the presigned-upload flow, the first call (`mode: "presign"`) returns **200 OK** with an upload URL — the job is not created until the follow-up call. All other submission paths return **202 Accepted** with `status: QUEUED`.



## OpenAPI

````yaml api-reference/batch/batch.oas.json POST /v1/batch/jobs
openapi: 3.1.0
info:
  version: 1.0.0
  title: SLNG Batch API
  description: >-
    Transcribe audio files asynchronously. Upload a file, monitor the job
    progress, and download the transcript when it's ready.
servers:
  - url: https://api.batch.slng.ai
    description: Production
  - url: https://stageapi.batch.slng.ai
    description: Staging
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Speechmatics
    description: Create and manage asynchronous transcription jobs.
paths:
  /v1/batch/jobs:
    post:
      tags:
        - Speechmatics
      summary: Create batch job
      description: >-
        Submit audio for asynchronous transcription via `application/json`.
        Provide exactly one input: a public HTTPS `input_url`, an `s3_key` from
        a preceding presign call, or inline `input_base64`. For the
        presigned-upload flow, the first call (`mode: "presign"`) returns **200
        OK** with an upload URL — the job is not created until the follow-up
        call. All other submission paths return **202 Accepted** with `status:
        QUEUED`.
      operationId: batchJobsCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: URL input
                  type: object
                  required:
                    - input_url
                    - transcription_config
                  properties:
                    input_url:
                      type: string
                      format: uri
                      description: >-
                        HTTPS URL of the audio file to transcribe. Must be
                        publicly accessible or a presigned URL.
                    job_id:
                      type: string
                      description: >-
                        Custom alphanumeric identifier for the job.
                        Auto-generated if omitted.
                      pattern: ^[a-zA-Z0-9]+$
                    model_code:
                      type: string
                      description: Model to use for transcription.
                      default: slng/speechmatics/batch:15.0.0
                    transcription_config:
                      $ref: '#/components/schemas/TranscriptionConfig'
                    metadata:
                      type: object
                      description: Arbitrary key-value metadata to attach to the job.
                    tracking:
                      $ref: '#/components/schemas/Tracking'
                    output_config:
                      $ref: '#/components/schemas/OutputConfig'
                - title: 'Presigned upload: request a URL'
                  type: object
                  required:
                    - mode
                    - filename
                    - transcription_config
                  properties:
                    mode:
                      type: string
                      enum:
                        - presign
                      description: Set to `presign` to request a presigned S3 upload URL.
                    filename:
                      type: string
                      description: Name of the file to upload.
                    content_type:
                      type: string
                      description: >-
                        MIME type of the file. Default:
                        `application/octet-stream`.
                    job_id:
                      type: string
                      description: >-
                        Custom alphanumeric identifier for the job.
                        Auto-generated if omitted.
                      pattern: ^[a-zA-Z0-9]+$
                    transcription_config:
                      $ref: '#/components/schemas/TranscriptionConfig'
                    tracking:
                      $ref: '#/components/schemas/Tracking'
                    output_config:
                      $ref: '#/components/schemas/OutputConfig'
                - title: 'Presigned upload: create the job'
                  type: object
                  required:
                    - s3_key
                    - transcription_config
                  properties:
                    s3_key:
                      type: string
                      description: S3 key returned from the presign step.
                    job_id:
                      type: string
                      description: Job ID returned from the presign step.
                      pattern: ^[a-zA-Z0-9]+$
                    model_code:
                      type: string
                      description: Model to use for transcription.
                    transcription_config:
                      $ref: '#/components/schemas/TranscriptionConfig'
                    metadata:
                      type: object
                      description: Arbitrary key-value metadata to attach to the job.
                    tracking:
                      $ref: '#/components/schemas/Tracking'
                    output_config:
                      $ref: '#/components/schemas/OutputConfig'
                - title: Inline base64
                  type: object
                  required:
                    - input_base64
                    - input_filename
                    - transcription_config
                  properties:
                    input_base64:
                      type: string
                      description: >-
                        Base64-encoded audio. Bounded by the 10 MB request-body
                        limit — use presigned upload for larger files.
                    input_filename:
                      type: string
                      description: Original filename of the encoded audio.
                    job_id:
                      type: string
                      description: >-
                        Custom alphanumeric identifier for the job.
                        Auto-generated if omitted.
                      pattern: ^[a-zA-Z0-9]+$
                    model_code:
                      type: string
                      description: Model to use for transcription.
                      default: slng/speechmatics/batch:15.0.0
                    transcription_config:
                      $ref: '#/components/schemas/TranscriptionConfig'
                    metadata:
                      type: object
                      description: Arbitrary key-value metadata to attach to the job.
                    tracking:
                      $ref: '#/components/schemas/Tracking'
                    output_config:
                      $ref: '#/components/schemas/OutputConfig'
      responses:
        '200':
          description: >-
            **Presign mode only.** Returns a presigned upload URL; the job is
            not created yet. See the [Batch
            guide](/batch-guide#method-3-presigned-upload) for the full upload
            flow.
          content:
            application/json:
              schema:
                type: object
                required:
                  - job_id
                  - transcription_config
                  - input_s3_uri
                  - output_s3_prefix
                  - upload
                properties:
                  job_id:
                    type: string
                    description: Job identifier to reuse in step 3.
                  transcription_config:
                    $ref: '#/components/schemas/TranscriptionConfig'
                  tracking:
                    $ref: '#/components/schemas/Tracking'
                  output_config:
                    $ref: '#/components/schemas/OutputConfig'
                  input_s3_uri:
                    type: string
                    description: '`s3://bucket/key` of the future upload.'
                  output_s3_prefix:
                    type: string
                    description: >-
                      `s3://bucket/outputs/<jobId>/` where transcripts will
                      land.
                  upload:
                    type: object
                    required:
                      - url
                      - s3_key
                      - s3_uri
                      - expires_in
                      - headers
                    properties:
                      url:
                        type: string
                        format: uri
                        description: Presigned `PUT` URL.
                      s3_key:
                        type: string
                        description: S3 key the URL writes to. Pass as `s3_key` in step 3.
                      s3_uri:
                        type: string
                        description: Same key, full `s3://` URI.
                      expires_in:
                        type: integer
                        description: URL lifetime in seconds (1 hour).
                      headers:
                        type: object
                        additionalProperties:
                          type: string
                        description: >-
                          Headers the upload request must send (e.g.
                          `Content-Type`).
              example:
                job_id: job8f3a1b2c4d5e6f7890abcdef12345678
                transcription_config:
                  language: en
                  operating_point: enhanced
                  diarization: none
                input_s3_uri: s3://slng-production-batch-input/inputs/job8f3a.../audio.wav
                output_s3_prefix: s3://slng-production-batch-output/outputs/job8f3a.../
                upload:
                  url: >-
                    https://slng-production-batch-input.s3.amazonaws.com/inputs/job8f3a.../audio.wav?X-Amz-Algorithm=...
                  s3_key: inputs/job8f3a.../audio.wav
                  s3_uri: s3://slng-production-batch-input/inputs/job8f3a.../audio.wav
                  expires_in: 3600
                  headers:
                    Content-Type: application/octet-stream
        '202':
          description: >-
            Job accepted and queued for processing (URL input, inline base64, or
            presigned-upload step 3).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobAcknowledgement'
              example:
                job_id: myjob123
                status: QUEUED
        '400':
          description: >-
            Validation error (bad request body, unsupported `model_code`,
            invalid `job_id`, missing/invalid `transcription_config`, invalid
            `input_url`, `s3_key` outside `inputs/<job_id>/`, etc.).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: job_id must be alphanumeric
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '413':
          description: >-
            Request body exceeds the 10 MB limit. Use the presigned upload flow
            for larger files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Request body too large
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    TranscriptionConfig:
      type: object
      description: Transcription settings.
      properties:
        language:
          type: string
          description: Language code for the audio.
          default: en
          example: en
        operating_point:
          type: string
          description: Accuracy level.
          enum:
            - standard
            - enhanced
          default: enhanced
        diarization:
          type: string
          description: Speaker separation mode.
          enum:
            - none
            - speaker
            - channel
          default: none
        domain:
          type: string
          description: Domain-specific language model to use.
        output_locale:
          type: string
          description: Locale for formatting output (e.g. dates, numbers).
        enable_entities:
          type: boolean
          description: Detect and format entities such as dates, times, and addresses.
        additional_vocab:
          type: array
          description: Custom words or phrases to improve recognition accuracy.
          items:
            type: object
            properties:
              content:
                type: string
              sounds_like:
                type: array
                items:
                  type: string
    Tracking:
      type: object
      description: Metadata for organizing and filtering jobs.
      properties:
        title:
          type: string
          description: Human-readable job title.
          example: Meeting recording
        reference:
          type: string
          description: External reference identifier.
          example: ref-123
        tags:
          type: array
          description: Labels for categorizing the job.
          items:
            type: string
          example:
            - meeting
            - q1-review
        details:
          type: string
          description: Free-text notes about the job.
          example: Q1 planning session
    OutputConfig:
      type: object
      description: Output format settings.
      properties:
        srt_overrides:
          type: object
          description: SRT subtitle formatting options.
          properties:
            max_line_length:
              type: integer
              description: Maximum characters per subtitle line.
              example: 80
            max_lines:
              type: integer
              description: Maximum lines per subtitle block.
              example: 2
    JobAcknowledgement:
      type: object
      description: >-
        Minimal acknowledgement returned when a job is queued or marked for
        deletion. Poll `GET /v1/batch/jobs/{jobId}` for the full record.
      required:
        - job_id
        - status
      properties:
        job_id:
          type: string
          description: Alphanumeric job identifier.
        status:
          type: string
          description: Initial status. `QUEUED` on creation; `DELETED` on deletion.
    Error:
      type: object
      description: >-
        Error envelope. A short, user-presentable string only — no internal
        codes, stack traces, or upstream raw text.
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    InsufficientCredits:
      description: Insufficient credits — your organisation balance is not positive.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Insufficient credits
    RateLimited:
      description: >-
        Rate limit exceeded. Retry after the delay indicated by the
        `Retry-After` response header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded
    InternalError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        SLNG API key as `Authorization: Bearer slng_cu_...` (consumer) or
        `slng_bt_...` (batch). Legacy `zpka_` keys are still accepted during
        migration.
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        SLNG API key as `X-API-Key: slng_cu_...` (consumer) or `slng_bt_...`
        (batch). Equivalent to bearer auth.

````