v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
gliner

Gliner2 Async

Submit large GLiNER-2 request for async processing.

Use this endpoint when processing >1M tokens that would exceed the 30-second timeout. Returns immediately with a job_id. Poll GET /gliner-2/jobs/{job_id} to retrieve results.

Args: request: AsyncGlinerRequest with task, text, schema http_request: FastAPI request object auth: Authentication result

Returns: 202 Accepted with job_id for polling

post/gliner-2/async

Request body

taskstring nullable

Deprecated legacy task hint. One of: 'extract_entities', 'classify_text', 'extract_json', 'schema'. Omit for the unified GLiNER2 path. Submitting a legacy task value still succeeds but the response carries Deprecation: true and a Sunset header.

thresholdnumber nullable
include_confidenceboolean nullable
include_spansboolean nullable
format_resultsboolean nullable

Response

Successful Response

job_idstring required
statusstring required
estimated_tokensinteger required
messagestring required