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.
| Setting | Purpose |
|---|---|
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | Static credentials, when no role is available. |
AWS_REGION_NAME | The region of the Transcribe endpoint, such as us-east-1. AWS_REGION and AWS_DEFAULT_REGION are also read. |
general_settings.transcribe_media_buckets | Buckets non-admin keys may read media from and write transcripts to. |
general_settings:
transcribe_media_buckets:
- my-media-bucket
Steps
-
Run the gateway with AWS credentials, set
AWS_REGION_NAMEand add the bucket list to the config file. There is no provider entry to add on the Models + Endpoints page for this route. -
Issue a virtual key on
/ui/api-keyswith + Create New Key, then Create Key. -
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"}' -
Read it back with
GetTranscriptionJoband 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"}' -
Open
/ui/logsand 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
| Status | Message | What it means and how to fix it |
|---|---|---|
401 | Authentication Error, Invalid proxy server token passed | The virtual key is missing, wrong, expired or blocked. |
403 | Key/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. |
400 | AWS region not found. Set AWS_REGION_NAME in the proxy environment. | No region is set. Set AWS_REGION_NAME. |
400 | Request body must be valid JSON or 'stream' is not an Amazon Transcribe request member | The body is not a JSON object, or carries a stream field. |
400 | A message naming the bucket | The media or output bucket is not in transcribe_media_buckets. Use a listed bucket or ask the operator to add it. |
403 | ListTranscriptionJobs is limited to proxy admin keys. | The operation is account wide. Use a proxy admin key. |
403 | A message saying the job belongs to another key | The job's spanway-owner tag is not yours. Only the owner or a proxy admin can read or delete it. |
400 | Expected an X-Amz-Target header of the form Transcribe.<Operation> | An SDK call to /transcribe arrived without the target header. |
| Any other | AWS's own error body | AWS refused the request. The message is returned unchanged. |
Related
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.