curl -X POST https://api.60db.ai/v1/extract \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "can you move my appointment to friday morning",
"schema": {
"intents": { "booking": "Wants to arrange or change a booking", "unknown": "Not clear" },
"operations": { "reschedule": "Move an existing booking", "cancel": "Call it off" }
}
}'
const response = await fetch('https://api.60db.ai/v1/extract', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'can you move my appointment to friday morning',
schema: {
intents: { booking: 'Wants to arrange or change a booking', unknown: 'Not clear' },
operations: { reschedule: 'Move an existing booking', cancel: 'Call it off' },
},
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/v1/extract",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "can you move my appointment to friday morning",
"schema": {
"intents": {"booking": "Wants to arrange or change a booking", "unknown": "Not clear"},
"operations": {"reschedule": "Move an existing booking", "cancel": "Call it off"},
},
},
)
data = response.json()
{
"version": 1,
"requestId": "b2c3d4e5-f6a7-4890-bcde-f01234567890",
"intent": { "label": "booking", "confidence": 0.94 },
"operation": { "label": "reschedule", "confidence": 0.61 },
"responsePath": null,
"entities": [
{ "label": "date", "text": "friday", "start": 36, "end": 42, "confidence": 0.8 }
],
"offsetUnit": "unicode_code_points",
"modelRevision": "a221b77a8baf4a613b8f8652661d41fa10a5641e",
"timings": { "queueMs": 1.2, "inferenceMs": 18.7, "totalMs": 19.9 }
}
Judge
Extract
Wire-compatible twin of Extract, for callers that already speak the upstream model service’s own contract
POST
/
v1
/
extract
curl -X POST https://api.60db.ai/v1/extract \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "can you move my appointment to friday morning",
"schema": {
"intents": { "booking": "Wants to arrange or change a booking", "unknown": "Not clear" },
"operations": { "reschedule": "Move an existing booking", "cancel": "Call it off" }
}
}'
const response = await fetch('https://api.60db.ai/v1/extract', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'can you move my appointment to friday morning',
schema: {
intents: { booking: 'Wants to arrange or change a booking', unknown: 'Not clear' },
operations: { reschedule: 'Move an existing booking', cancel: 'Call it off' },
},
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/v1/extract",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "can you move my appointment to friday morning",
"schema": {
"intents": {"booking": "Wants to arrange or change a booking", "unknown": "Not clear"},
"operations": {"reschedule": "Move an existing booking", "cancel": "Call it off"},
},
},
)
data = response.json()
{
"version": 1,
"requestId": "b2c3d4e5-f6a7-4890-bcde-f01234567890",
"intent": { "label": "booking", "confidence": 0.94 },
"operation": { "label": "reschedule", "confidence": 0.61 },
"responsePath": null,
"entities": [
{ "label": "date", "text": "friday", "start": 36, "end": 42, "confidence": 0.8 }
],
"offsetUnit": "unicode_code_points",
"modelRevision": "a221b77a8baf4a613b8f8652661d41fa10a5641e",
"timings": { "queueMs": 1.2, "inferenceMs": 18.7, "totalMs": 19.9 }
}
Wire-compatible twin of Extract — same auth, same billing, same request body, same limits — for a caller that already speaks the upstream model service’s own contract directly.
Unlike Evaluate, this path does not mirror the upstream’s own route: the upstream’s real extract endpoint is unprefixed (
Every error above is returned as
/extract), but both routes here are grouped under /v1/ for a consistent surface, rather than this one route breaking the pattern. The request/response body still matches the upstream exactly — only the path differs.
Three differences from POST /judge/extract:
- The response is the raw upstream classification — no
{success,data}envelope, and noid/saved/credits_chargedfields. - Errors are
{error:{code,message}}, not{success:false,message,code}. - A run through this route is never saved to Judge history — there’s no
save,label, orrequest_id-as-storage-key concept that persists anything, and nothing you send changes that.
/judge/extract — the same wallet, the same refund-on-failure — it rides the x-credit-charged / x-credit-balance / x-billing-tx response headers instead of the body.
Billed per input token, same rate as Extract. See Judge pricing.
Request
Headers
string
required
Bearer token — your standard 60db API key (
sk_…), or a user JWT. The same credential as every other Judge route.string
required
application/json
Body
Identical to Extract, minus the 60db-localsave field:
string
required
The turn to classify. Maximum 200,000 Unicode code points.
object
required
intents, operations, optional entities, optional responsePaths (supplying it selects the v2 model). See Extract → Body for the full shape — the required unknown label is added for you if you omit it.string
default:"generic"
generic or medical. v2 only.integer
default:"8000"
Total request budget in milliseconds, 1–30000.
string
Your own correlation id, echoed back. Generated for you if omitted.
No
save field — a run through this route is never saved regardless. Use Extract if you need run history.Response
The raw upstream object — no envelope, and camelCase field names (the upstream’s own extract contract, unlike evaluate’s response, does not use snake_case):integer
1 or 2, matching whether you supplied schema.responsePaths.string
Your
request_id, or a generated one. Note the camelCase — this is request_id on Extract’s wrapped response.object
label and confidence.object
label and confidence.object | null
Present only on v2. camelCase —
response_path on the wrapped response.array
Each entity carries
label, text, start, end, confidence — start/end are Unicode code point offsets, see Extract → Entity offsets.string
Always
unicode_code_points. camelCase — offset_unit on the wrapped response.string
camelCase —
model_revision on the wrapped response.object
queueMs, inferenceMs, totalMs.Errors
| Status | Meaning |
|---|---|
400 | Text over 200,000 code points, a missing label map, or version: 2 without responsePaths. |
402 | Insufficient credits. |
403 | Your role cannot run the judge, or the API key lacks the judge scope. |
429 | Inference queue full. |
504 | The request budget expired — shorten the text or raise budget_ms. |
{"error": {"code": "...", "message": "..."}}, not {success:false,...}.
Example
curl -X POST https://api.60db.ai/v1/extract \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "can you move my appointment to friday morning",
"schema": {
"intents": { "booking": "Wants to arrange or change a booking", "unknown": "Not clear" },
"operations": { "reschedule": "Move an existing booking", "cancel": "Call it off" }
}
}'
const response = await fetch('https://api.60db.ai/v1/extract', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'can you move my appointment to friday morning',
schema: {
intents: { booking: 'Wants to arrange or change a booking', unknown: 'Not clear' },
operations: { reschedule: 'Move an existing booking', cancel: 'Call it off' },
},
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/v1/extract",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "can you move my appointment to friday morning",
"schema": {
"intents": {"booking": "Wants to arrange or change a booking", "unknown": "Not clear"},
"operations": {"reschedule": "Move an existing booking", "cancel": "Call it off"},
},
},
)
data = response.json()
{
"version": 1,
"requestId": "b2c3d4e5-f6a7-4890-bcde-f01234567890",
"intent": { "label": "booking", "confidence": 0.94 },
"operation": { "label": "reschedule", "confidence": 0.61 },
"responsePath": null,
"entities": [
{ "label": "date", "text": "friday", "start": 36, "end": 42, "confidence": 0.8 }
],
"offsetUnit": "unicode_code_points",
"modelRevision": "a221b77a8baf4a613b8f8652661d41fa10a5641e",
"timings": { "queueMs": 1.2, "inferenceMs": 18.7, "totalMs": 19.9 }
}