Rev AI Sentiment Analysis API
Rev AI Sentiment Analysis API
(v1)
Request
Starts an asynchronous job to analyze sentiments in a transcript. The transcript can be supplied through text as plain text or json as a rev.com transcript format
Sentiment Analysis Job Options
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.
Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.
The user input language of the transcript.
Plain text to be analyzed in this job submission. No timestamps will be included in the response if input is provided this way.
Rev AI transcript to be analyzed in this job submission. With this input timestamps will be in result.
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.
- Rev AI APIhttps://api.rev.ai/sentiment_analysis/v1/jobs
- Mock serverhttps://docs.rev.ai/_mock/api/sentiment-analysis/reference/sentiment_analysis/v1/jobs
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- JSON Submission
- Plain Text Submission
curl -i -X POST \
https://api.rev.ai/sentiment_analysis/v1/jobs \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"language": "en",
"metadata": "sample user provided metadata",
"notification_config": {
"url": "https://www.example.com/callback",
"auth_headers": {
"Authorization": "Bearer <notification-url-token>"
}
},
"delete_after_seconds": 1000000,
"json": {
"monologues": [
{
"speaker": 1,
"elements": [
{
"type": "text",
"value": "hello",
"ts": 0.75,
"end_ts": 1.25,
"confidence": 0.85
}
]
}
]
}
}'Sentiment Analysis Job Details
The date and time the job was created in ISO-8601 UTC form.
The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.
Human-readable reason why the job failed.
Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.
Simple reason of why the job failed. Check failure_detail for specific details and solutions.
The user input language of the transcript.
The type of action performed, in this case sentiment_analysis
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.
{ "id": "Umx5c6F7pH7r", "status": "in_progress", "language": "en", "created_on": "2018-05-05T23:23:22.29Z", "callback_url": "https://www.example.com/callback", "type": "sentiment_analysis" }
Request
Gets a list of sentiment analysis 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.
- Rev AI APIhttps://api.rev.ai/sentiment_analysis/v1/jobs
- Mock serverhttps://docs.rev.ai/_mock/api/sentiment-analysis/reference/sentiment_analysis/v1/jobs
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.rev.ai/sentiment_analysis/v1/jobs?limit=100&starting_after=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'List of Rev AI Sentiment Analysis Jobs
The date and time the job was created in ISO-8601 UTC form.
The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.
Human-readable reason why the job failed.
Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.
Simple reason of why the job failed. Check failure_detail for specific details and solutions.
The user input language of the transcript.
The type of action performed, in this case sentiment_analysis
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.
- Jobs Found
- No Jobs Found
[ { "id": "Umx5c6F7pH7r", "status": "in_progress", "language": "en", "created_on": "2018-05-05T23:23:22.29Z", "type": "sentiment_analysis" }, { "id": "6BxQYGa638Yt", "status": "completed", "language": "en", "created_on": "2018-05-05T23:23:22.29Z", "completed_on": "2018-05-05T23:45:13.41Z", "callback_url": "https://www.example.com/callback", "word_count": 4231, "type": "sentiment_analysis" } ]
- Rev AI APIhttps://api.rev.ai/sentiment_analysis/v1/jobs/{id}
- Mock serverhttps://docs.rev.ai/_mock/api/sentiment-analysis/reference/sentiment_analysis/v1/jobs/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Sentiment Analysis Job Details
The date and time the job was created in ISO-8601 UTC form.
The date and time the job was completed, whether successfully or failing, in ISO-8601 UTC form.
Human-readable reason why the job failed.
Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.
Simple reason of why the job failed. Check failure_detail for specific details and solutions.
The user input language of the transcript.
The type of action performed, in this case sentiment_analysis
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.
- New Job
- Completed Job
- Failed Job
{ "id": "Umx5c6F7pH7r", "status": "in_progress", "language": "en", "created_on": "2018-05-05T23:23:22.29Z", "callback_url": "https://www.example.com/callback", "type": "sentiment_analysis" }
- Rev AI APIhttps://api.rev.ai/sentiment_analysis/v1/jobs/{id}
- Mock serverhttps://docs.rev.ai/_mock/api/sentiment-analysis/reference/sentiment_analysis/v1/jobs/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Rev AI APIhttps://api.rev.ai/sentiment_analysis/v1/jobs/{id}/result
- Mock serverhttps://docs.rev.ai/_mock/api/sentiment-analysis/reference/sentiment_analysis/v1/jobs/{id}/result
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}/result?filter_for=positive' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Rev AI API Sentiment Analysis Result
List of messages containing phrases from the input with their detected sentiment. Positional properties will be different depending on the type of submission.
List of messages containing phrases from the input with their detected sentiment. Positional properties will be different depending on the type of submission.
- Transcript Job Submission
- Plain Text Job Submission
{ "messages": [ { … }, { … }, { … } ] }