Documentation  
Quickstart

Quickstart

Learn how to get up and running with the Taylor Classification API in just a few minutes.

Sign In and Create an API Key

Use your Google, Microsoft, or GitHub account to sign in to Taylor (opens in a new tab). Then, navigate to the "Profile & Team" section to create an API key. Make sure to store it somewhere safe, as it won't be shown again.

api key

Test a Model in the Playground

Select "Playground" in the sidebar and choose a model to test. You can see all available models here. The playground allows you to test different thresholds and control how many labels are returned.

playground

Use the API to Deploy in Production

To add Taylor's classification to your product or data pipeline, use the API key to send requests directly to the API. You can copy the starter code below, replacing xx-your-api-key-here with your API key. (For production use, we recommend storing your API key in an environment variable, rather than hardcoding it.)

import requests
api_key = "xx-your-api-key-here"
 
res = requests.post(
    "https://api.trytaylor.ai/api/public_classifiers/predict",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "model": "topics",
        "texts": [
            "Apple Inc. v. Samsung Electronics Co.: A series of patent infringement suits involving smartphone and tablet technology, resulting in significant financial judgments.",
            "Brown v. Board of Education was a landmark U.S. Supreme Court case in which segregation in public schools was ruled unconstitutional.",
            "McDonald's Hot Coffee Case was about a woman who was awarded damages after being burned by McDonald’s hot coffee."
        ],
        "threshold": 0.05,
        "top_k": 3
    }
)
 
print(res.json())
 

For use cases where you want to classify large volumes of data faster, consider using the batch API, or see our guide to asynchronous API requests.