AI: Analysis 10 credits LLM

Text Classify API

Classify text into any categories you define using Claude AI via REST API. Unlike pre-trained classifiers locked to fixed categories (spam/not-spam, positive/negative), this API works with any categories you specify — making it useful for routing, tagging, and organizing any type of content.

Try it live →

How it works

POST your text and an array of category names. The API uses Claude to classify the text into the best matching category, returning the category name, a confidence score (0–1), and a brief explanation of why it was classified that way.

Use cases

API Reference

POST https://slopshop.gg/v1/llm-classify
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Input parameters

ParameterTypeRequiredDescription
text string required The text to process with AI
options object optional Optional configuration (format, length, etc.)

Example response

{
  "data": {
    "result": "AI-generated result based on your input.",
    "model": "claude-3-5-sonnet",
    "tokens_used": 150
  },
  "meta": {
    "credits_used": 10,
    "engine": "real",
    "ms": 4
  }
}

Examples

Three real-world scenarios showing how developers use Text Classify in production.

Example 1
Route support ticket
Classify an incoming ticket to the right team automatically.
curl -X POST https://slopshop.gg/v1/llm-classify \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "I was charged twice for my subscription this month.", "categories": ["billing", "technical", "account", "shipping"]}'
Example 2
Tag blog post
Assign a content category to an article for the editorial CMS.
curl -X POST https://slopshop.gg/v1/llm-classify \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "New research shows intermittent fasting may reduce inflammation markers...", "categories": ["health", "technology", "finance", "travel", "science"]}'
Example 3
Classify job application
Sort a resume into a role-fit tier for initial screening.
curl -X POST https://slopshop.gg/v1/llm-classify \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "5 years Python, 3 years ML, published papers in NeurIPS...", "categories": ["senior_engineer", "mid_level", "junior", "not_a_fit"]}'

Code examples

curl

curl -X POST https://slopshop.gg/v1/llm-classify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "your data here"}'

Python

import requests

response = requests.post(
    "https://slopshop.gg/v1/llm-classify",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"input": "your data here"}
)
result = response.json()
print(result["data"])

Node.js

const response = await fetch("https://slopshop.gg/v1/llm-classify", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);

CLI

# Install the Slopshop CLI
npm install -g slopshop

# Set your API key
export SLOPSHOP_KEY=your_api_key

# Call llm-classify
slop llm-classify '{"input": "your data here"}'

Pricing

Credits per call
10
credits
Cost per call
$0.01
at Starter tier
Tier
LLM
Requires LLM key

Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 10 credits per call — that's $0.01. See all pricing tiers.

Related APIs in AI: Analysis

View the full API catalog · Try in playground · Documentation