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

# Transcribe an utterance

> Audio in, text out. Subject-authed exactly like the text endpoints. Stateless — this does not start a run or touch a thread; send the transcript as a message yourself.




## OpenAPI

````yaml /openapi.yaml post /v1/voice/transcribe
openapi: 3.1.0
info:
  title: Patchwork API
  version: 1.0.0
  description: >
    Public data-plane API. Two products today: Identify (bare account
    resolution) and Loom (threads, runs, and outcomes). Every response is a JSON
    envelope — `status: success` with `data`, or `status: error` with `error`.
  contact:
    url: https://usepatchwork.co
servers:
  - url: https://api.usepatchwork.co
security:
  - bearerAuth: []
tags:
  - name: Identify
    description: Resolve an account or wallet to the institution and rails behind it.
  - name: Extract
    description: >-
      Turn a document into structured data, and manage the schema types that
      shape it.
  - name: Loom
    description: Threads, messages, runs, and outcomes for an embedded agent.
  - name: Files
    description: Upload bytes once, get a durable handle, reference it from any product.
  - name: Voice
    description: Transcribe an utterance, speak a reply, list the available voices.
  - name: MCP
    description: >-
      The grants your users hold when they reach an agent from their own AI
      client.
paths:
  /v1/voice/transcribe:
    post:
      tags:
        - Voice
      summary: Transcribe an utterance
      description: >
        Audio in, text out. Subject-authed exactly like the text endpoints.
        Stateless — this does not start a run or touch a thread; send the
        transcript as a message yourself.
      operationId: transcribeVoice
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/PatchworkSubject'
        - $ref: '#/components/parameters/PatchworkConnection'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - audio
              properties:
                audio:
                  type: string
                  format: binary
                  description: The recorded utterance.
                language:
                  type: string
                  description: Optional hint. Detected when omitted.
      responses:
        '200':
          description: Transcript.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeTranscript'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            `voice_provider_error` — the provider failed. Retrying is
            reasonable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            `voice_unavailable` — no voice provider configured. A normal
            deployment state, not a fault.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >
        Makes this POST safe to retry. The first call does the work and its
        response is stored; a retry with the same key returns that stored
        response with `Idempotency-Replayed: true`, without charging again. Same
        key with a different body is rejected. Keys expire after 24 hours.
      schema:
        type: string
        maxLength: 255
    PatchworkSubject:
      name: Patchwork-Subject
      in: header
      required: false
      description: >
        Relay only. Opaque subject id, chosen by you and never resolved by
        Patchwork. Partitions threads and memory within your workspace. Direct
        tokens carry `sub` instead — do not send this header on a session token.

        **Required** on every subject-scoped resource: threads, messages, runs,
        outcomes, confirmations and realtime. Omitting it is `subject_required`,
        never a wider result. The value is used exactly as given — never trimmed
        or normalised — so a stray space creates a second partition and is
        refused as `invalid_subject`.
      schema:
        type: string
    PatchworkConnection:
      name: Patchwork-Connection
      in: header
      required: false
      description: >
        Connection id or name the agent may call. Required in relay when the
        agent has unpinned customer tools. Direct tokens may carry `conn`
        instead.
      schema:
        type: string
  schemas:
    EnvelopeTranscript:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          const: success
        data:
          $ref: '#/components/schemas/Transcript'
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          required:
            - message
            - code
          properties:
            message:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable machine-readable code.
            details:
              description: Optional extra context.
    Transcript:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: The transcript. Empty for a silent take.
          example: move the meeting to Thursday
        confidence:
          type: number
          format: float
          description: Provider confidence, when it reports one.
          example: 0.98
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Identify accepts a workspace API key (`sk_…`). Loom accepts either a
        short-lived session token (direct) or a workspace API key (relay).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.