Skip to content

Rev AI Language Identification (v1)

Rev AI Language Identification

Download OpenAPI description
Languages
Servers
Rev AI API
https://api.rev.ai
Mock server
https://docs.rev.ai/_mock/api/language-identification/reference

Jobs

Operations

Submit Language Identification Job

Request

Starts an asynchronous job to identify the most probable language in the audio. Audio can be specified in two ways, either by including a public url to the media via the source_config option or by uploading a local file as part of a multipart/form request.

Security
AccessToken
Bodyrequired

Language Identification Job Options

metadatastring or null<= 512 characters

Optional metadata that was provided during job submission.

notification_configobject or null

Optional configuration for a callback url to invoke when processing is complete, in addition to auth headers if they are needed to invoke the callback url. Cannot be set if callback_url is set. This option will not be visible in the submission response.

delete_after_secondsinteger or null[ 0 .. 2592000 ]

Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.

source_configobject or null

Optional authorization headers, if they are needed to access the resource at the URL. Headers could be a single Authorization header of the form <scheme> <token>, and one of the AWS signature v4 headers. Only one of source_config and media_url may be set. This option will not be visible in the submission response.

callback_urlstring or null<= 1024 charactersDeprecated

Deprecated. Use notification_config instead. Optional callback url to invoke when processing is complete. If this parameter is used to pass in the callback url, the callback url will be visible in the response. It is recommended to provide webhooks with the notification_config parameter as authorization headers can be included and both the callback url and auth headers will be encrypted when stored.

Example: "https://www.example.com/callback"
media_urlstring<= 2048 charactersDeprecated

[HIPAA unsupported] Deprecated. Use source_config instead. Direct download media url. If this parameter is used to pass in the media url, the media url will be visible in the response. It is recommended to use the source_config parameter instead, as authorization headers can be included and both the source url and auth headers will be encrypted when stored.

curl -i -X POST \
  https://api.rev.ai/languageid/v1/jobs \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": "sample user provided metadata",
    "notification_config": {
      "url": "https://www.example.com/callback",
      "auth_headers": {
        "Authorization": "Bearer <notification-url-token>"
      }
    },
    "delete_after_seconds": 1000000,
    "source_config": {
      "url": "https://www.rev.ai/FTC_Sample_1.mp3",
      "auth_headers": {
        "Authorization": "Bearer <source-url-token>"
      }
    }
  }'

Responses

Language Identification Job Details

Bodyapplication/json
idstring

Id of the job.

Example: "Umx5c6F7pH7r"
created_onstring(date-time)

The date and time the job was created in ISO-8601 UTC form.

Example: "2018-05-05T23:23:22.29Z"
completed_onstring or null(date-time)

The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.

Example: "2018-05-05T23:28:22.29Z"
metadatastring or null<= 512 characters

Optional metadata that was provided during job submission.

failure_detailstring or null

Human-readable reason why the job failed.

Example: "Internal server error."
delete_after_secondsinteger or null[ 0 .. 2592000 ]

Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.

statusstring

Current status of the job.

Enum"in_progress""completed""failed"
Example: "completed"
failurestring

Simple reason of why the job failed. Check failure_detail for specific details and solutions.

Enum"internal_processing""insufficient_balance""invoicing_limit_exceeded"
typestring

The type of action performed, in this case language_id

Default "language_id"
Value"language_id"
Example: "language_id"
processed_duration_secondsnumber or null(double)

Duration of the processed audio in seconds. Null if the job has not completed

Example: 107
callback_urlstring or null<= 1024 charactersDeprecated

Deprecated. Use notification_config instead. Optional callback url to invoke when processing is complete. If this parameter is used to pass in the callback url, the callback url will be visible in the response. It is recommended to provide webhooks with the notification_config parameter as authorization headers can be included and both the callback url and auth headers will be encrypted when stored.

Example: "https://www.example.com/callback"
media_urlstring<= 2048 charactersDeprecated

[HIPAA unsupported] Deprecated. Use source_config instead. Direct download media url. If this parameter is used to pass in the media url, the media url will be visible in the response. It is recommended to use the source_config parameter instead, as authorization headers can be included and both the source url and auth headers will be encrypted when stored.

Response
application/json
{ "id": "Umx5c6F7pH7r", "status": "in_progress", "created_on": "2018-05-05T23:23:22.29Z", "type": "language_id" }

Get List of Language Identification Jobs

Request

Gets a list of language identification jobs submitted within the last 30 days in reverse chronological order up to the provided limit number of jobs per call. Note: Jobs older than 30 days will not be listed. Pagination is supported via passing the last job id from a previous call into starting_after.

Security
AccessToken
Query
limitinteger or null[ 0 .. 1000 ]

Limits the number of jobs returned, default is 100, max is 1000

Default 100
starting_afterstring or null

If specified, returns jobs submitted before the job with this id, exclusive (job with this id is not included)

curl -i -X GET \
  'https://api.rev.ai/languageid/v1/jobs?limit=100&starting_after=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of Rev AI Language Identification Jobs

