Sentient Analytics API and SDK Documentation

Version: 1.0.0

Use this API to fully leverage the analytics capabilities of the Sentient Machines Platform. Please contact support@sentientmachines.tech for any questions.

Sentient Machines Analytics - OpenAPI 3.0

Sentient Machines Analytics - OpenAPI 3.0

Analytics

requestInsight

Transcribe audio and produce sentiment analysis

Produce text, speaker separation, and segmentation, and various classifier annotations for audio


/analytics/request-insight

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://acme.analytics.sentientmachines.tech/analytics/request-insight"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        AnalyticsApi apiInstance = new AnalyticsApi();
        InsightRequest body = ; // InsightRequest | Produce Insights by audio uri
        String apiKey = apiKey_example; // String | 
        try {
            Job result = apiInstance.requestInsight(body, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#requestInsight");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AnalyticsApi;

public class AnalyticsApiExample {

    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        InsightRequest body = ; // InsightRequest | Produce Insights by audio uri
        String apiKey = apiKey_example; // String | 
        try {
            Job result = apiInstance.requestInsight(body, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#requestInsight");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
InsightRequest *body = ; // Produce Insights by audio uri
String *apiKey = apiKey_example; // 

AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];

// Transcribe audio and produce sentiment analysis
[apiInstance requestInsightWith:body
    apiKey:apiKey
              completionHandler: ^(Job output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.AnalyticsApi()
var body = ; // {{InsightRequest}} Produce Insights by audio uri
var apiKey = apiKey_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.requestInsight(bodyapiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class requestInsightExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AnalyticsApi();
            var body = new InsightRequest(); // InsightRequest | Produce Insights by audio uri
            var apiKey = apiKey_example;  // String | 

            try
            {
                // Transcribe audio and produce sentiment analysis
                Job result = apiInstance.requestInsight(body, apiKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AnalyticsApi.requestInsight: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAnalyticsApi();
$body = ; // InsightRequest | Produce Insights by audio uri
$apiKey = apiKey_example; // String | 

try {
    $result = $api_instance->requestInsight($body, $apiKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->requestInsight: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AnalyticsApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AnalyticsApi->new();
my $body = WWW::SwaggerClient::Object::InsightRequest->new(); # InsightRequest | Produce Insights by audio uri
my $apiKey = apiKey_example; # String | 

eval { 
    my $result = $api_instance->requestInsight(body => $body, apiKey => $apiKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->requestInsight: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AnalyticsApi()
body =  # InsightRequest | Produce Insights by audio uri
apiKey = apiKey_example # String | 

try: 
    # Transcribe audio and produce sentiment analysis
    api_response = api_instance.request_insight(body, apiKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->requestInsight: %s\n" % e)

Parameters

Header parameters
Name Description
api_key*
String
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successful job creation

Status: 400 - Invalid request audio

Status: 403 - Unauthorized

Status: 405 - Validation exception


transcribe

Transcribe audio

Produce text, speaker separation, and segmentation for audio


/analytics/transcribe

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://acme.analytics.sentientmachines.tech/analytics/transcribe"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        AnalyticsApi apiInstance = new AnalyticsApi();
        TranscribeRequest body = ; // TranscribeRequest | Transcribe audio by audio uri
        String apiKey = apiKey_example; // String | 
        try {
            Job result = apiInstance.transcribe(body, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#transcribe");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AnalyticsApi;

public class AnalyticsApiExample {

    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        TranscribeRequest body = ; // TranscribeRequest | Transcribe audio by audio uri
        String apiKey = apiKey_example; // String | 
        try {
            Job result = apiInstance.transcribe(body, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#transcribe");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
TranscribeRequest *body = ; // Transcribe audio by audio uri
String *apiKey = apiKey_example; // 

AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];

// Transcribe audio
[apiInstance transcribeWith:body
    apiKey:apiKey
              completionHandler: ^(Job output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.AnalyticsApi()
var body = ; // {{TranscribeRequest}} Transcribe audio by audio uri
var apiKey = apiKey_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.transcribe(bodyapiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class transcribeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AnalyticsApi();
            var body = new TranscribeRequest(); // TranscribeRequest | Transcribe audio by audio uri
            var apiKey = apiKey_example;  // String | 

            try
            {
                // Transcribe audio
                Job result = apiInstance.transcribe(body, apiKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AnalyticsApi.transcribe: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAnalyticsApi();
$body = ; // TranscribeRequest | Transcribe audio by audio uri
$apiKey = apiKey_example; // String | 

try {
    $result = $api_instance->transcribe($body, $apiKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->transcribe: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AnalyticsApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AnalyticsApi->new();
my $body = WWW::SwaggerClient::Object::TranscribeRequest->new(); # TranscribeRequest | Transcribe audio by audio uri
my $apiKey = apiKey_example; # String | 

eval { 
    my $result = $api_instance->transcribe(body => $body, apiKey => $apiKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->transcribe: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AnalyticsApi()
body =  # TranscribeRequest | Transcribe audio by audio uri
apiKey = apiKey_example # String | 

try: 
    # Transcribe audio
    api_response = api_instance.transcribe(body, apiKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->transcribe: %s\n" % e)

Parameters

Header parameters
Name Description
api_key*
String
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successful job creation

Status: 400 - Invalid request audio

Status: 403 - Unauthorized

Status: 405 - Validation exception


Audio

deleteAudioArtifact

Deletes an audio artifact

delete an Audio Artifact


/audios/{audioId}

Usage and SDK Samples

curl -X DELETE\
\
-H "Accept: application/json"\
"https://acme.analytics.sentientmachines.tech/audios/{audioId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AudioApi;

import java.io.File;
import java.util.*;

public class AudioApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        AudioApi apiInstance = new AudioApi();
        String apiKey = apiKey_example; // String | 
        String audioId = audioId_example; // String | Audio to delete
        try {
            Job result = apiInstance.deleteAudioArtifact(apiKey, audioId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AudioApi#deleteAudioArtifact");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AudioApi;

public class AudioApiExample {

    public static void main(String[] args) {
        AudioApi apiInstance = new AudioApi();
        String apiKey = apiKey_example; // String | 
        String audioId = audioId_example; // String | Audio to delete
        try {
            Job result = apiInstance.deleteAudioArtifact(apiKey, audioId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AudioApi#deleteAudioArtifact");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *apiKey = apiKey_example; // 
String *audioId = audioId_example; // Audio to delete

AudioApi *apiInstance = [[AudioApi alloc] init];

// Deletes an audio artifact
[apiInstance deleteAudioArtifactWith:apiKey
    audioId:audioId
              completionHandler: ^(Job output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.AudioApi()
var apiKey = apiKey_example; // {{String}} 
var audioId = audioId_example; // {{String}} Audio to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteAudioArtifact(apiKey, audioId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteAudioArtifactExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AudioApi();
            var apiKey = apiKey_example;  // String | 
            var audioId = audioId_example;  // String | Audio to delete

            try
            {
                // Deletes an audio artifact
                Job result = apiInstance.deleteAudioArtifact(apiKey, audioId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AudioApi.deleteAudioArtifact: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAudioApi();
$apiKey = apiKey_example; // String | 
$audioId = audioId_example; // String | Audio to delete

try {
    $result = $api_instance->deleteAudioArtifact($apiKey, $audioId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudioApi->deleteAudioArtifact: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AudioApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AudioApi->new();
my $apiKey = apiKey_example; # String | 
my $audioId = audioId_example; # String | Audio to delete

eval { 
    my $result = $api_instance->deleteAudioArtifact(apiKey => $apiKey, audioId => $audioId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AudioApi->deleteAudioArtifact: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AudioApi()
apiKey = apiKey_example # String | 
audioId = audioId_example # String | Audio to delete

try: 
    # Deletes an audio artifact
    api_response = api_instance.delete_audio_artifact(apiKey, audioId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AudioApi->deleteAudioArtifact: %s\n" % e)

Parameters

Path parameters
Name Description
audioId*
String (string)
Audio to delete
Required
Header parameters
Name Description
api_key*
String
Required

Responses

Status: 200 - deletion success

Status: 400 - Invalid job value


uploadAudio

Upload audio to temporary storage

Upload an audio (WAV, OGG, OPUS, MP3) for use in subsequent requests


/audios

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json"\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://acme.analytics.sentientmachines.tech/audios"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AudioApi;

import java.io.File;
import java.util.*;

public class AudioApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        AudioApi apiInstance = new AudioApi();
        Object file = ; // Object | 
        try {
            AudioUploadResponse result = apiInstance.uploadAudio(file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AudioApi#uploadAudio");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AudioApi;

public class AudioApiExample {

    public static void main(String[] args) {
        AudioApi apiInstance = new AudioApi();
        Object file = ; // Object | 
        try {
            AudioUploadResponse result = apiInstance.uploadAudio(file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AudioApi#uploadAudio");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Object *file = ; // 

AudioApi *apiInstance = [[AudioApi alloc] init];

// Upload audio to temporary storage
[apiInstance uploadAudioWith:file
              completionHandler: ^(AudioUploadResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.AudioApi()
var file = ; // {{Object}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.uploadAudio(file, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class uploadAudioExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AudioApi();
            var file = new Object(); // Object | 

            try
            {
                // Upload audio to temporary storage
                AudioUploadResponse result = apiInstance.uploadAudio(file);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AudioApi.uploadAudio: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAudioApi();
$file = ; // Object | 

try {
    $result = $api_instance->uploadAudio($file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudioApi->uploadAudio: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AudioApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AudioApi->new();
my $file = ; # Object | 

eval { 
    my $result = $api_instance->uploadAudio(file => $file);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AudioApi->uploadAudio: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AudioApi()
file =  # Object | 

try: 
    # Upload audio to temporary storage
    api_response = api_instance.upload_audio(file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AudioApi->uploadAudio: %s\n" % e)

Parameters

Form parameters
Name Description
file*
Object (binary)
Required

Responses

Status: 201 - Successful operation

Status: 400 - Invalid Audio content

Status: 403 - Unauthorized

Status: 405 - Validation exception


Jobs

deleteJob

Deletes a job

delete a job


/jobs/{jobId}

Usage and SDK Samples

curl -X DELETE\
\
-H "Accept: application/json"\
"https://acme.analytics.sentientmachines.tech/jobs/{jobId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobsApi;

import java.io.File;
import java.util.*;

public class JobsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        String jobId = jobId_example; // String | Job id to delete
        try {
            Job result = apiInstance.deleteJob(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#deleteJob");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobsApi;

public class JobsApiExample {

    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        String jobId = jobId_example; // String | Job id to delete
        try {
            Job result = apiInstance.deleteJob(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#deleteJob");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *apiKey = apiKey_example; // 
String *jobId = jobId_example; // Job id to delete

JobsApi *apiInstance = [[JobsApi alloc] init];

// Deletes a job
[apiInstance deleteJobWith:apiKey
    jobId:jobId
              completionHandler: ^(Job output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.JobsApi()
var apiKey = apiKey_example; // {{String}} 
var jobId = jobId_example; // {{String}} Job id to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteJob(apiKey, jobId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteJobExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new JobsApi();
            var apiKey = apiKey_example;  // String | 
            var jobId = jobId_example;  // String | Job id to delete

            try
            {
                // Deletes a job
                Job result = apiInstance.deleteJob(apiKey, jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobsApi.deleteJob: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiJobsApi();
$apiKey = apiKey_example; // String | 
$jobId = jobId_example; // String | Job id to delete

try {
    $result = $api_instance->deleteJob($apiKey, $jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobsApi->deleteJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobsApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::JobsApi->new();
my $apiKey = apiKey_example; # String | 
my $jobId = jobId_example; # String | Job id to delete

eval { 
    my $result = $api_instance->deleteJob(apiKey => $apiKey, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->deleteJob: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.JobsApi()
apiKey = apiKey_example # String | 
jobId = jobId_example # String | Job id to delete

try: 
    # Deletes a job
    api_response = api_instance.delete_job(apiKey, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->deleteJob: %s\n" % e)

Parameters

Path parameters
Name Description
jobId*
String (string)
Job id to delete
Required
Header parameters
Name Description
api_key*
String
Required

Responses

Status: 200 - deletion success

Status: 400 - Invalid job value


jobResults

retrieve job results


/jobs/{jobId}/results

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://acme.analytics.sentientmachines.tech/jobs/{jobId}/results"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobsApi;

import java.io.File;
import java.util.*;

public class JobsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        String jobId = jobId_example; // String | Job id of job results to return
        try {
            AnalyticsTask result = apiInstance.jobResults(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#jobResults");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobsApi;

public class JobsApiExample {

    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        String jobId = jobId_example; // String | Job id of job results to return
        try {
            AnalyticsTask result = apiInstance.jobResults(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#jobResults");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *apiKey = apiKey_example; // 
String *jobId = jobId_example; // Job id of job results to return

JobsApi *apiInstance = [[JobsApi alloc] init];

// retrieve job results
[apiInstance jobResultsWith:apiKey
    jobId:jobId
              completionHandler: ^(AnalyticsTask output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.JobsApi()
var apiKey = apiKey_example; // {{String}} 
var jobId = jobId_example; // {{String}} Job id of job results to return

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.jobResults(apiKey, jobId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class jobResultsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new JobsApi();
            var apiKey = apiKey_example;  // String | 
            var jobId = jobId_example;  // String | Job id of job results to return

            try
            {
                // retrieve job results
                AnalyticsTask result = apiInstance.jobResults(apiKey, jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobsApi.jobResults: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiJobsApi();
$apiKey = apiKey_example; // String | 
$jobId = jobId_example; // String | Job id of job results to return

try {
    $result = $api_instance->jobResults($apiKey, $jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobsApi->jobResults: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobsApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::JobsApi->new();
my $apiKey = apiKey_example; # String | 
my $jobId = jobId_example; # String | Job id of job results to return

eval { 
    my $result = $api_instance->jobResults(apiKey => $apiKey, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->jobResults: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.JobsApi()
apiKey = apiKey_example # String | 
jobId = jobId_example # String | Job id of job results to return

try: 
    # retrieve job results
    api_response = api_instance.job_results(apiKey, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->jobResults: %s\n" % e)

Parameters

Path parameters
Name Description
jobId*
String (string)
Job id of job results to return
Required
Header parameters
Name Description
api_key*
String
Required

Responses

Status: 200 - successful operation


jobStatus

get Job status

Produce text, speaker separation, and segmentation for audio


/jobs/{jobId}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://acme.analytics.sentientmachines.tech/jobs/{jobId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobsApi;

import java.io.File;
import java.util.*;

public class JobsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: analytics_auth
        OAuth analytics_auth = (OAuth) defaultClient.getAuthentication("analytics_auth");
        analytics_auth.setAccessToken("YOUR ACCESS TOKEN");

        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        Long jobId = 789; // Long | ID of job to return
        try {
            array[Job] result = apiInstance.jobStatus(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#jobStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobsApi;

public class JobsApiExample {

    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String apiKey = apiKey_example; // String | 
        Long jobId = 789; // Long | ID of job to return
        try {
            array[Job] result = apiInstance.jobStatus(apiKey, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#jobStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: analytics_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *apiKey = apiKey_example; // 
Long *jobId = 789; // ID of job to return

JobsApi *apiInstance = [[JobsApi alloc] init];

// get Job status
[apiInstance jobStatusWith:apiKey
    jobId:jobId
              completionHandler: ^(array[Job] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');
var defaultClient = SentientMachinesAnalyticsOpenApi30.ApiClient.instance;

// Configure OAuth2 access token for authorization: analytics_auth
var analytics_auth = defaultClient.authentications['analytics_auth'];
analytics_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new SentientMachinesAnalyticsOpenApi30.JobsApi()
var apiKey = apiKey_example; // {{String}} 
var jobId = 789; // {{Long}} ID of job to return

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.jobStatus(apiKey, jobId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class jobStatusExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: analytics_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new JobsApi();
            var apiKey = apiKey_example;  // String | 
            var jobId = 789;  // Long | ID of job to return

            try
            {
                // get Job status
                array[Job] result = apiInstance.jobStatus(apiKey, jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobsApi.jobStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: analytics_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiJobsApi();
$apiKey = apiKey_example; // String | 
$jobId = 789; // Long | ID of job to return

try {
    $result = $api_instance->jobStatus($apiKey, $jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobsApi->jobStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobsApi;

# Configure OAuth2 access token for authorization: analytics_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::JobsApi->new();
my $apiKey = apiKey_example; # String | 
my $jobId = 789; # Long | ID of job to return

eval { 
    my $result = $api_instance->jobStatus(apiKey => $apiKey, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->jobStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: analytics_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.JobsApi()
apiKey = apiKey_example # String | 
jobId = 789 # Long | ID of job to return

try: 
    # get Job status
    api_response = api_instance.job_status(apiKey, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->jobStatus: %s\n" % e)

Parameters

Path parameters
Name Description
jobId*
Long (int64)
ID of job to return
Required
Header parameters
Name Description
api_key*
String
Required

Responses

Status: 200 - successful operation

Status: 400 - Invalid status value


Oauth

create_token

Logs into the system and retrieve token


/oauth/token

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://acme.analytics.sentientmachines.tech/oauth/token"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OauthApi;

import java.io.File;
import java.util.*;

public class OauthApiExample {

    public static void main(String[] args) {
        
        OauthApi apiInstance = new OauthApi();
        OauthTokenRequest body = ; // OauthTokenRequest | Authorization for token creation
        try {
            OauthTokenResponse result = apiInstance.create_token(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#create_token");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OauthApi;

public class OauthApiExample {

    public static void main(String[] args) {
        OauthApi apiInstance = new OauthApi();
        OauthTokenRequest body = ; // OauthTokenRequest | Authorization for token creation
        try {
            OauthTokenResponse result = apiInstance.create_token(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#create_token");
            e.printStackTrace();
        }
    }
}
OauthTokenRequest *body = ; // Authorization for token creation

OauthApi *apiInstance = [[OauthApi alloc] init];

// Logs into the system and retrieve token
[apiInstance create_tokenWith:body
              completionHandler: ^(OauthTokenResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SentientMachinesAnalyticsOpenApi30 = require('sentient_machines_analytics___open_api_30');

var api = new SentientMachinesAnalyticsOpenApi30.OauthApi()
var body = ; // {{OauthTokenRequest}} Authorization for token creation

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.create_token(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class create_tokenExample
    {
        public void main()
        {

            var apiInstance = new OauthApi();
            var body = new OauthTokenRequest(); // OauthTokenRequest | Authorization for token creation

            try
            {
                // Logs into the system and retrieve token
                OauthTokenResponse result = apiInstance.create_token(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OauthApi.create_token: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOauthApi();
$body = ; // OauthTokenRequest | Authorization for token creation

try {
    $result = $api_instance->create_token($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->create_token: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OauthApi;

my $api_instance = WWW::SwaggerClient::OauthApi->new();
my $body = WWW::SwaggerClient::Object::OauthTokenRequest->new(); # OauthTokenRequest | Authorization for token creation

eval { 
    my $result = $api_instance->create_token(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OauthApi->create_token: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OauthApi()
body =  # OauthTokenRequest | Authorization for token creation

try: 
    # Logs into the system and retrieve token
    api_response = api_instance.create_token(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OauthApi->create_token: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Invalid request

Status: 401 - Unauthorized


API Flow Diagram