Skip to main content
POST
Create a diarization

Authorizations

Authorization
string
header
required

Your API key: Authorization: Bearer aircaps_sk_...

Headers

Idempotency-Key
string

Up to 255 characters. Makes retries safe: the same key and body return the original job.

Maximum string length: 255

Body

application/json

Provide exactly one of audio_url or file_id.

model
enum<string>
default:aircaps-diarization-v1

The model. Any other value returns 400 unsupported_model.

Available options:
aircaps-diarization-v1
audio_url
string<uri>

An http(s) URL to download the audio from (public or presigned), up to 5 GB, resolving to a public address.

Maximum string length: 8192
Example:

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

file_id
string

An uploaded file, usable by any number of jobs for 24 hours after upload. ID from Create an upload URL or Upload a file.

Maximum string length: 64
webhook_url
string<uri>

Called with a webhook event when the job finishes.

Maximum string length: 2048
webhook_auth_header_name
string

Name of a header to add to webhook requests. Requires webhook_url.

Maximum string length: 256
Example:

"Authorization"

webhook_auth_header_value
string

Value of that header.

Maximum string length: 4096
metadata
object

Any JSON object up to 16 KB; echoed on the diarization and in webhooks.

Example:

Response

Created. A retried request with the same Idempotency-Key returns the original diarization with 200.

id
string
required

Diarization ID.

Example:

"dia_01k72p0x9h6t3b8r1n4m7q2w5e"

object
enum<string>
required
Available options:
diarization
Example:

"diarization"

status
enum<string>
required

queued: waiting for a processing slot. processing: being diarized. completed: result fields present. error: see error.

Available options:
queued,
processing,
completed,
error
created_at
string<date-time>
required

When the diarization was created (UTC).

started_at
string<date-time> | null
required

When processing started.

completed_at
string<date-time> | null
required

When the job finished (completed or error).

audio_url
string | null
required

The submitted audio_url, if any.

file_id
string | null
required

The submitted file_id, if any.

model
enum<string>
required
Available options:
aircaps-diarization-v1
audio_duration
number | null
required

Audio duration in seconds, once known.

Example:

3600.512

metadata
object | null
required

Your metadata, echoed back.

webhook_url
string | null
required

Webhook target, if any.

webhook_status
enum<string> | null
required

Webhook delivery state, if webhook_url was set.

Available options:
pending,
delivered,
failed,
null
webhook_status_code
integer | null
required

HTTP status of the last webhook delivery.

error
object | null
required

Set when status is error.

num_speakers
integer

Completed only. Number of speakers found.

Example:

3

speakers
object[]

Completed only. Every speaker, with their speaking time.

segments
object[]

Completed only. Who spoke when, in time order. Overlapping speech appears as overlapping segments of different speakers.

speech_duration
number

Completed only. Seconds in which anyone speaks.

Example:

1498.27

overlap_duration
number

Completed only. Seconds in which two or more people speak at once.

Example:

61.44