Skip to main content

Code

structured_output.py
Select a text-generation model with JSON mode support for this example.

Usage

1

Set up your virtual environment

2

Export environment variables

Select an available text-generation model ID from the Nebius model-list API.
3

Install dependencies

4

Run Agent

Save the code above as structured_output.py, then run: