Skip to main content

Amazon Transcribe pass-through

The /transcribe/{operation} route forwards an Amazon Transcribe operation, such as StartTranscriptionJob, GetTranscriptionJob or DeleteTranscriptionJob, to AWS. The gateway signs the request with SigV4 using its own AWS credentials, so callers need no AWS access. A second route at /transcribe accepts requests from the AWS SDK, which names the operation in the X-Amz-Target header.

Because every caller shares the gateway's AWS account, the gateway scopes what each key can do. Jobs are tagged with the calling key's owner, so only that owner or a proxy admin can read or delete them. Keys that are not proxy admins may only read media from and write transcripts to the buckets listed in general_settings.transcribe_media_buckets, and account wide operations such as ListTranscriptionJobs are limited to proxy admins. Streaming transcription uses a different protocol and is not served by this route.

A real-world scenario​

A research team transcribes interview recordings stored in one S3 bucket. The gateway operator lists that bucket in transcribe_media_buckets. Each researcher starts jobs with their own virtual key, can read back only their own jobs, and cannot point Transcribe at any other bucket. The operator sees every job and its cost on the Logs page without handing out IAM users.

Before you start​

The gateway needs AWS credentials, a region and the bucket allowlist.

SettingPurpose
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEYStatic credentials, when no role is available.
AWS_REGION_NAMEThe region of the Transcribe endpoint, such as us-east-1. AWS_REGION and AWS_DEFAULT_REGION are also read.
general_settings.transcribe_media_bucketsBuckets non-admin keys may read media from and write transcripts to.
general_settings:
transcribe_media_buckets:
- my-media-bucket

Steps​

  1. Run the gateway with AWS credentials, set AWS_REGION_NAME and add the bucket list to the config file. There is no provider entry to add on the Models + Endpoints page for this route.

  2. Issue a virtual key on /ui/api-keys with + Create New Key, then Create Key.

  3. Start a job through the gateway.

    curl -X POST http://localhost:4000/transcribe/StartTranscriptionJob \
    -H "Authorization: Bearer $SPANWAY_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"TranscriptionJobName": "standup-2026-11-21", "LanguageCode": "en-US", "Media": {"MediaFileUri": "s3://my-media-bucket/standup.wav"}, "OutputBucketName": "my-media-bucket"}'
  4. Read it back with GetTranscriptionJob and the same key.

    curl -X POST http://localhost:4000/transcribe/GetTranscriptionJob \
    -H "Authorization: Bearer $SPANWAY_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"TranscriptionJobName": "standup-2026-11-21"}'
  5. Open /ui/logs and click the newest row to see the job request, the key and its cost.

Expected result​

AWS's own response, with its status code and headers.

{
"TranscriptionJob": {
"TranscriptionJobName": "standup-2026-11-21",
"TranscriptionJobStatus": "IN_PROGRESS",
"LanguageCode": "en-US",
"Media": {"MediaFileUri": "s3://my-media-bucket/standup.wav"}
}
}

The job carries a spanway-owner tag with the calling key's owner. When the job completes, the gateway costs it from the audio duration with the bundled Transcribe prices, and the spend log row carries the key, team and user.

Errors​

StatusMessageWhat it means and how to fix it
401Authentication Error, Invalid proxy server token passedThe virtual key is missing, wrong, expired or blocked.
403Key/team denied access to passthrough route /transcribe/...The key or team lists the route in denied_passthrough_routes. The message goes on with Matched <pattern> in denied_passthrough_routes, naming the pattern to remove from the key or team.
400AWS region not found. Set AWS_REGION_NAME in the proxy environment.No region is set. Set AWS_REGION_NAME.
400Request body must be valid JSON or 'stream' is not an Amazon Transcribe request memberThe body is not a JSON object, or carries a stream field.
400A message naming the bucketThe media or output bucket is not in transcribe_media_buckets. Use a listed bucket or ask the operator to add it.
403ListTranscriptionJobs is limited to proxy admin keys.The operation is account wide. Use a proxy admin key.
403A message saying the job belongs to another keyThe job's spanway-owner tag is not yours. Only the owner or a proxy admin can read or delete it.
400Expected an X-Amz-Target header of the form Transcribe.<Operation>An SDK call to /transcribe arrived without the target header.
Any otherAWS's own error bodyAWS refused the request. The message is returned unchanged.

Pass-through endpoints lists every built-in route. The unified audio transcription endpoint covers synchronous transcription with every provider. Amazon Comprehend Medical pass-through and Bedrock pass-through use the same AWS credentials.