Authorization: Bearer ********************{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Extract the key information from this email: John Smith (john@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
}
],
"output_format": {
"type": "json_schema",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"plan_interest": {
"type": "string"
},
"demo_requested": {
"type": "boolean"
}
},
"required": [
"name",
"email",
"plan_interest",
"demo_requested"
],
"additionalProperties": false
}
}
}curl --location 'https://code0.ai/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Extract the key information from this email: John Smith (john@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
}
],
"output_format": {
"type": "json_schema",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"plan_interest": {
"type": "string"
},
"demo_requested": {
"type": "boolean"
}
},
"required": [
"name",
"email",
"plan_interest",
"demo_requested"
],
"additionalProperties": false
}
}
}'{}