Open in the interactive docs · markdown for agents: https://neuraldeep.tech/docs/structured.md
Structured output · JSON / guided grammar
vLLM supports guided JSON, regex, and grammar (llguidance). Via the OpenAI-compatible response_format.
curl https://api.neuraldeep.tech/v1/chat/completions \
-H "Authorization: Bearer $YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-120b",
"messages": [{"role":"user","content":"Extract name and age from: John, 30 years old"}],
"response_format": {"type":"json_object"}
}'
from pydantic import BaseModel
from openai import OpenAI
class Person(BaseModel):
name: str
age: int
client = OpenAI(api_key="$YOUR_KEY", base_url="https://api.neuraldeep.tech/v1")
r = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role":"user","content":"John, 30 years old"}],
response_format={"type":"json_schema","json_schema":{
"name":"Person","schema":Person.model_json_schema(),"strict":True
}},
)
person = Person.model_validate_json(r.choices[0].message.content)
For strict JSON —
strict: truein the schema is required. vLLM guarantees conformance to the grammar.
Reference sections (markdown for agents)
- Start · key, errors, quotas
- Text · chat
- Vectorization
- Reranking
- Transcription
- Image recognition
- Structured output
- Clients · agents
- Remaining limits · Limits API
- Search · Search API
- OCR · documents
- Images · Image API
- Music · Music API
- PII anonymization · PII Guard
- SpeechCore · STT
- Speech synthesis · TTS API
- Who spoke when · diarization
- Text decisions · FRIDA-Decisions, clef-flash
- Drift · overview
- Files + sandbox preview
- Your own tools, skills, MCP
- Tasks · proactive
- Memory · memory
- Isolation and security
- Agent settings
- Limits · errors
- Book · search and MCP
- Streaming
- SDK · Python / JS
- Privacy