json_schema and json_object are separate capabilities. json_schema has broader model support. Claude supports json_schema but not json_object.If you request an unsupported mode, Auriko returns a 503 with a suggested alternative.
Check per-model support on the models page or via the Directory API. json_schema appears as Structured Output, json_object as JSON Mode.
To return any JSON output, set response_format to json_object:
import osfrom auriko import Clientclient = Client( api_key=os.environ["AURIKO_API_KEY"], base_url="https://api.auriko.ai/v1")response = client.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Extract the user's name and age as JSON."}, {"role": "user", "content": "I'm Alice and I'm 30 years old."} ], response_format={"type": "json_object"})print(response.choices[0].message.content)# {"name": "Alice", "age": 30}
The model returns valid JSON, but the structure isn’t guaranteed. For strict schema conformance, use json_schema instead.
When using json_object mode, always include the word “JSON” in your system or user message. OpenAI and DeepSeek require this and return a 400 error without it. Including it is harmless on other providers. The json_schema mode does not have this requirement.The examples above include “JSON” in the system message.