Skip to main content
POST
/
v2
/
jobs
/
generate-transcription-ai-content
Generate AI Content
curl --request POST \
  --url https://api.tryhamsa.com/v2/jobs/generate-transcription-ai-content \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "apiKey": "9f5f1f6a-2b1d-4a33-8fd4-6f5c2b89e3aa",
  "mediaUrl": "https://example.com/audio.mp3",
  "title": "Meeting Notes",
  "language": "ar",
  "aiParts": [
    "summary"
  ],
  "aiContentTitle": "Project Kickoff Summary",
  "aiContentLanguage": "ar",
  "aiContentDate": "2025-01-01T00:00:00.000Z",
  "aiContentText": "Provide highlights focusing on action items."
}
'
{
  "success": true,
  "message": "AI Content started, you will receive en email when it's ready",
  "messageKey": "OPERATION_SUCCESSFUL",
  "data": {
    "jobId": "ed9b5601-f731-441a-8500-d9fc7610ef8f"
  }
}

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 media info and AI content options

apiKey
string<uuid>
required

API key identifier (used for API key authorization)

Example:

"9f5f1f6a-2b1d-4a33-8fd4-6f5c2b89e3aa"

mediaUrl
string<uri>
required

URL of the media to transcribe

Minimum string length: 1
Example:

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

title
string
required
Required string length: 1 - 500
Example:

"Meeting Notes"

language
enum<string>
required

Language code for the media being transcribed

Available options:
ar,
en
Example:

"ar"

aiParts
string[]
required

AI content parts to generate (one key only)

Required array length: 1 element
Minimum string length: 1
Example:
["summary"]
aiContentTitle
string | null
Required string length: 1 - 500
Example:

"Project Kickoff Summary"

aiContentLanguage
enum<string> | null

Preferred AI content language

Available options:
ar,
en,
both_ar_first,
both_en_first
Example:

"ar"

aiContentDate
string<date-time> | null

Date associated with the AI content

Example:

"2025-01-01T00:00:00.000Z"

aiContentText
string | null
Required string length: 1 - 5000
Example:

"Provide highlights focusing on action items."

Response

Successful response with job id

success
boolean
Example:

true

message
string
Example:

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

messageKey
string
Example:

"OPERATION_SUCCESSFUL"

data
object