IN THIS ARTICLE

    Scale is an API for human labor, enabling you to deploy real humans, on-demand, to execute tasks like content moderation, phone surveys, transcription, e-commerce tagging, and image recognition. The API handles everything from sourcing and managing the crowd, to building efficient tooling.

    Scale supports five task types: categorization, transcription, phone calls, comparisons, annotations, and data collection. For example, if you wanted to know if a car fits in the category of big or small, this would be a categorization task. If you want somebody to call a restaurant to make a reservation for you, this would be a phone call task. To use any of these tasks you must use the Scale API to create the task with instructions and a task id. Later you can follow up to find out when the task is completed, get the results, or cancel the task.

    With the Scale API block, execute these tasks while the data is streaming in realtime. The function is executed while the data is in-motion, not when it is received by the subscriber.

    Using the Scale API

    First, you must create a Scale account, and you’ll be taken to the dashboard page. Copy the ‘testapi key’ value.

    Next, on the Scale API block page in the BLOCKS Catalog, click the ‘try it now’ button and follow the prompts to create a copy of the template block.

    Paste the ‘testapi key’ from the previous step into the scaleAPIKey variable of the block code. Press the start button to start up the block.

    You need a test message. Create test JSON in the test payload (bottom left of the BLOCKS editor screen) like this:

    {
       "task_id":"mytask001",
       "type":"categorization",
       "instruction":"Would you say this item is big or small?",
       "attachment_type":"text",
       "attachment":"car",
       "categories": ["big","small"],
       "sab_type":"categorize",
       "sab_id":"mytask001"
    }
    

    Publish the test payload. You should see a response in the console indicating that the task was correctly created. From there you can track the task to get its current status or cancel the task.

    How Scale API Works

    The Scale API is powered by a team of people called ‘scalers’. These are real humans who can do tasks that are difficult for machines to do. They are all trained and can speak, read, and write English. Scalers can be used for customer support tasks like verifying information and transcription, database tasks like classifying product data, transcription from visual documents like a driver’s license photo, and even making phone calls.

    Scale is another powerful API partner that can make your applications richer and more powerful. For more examples, check out the BLOCKS Catalog page.

    Try PubNub today!

    Build realtime applications that perform reliably and securely, at global scale.
    Try Our APIs
    Try PubNub today!
    More From PubNub