IronStratum

POST /v1/classification

Classify text or extract entities (unit-billed, pages or searches by lane)

Task #31 specialty route (route_type: classification; the embeddings-shaped batch contract). JSON passthrough both ways. Accepted params — model, input (required; string or array of strings), then PER LANE: the iab taxonomy lane takes taxonomy (2.1 | 2.2 on iab-2x, 3.1 on iab-3x — validated against the alias's lane) and optional both_versions; the gliner lane takes types (required — zero-shot custom entity types) with labels its accepted alias. The lane param sets are per-lane: taxonomy and both_versions on the gliner lane are 400 unknown_param, types/labels on the iab lane likewise. Everything else is unknown_param. Body bound is the JSON-route 32 MiB read law — an over-bound body answers 400 invalid_json, never 413 (the 25 MiB cap is the multipart-family law). Metering: the iab lane bills unit_type='pages' — the card-reported pages count, else the input count (media records the basis; a page is up to 2,000 tokens rounded up); the gliner lane bills unit_type='searches' = the INPUT count — every input is one extraction unit, a deliberate divergence from rerank (where one request is one search over N documents): a batched array bills N here, never 1. Idempotency-Key carries replay semantics on this route (contract §8 route-scope).

Request

Request body fields for classifyContent
Field Type Required Description
model string yes An IronStratum alias whose route_type is classification.
input any yes The text to classify or extract from (each array item is one unit).
taxonomy string no iab lane only — the taxonomy version, must match the alias's lane (iab-2x serves 2.1 | 2.2; iab-3x serves 3.1).
both_versions boolean no iab lane only — serve the cross-mapped other taxonomy in the same response.
types array of string no gliner lane only, required there — the zero-shot custom entity types.
labels array of string no gliner lane only — the accepted alias of types (either satisfies the required-param law).

Responses

400 400

400 response fields for classifyContent
Field Type Required Description
error object yes —

401 401

401 response fields for classifyContent
Field Type Required Description
error object yes —

402 402

402 response fields for classifyContent
Field Type Required Description
error object yes —

403 403

403 response fields for classifyContent
Field Type Required Description
error object yes —

404 404

404 response fields for classifyContent
Field Type Required Description
error object yes —

409 409

409 response fields for classifyContent
Field Type Required Description
error object yes —

500 500

500 response fields for classifyContent
Field Type Required Description
error object yes —

502 502

502 response fields for classifyContent
Field Type Required Description
error object yes —

503 503

503 response fields for classifyContent
Field Type Required Description
error object yes —

Status codes

  • 200 — The card's classification response, passed through verbatim.

Example

curl -X POST https://api.ironstratum.com/v1/classification \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model>","input":"<input>"}'

All operations · interactive reference · openapi.yaml