---
title: "Gliner2 Async"
method: POST
path: "/v1/gliner-2/async"
tags: ["gliner"]
---

# Gliner2 Async

`POST /v1/gliner-2/async`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/gliner-2/async`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/gliner-2/async/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Request body

- AsyncGlinerRequest: Request for async GLiNER-2 processing.
  - `task` string, 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.
  - `text` union, required
    - string
    - string[]
  - `schema` union, required: Extraction schema. The flat ``list[str]`` of entity labels is deprecated; use the unified dict shape (``entities`` / ``classifications`` / ``structures`` / ``relations``) for forward compatibility. Deprecated submissions emit ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers.
    - string[]
    - object
  - `threshold` number, nullable
  - `include_confidence` boolean, nullable
  - `include_spans` boolean, nullable
  - `format_results` boolean, nullable

## Response `202`

Successful Response

- AsyncGlinerResponse: Response from async job submission.
  - `job_id` string, required
  - `status` string, required
  - `estimated_tokens` integer, required
  - `message` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/gliner-2/async/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