Bodyapplication/jsonArray [
idstring

Id of the job.

Example: "Umx5c6F7pH7r"
created_onstring(date-time)

The date and time the job was created in ISO-8601 UTC form.

Example: "2018-05-05T23:23:22.29Z"
completed_onstring or null(date-time)

The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.

Example: "2018-05-05T23:28:22.29Z"
metadatastring or null<= 512 characters

Optional metadata that was provided during job submission.

failure_detailstring or null

Human-readable reason why the job failed.

Example: "Internal server error."
delete_after_secondsinteger or null[ 0 .. 2592000 ]

Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.

statusstring

Current status of the job.

Enum"in_progress""completed""failed"
Example: "completed"
failurestring

Simple reason of why the job failed. Check failure_detail for specific details and solutions.

Enum"internal_processing""insufficient_balance""invoicing_limit_exceeded"
typestring

The type of action performed, in this case language_id

Default "language_id"
Value"language_id"
Example: "language_id"
processed_duration_secondsnumber or null(double)

Duration of the processed audio in seconds. Null if the job has not completed

Example: 107
callback_urlstring or null<= 1024 charactersDeprecated

Deprecated. Use notification_config instead. Optional callback url to invoke when processing is complete. If this parameter is used to pass in the callback url, the callback url will be visible in the response. It is recommended to provide webhooks with the notification_config parameter as authorization headers can be included and both the callback url and auth headers will be encrypted when stored.

Example: "https://www.example.com/callback"
media_urlstring<= 2048 charactersDeprecated

[HIPAA unsupported] Deprecated. Use source_config instead. Direct download media url. If this parameter is used to pass in the media url, the media url will be visible in the response. It is recommended to use the source_config parameter instead, as authorization headers can be included and both the source url and auth headers will be encrypted when stored.

]
Response
application/json
[ { "id": "Bmx5c8F5pH7a", "status": "in_progress", "created_on": "2018-05-05T23:23:22.29Z", "type": "language_id" }, { "id": "6BxQYGa638Yt", "status": "completed", "created_on": "2018-05-05T23:23:22.29Z", "completed_on": "2018-05-05T23:45:13.41Z", "type": "language_id" } ]

Get Language Identification Job By Id

Request

Returns information about a language identification job.

Security
AccessToken
Path
idstringrequired

Rev AI API Job Id

curl -i -X GET \
  'https://api.rev.ai/languageid/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Language Identification Job Details

Bodyapplication/json
idstring

Id of the job.

Example: "Umx5c6F7pH7r"
created_onstring(date-time)

The date and time the job was created in ISO-8601 UTC form.

Example: "2018-05-05T23:23:22.29Z"
completed_onstring or null(date-time)

The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.

Example: "2018-05-05T23:28:22.29Z"
metadatastring or null<= 512 characters

Optional metadata that was provided during job submission.

failure_detailstring or null

Human-readable reason why the job failed.

Example: "Internal server error."
delete_after_secondsinteger or null[ 0 .. 2592000 ]

Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.

statusstring

Current status of the job.

Enum"in_progress""completed""failed"
Example: "completed"
failurestring

Simple reason of why the job failed. Check failure_detail for specific details and solutions.

Enum"internal_processing""insufficient_balance""invoicing_limit_exceeded"
typestring

The type of action performed, in this case language_id

Default "language_id"
Value"language_id"
Example: "language_id"
processed_duration_secondsnumber or null(double)

Duration of the processed audio in seconds. Null if the job has not completed

Example: 107
callback_urlstring or null<= 1024 charactersDeprecated

Deprecated. Use notification_config instead. Optional callback url to invoke when processing is complete. If this parameter is used to pass in the callback url, the callback url will be visible in the response. It is recommended to provide webhooks with the notification_config parameter as authorization headers can be included and both the callback url and auth headers will be encrypted when stored.

Example: "https://www.example.com/callback"
media_urlstring<= 2048 charactersDeprecated

[HIPAA unsupported] Deprecated. Use source_config instead. Direct download media url. If this parameter is used to pass in the media url, the media url will be visible in the response. It is recommended to use the source_config parameter instead, as authorization headers can be included and both the source url and auth headers will be encrypted when stored.

Response
application/json
{ "id": "Umx5c6F7pH7r", "status": "in_progress", "created_on": "2018-05-05T23:23:22.29Z", "type": "language_id" }

Delete Language Identification Job by Id

Request

Deletes a language identification job. All data related to the job will be permanently deleted. A job can only be deleted once it's completed (either with success or failure).

Security
AccessToken
Path
idstringrequired

Rev AI API Job Id

curl -i -X DELETE \
  'https://api.rev.ai/languageid/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Job was successfully deleted

Body
Response
No content

Get Language Identification Result By Id

Request

Returns the results for a completed language identification job.

Security
AccessToken
Path
idstringrequired

Rev AI API Job Id

curl -i -X GET \
  'https://api.rev.ai/languageid/v1/jobs/{id}/result' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Rev AI API Language Identification Result

Bodyapplication/json
top_languagestring
Enum ValueDescription
ar

Arabic

cmn

Mandarin

cs

Czech

de

German

el

Greek

en

English

es

Spanish

fi

Finnish

fr

French

hu

Hungarian

language_confidencesArray of objects
Response
application/json
{ "top_language": "en", "language_confidences": [ {}, {}, {}, {}, {} ] }