RecoupGet a Free AuditFree Audit

API REFERENCE

Transcribe Audio

On this page
POST/api/transcribe

Transcribe audio files using OpenAI Whisper. The API saves both the original audio file and the generated markdown transcript to the customer's files in Supabase Storage. The owner account is derived from your credentials; you must have access to the specified artist_account_id.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request POST \
  --url 'https://api.recoupable.dev/api/transcribe' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "audio_url": "https://example.com/song.mp3",
  "artist_account_id": "550e8400-e29b-41d4-a716-446655440001"
}'

Request body required

Audio transcription request

application/json

audio_urlstringrequired

Public URL to the audio file (mp3, wav, m4a, webm)

account_idstring

Deprecated and ignored. The owner account is derived from your credentials. Sending this field is harmless but no longer affects attribution.

format: uuid

artist_account_idstringrequired

Artist account ID for file storage

format: uuid

titlestring

Optional title for the audio and transcription files

include_timestampsboolean

Whether to include timestamps in the markdown transcript

Default: false

Responses

200Audio transcribed successfully

application/json

successbooleanrequired

Whether the transcription was successful

audioFileobjectrequired

Information about the saved audio file

Properties for audioFile
idstring

UUID of the file record in the database

format: uuid

fileNamestring

Name of the saved file

storageKeystring

Storage path in Supabase Storage

transcriptFileobjectrequired

Information about the saved transcript file

Properties for transcriptFile
idstring

UUID of the file record in the database

format: uuid

fileNamestring

Name of the saved file

storageKeystring

Storage path in Supabase Storage

textstringrequired

The full transcription text

languagestring

Detected language code (e.g., 'en', 'es', 'fr')

400Bad request - missing required fields or invalid audio URL

application/json

errorstringrequired

Error message describing what went wrong

401Missing or invalid credentials

application/json

errorstringrequired

Error message describing what went wrong

403Caller has no access to the specified artist_account_id

application/json

errorstringrequired

Error message describing what went wrong

413Audio file exceeds the 25MB limit

application/json

errorstringrequired

Error message describing what went wrong

429Rate limit exceeded

application/json

errorstringrequired

Error message describing what went wrong

500Server error - OpenAI API key not configured

application/json

errorstringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download content.json
View operation source
json
{
  "description": "Transcribe audio files using OpenAI Whisper. The API saves both the original audio file and the generated markdown transcript to the customer's files in Supabase Storage. The owner account is derived from your credentials; you must have access to the specified artist_account_id.",
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "description": "Audio transcription request",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/TranscribeAudioRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Audio transcribed successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - missing required fields or invalid audio URL",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid credentials",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Caller has no access to the specified artist_account_id",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    },
    "413": {
      "description": "Audio file exceeds the 25MB limit",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Server error - OpenAI API key not configured",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/TranscribeAudioErrorResponse"
          }
        }
      }
    }
  }
}