Request
Request schema
Response
GLiNER returns the result as a JSON string inchoices[0].message.content. Parsed, it looks like this. Measured against https://api.fastino.ai; confidence values vary slightly between calls.
Response schema
Relations come back under
relation_extraction, not under relations.
Act on the answer
Adapt it
- State the direction in each description, such as “a person is employed by an organization”, so heads and tails come out the right way round.
- Define entity labels for every kind of thing your relations connect, so the entities are typed in your results.
- Lower
thresholdwhile tuning to see near misses, then filter in code on the head and tail confidence. - Store
startandendwith each fact, so you can trace it back to its source sentence.
Call GLiNER
Every GLiNER schema type and how to read its result.
Chat Completions API reference
Every field, limit, and error for
POST /v1/chat/completions.
