# Structured output · JSON / guided grammar — neuraldeep.tech API

> One section of the machine-readable reference. All sections: https://neuraldeep.tech/llms.txt · everything in one file: https://neuraldeep.tech/llms-full.txt

Base URL: `https://api.neuraldeep.tech/v1`
Auth: `Authorization: Bearer $YOUR_KEY`

vLLM supports guided JSON, regex, and grammar (llguidance). Via the OpenAI-compatible `response_format`.

```bash
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"}
  }'
```

```python
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: true` in the schema is required. vLLM guarantees conformance to the grammar.
