Skip to main content
POST
Create Job

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json

Request body containing the job payload

type
enum<string>
required

Job type. Always TRANSCRIPTION.

Available options:
TRANSCRIPTION
Example:

"TRANSCRIPTION"

mediaUrl
string<uri>
required

Public URL of the audio or video to transcribe. AVI and WMV files can't be transcribed and are refused; links without a file extension (YouTube, signed links) are fine.

Minimum string length: 1
Example:

"https://example.com/audio.mp3"

title
string
required

A name for the job, shown in your jobs list.

Minimum string length: 1
Example:

"Meeting Notes"

language
enum<string>
required

Language spoken in the media: ar, en, or auto to detect it.

Available options:
ar,
en,
auto
Example:

"ar"

processingType
enum<string>
default:async

Always async.

Available options:
async,
sync
Example:

"async"

webhookUrl
string<uri>

A public https URL. When the job completes, Hamsa posts { jobId, output }: output.transcription is the full text, output.diarization the speaker segments (speaker, start, end in seconds, text) and output.jobTitle the title. If the job fails, it posts { jobId, output: { status: "FAILED", error: { message }, jobTitle } }. http and private addresses are refused with 400 "The Webhook Url must be a public https url!" (WebhookUrlNotAllowed).

Minimum string length: 1
Example:

"https://webhook.site/123"

webhookAuth
object

Authorization header to be sent in this format: Authorization: [authKey] [authSecret]

Response

Successful response with job id

success
boolean
Example:

true

message
string
Example:

"Transcription started, you will receive en email when it's ready"

messageKey
string
Example:

"OPERATION_SUCCESSFUL"

data
object