Chat completions
curl --request POST \
--url https://api.example.com/v1/chat/completions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"audio": {
"format": "<string>",
"voice": "<string>"
},
"frequency_penalty": {},
"logit_bias": {},
"logprobs": {},
"max_completion_tokens": {},
"max_tokens": {},
"messages": [
{
"content": "Explain nordlys routing.",
"role": "user"
}
],
"metadata": {},
"modalities": [
"<string>"
],
"model": "claude-opus-4-5",
"models": [
"<string>"
],
"n": {},
"parallel_tool_calls": {},
"prediction": {
"content": {
"OfArrayOfContentParts": [
{
"text": "<string>",
"type": "<string>"
}
],
"OfString": {}
},
"type": "<string>"
},
"presence_penalty": {},
"provider_configs": {},
"provider_data_collection": "<string>",
"provider_enforce_distillable_text": true,
"provider_ignore": [
"<string>"
],
"provider_max_completion_price": 123,
"provider_max_image_price": 123,
"provider_max_prompt_price": 123,
"provider_max_request_price": 123,
"provider_only": [
"<string>"
],
"provider_order": [
"<string>"
],
"provider_quantizations": [
"<string>"
],
"provider_require_parameters": true,
"provider_sort": "<string>",
"provider_zdr": true,
"reasoning_effort": "<string>",
"response_format": {
"OfJSONObject": {
"type": "<string>"
},
"OfJSONSchema": {
"json_schema": {
"description": {},
"name": "<string>",
"schema": "<unknown>",
"strict": {}
},
"type": "<string>"
},
"OfText": {
"type": "<string>"
}
},
"seed": {},
"service_tier": "<string>",
"stop": {
"OfString": {},
"OfStringArray": [
"<string>"
]
},
"store": {},
"stream": false,
"stream_options": {
"include_obfuscation": {},
"include_usage": {}
},
"temperature": {},
"tool_choice": {
"OfAllowedTools": {
"allowed_tools": {
"mode": "<string>",
"tools": [
{}
]
},
"type": "<string>"
},
"OfAuto": {},
"OfCustomToolChoice": {
"custom": {
"name": "<string>"
},
"type": "<string>"
},
"OfFunctionToolChoice": {
"function": {
"name": "<string>"
},
"type": "<string>"
}
},
"tools": [
{
"OfCustom": {
"custom": {
"description": {},
"format": {
"OfGrammar": {
"grammar": {
"definition": "<string>",
"syntax": "<string>"
},
"type": "<string>"
},
"OfText": {
"type": "<string>"
}
},
"name": "<string>"
},
"type": "<string>"
},
"OfFunction": {
"function": {
"description": {},
"name": "<string>",
"parameters": {},
"strict": {}
},
"type": "<string>"
}
}
],
"top_logprobs": {},
"top_p": {},
"user": {},
"web_search_options": {
"search_context_size": "<string>",
"user_location": {
"approximate": {
"city": {},
"country": {},
"region": {},
"timezone": {}
},
"type": "<string>"
}
}
}
'import requests
url = "https://api.example.com/v1/chat/completions"
payload = {
"audio": {
"format": "<string>",
"voice": "<string>"
},
"frequency_penalty": {},
"logit_bias": {},
"logprobs": {},
"max_completion_tokens": {},
"max_tokens": {},
"messages": [
{
"content": "Explain nordlys routing.",
"role": "user"
}
],
"metadata": {},
"modalities": ["<string>"],
"model": "claude-opus-4-5",
"models": ["<string>"],
"n": {},
"parallel_tool_calls": {},
"prediction": {
"content": {
"OfArrayOfContentParts": [
{
"text": "<string>",
"type": "<string>"
}
],
"OfString": {}
},
"type": "<string>"
},
"presence_penalty": {},
"provider_configs": {},
"provider_data_collection": "<string>",
"provider_enforce_distillable_text": True,
"provider_ignore": ["<string>"],
"provider_max_completion_price": 123,
"provider_max_image_price": 123,
"provider_max_prompt_price": 123,
"provider_max_request_price": 123,
"provider_only": ["<string>"],
"provider_order": ["<string>"],
"provider_quantizations": ["<string>"],
"provider_require_parameters": True,
"provider_sort": "<string>",
"provider_zdr": True,
"reasoning_effort": "<string>",
"response_format": {
"OfJSONObject": { "type": "<string>" },
"OfJSONSchema": {
"json_schema": {
"description": {},
"name": "<string>",
"schema": "<unknown>",
"strict": {}
},
"type": "<string>"
},
"OfText": { "type": "<string>" }
},
"seed": {},
"service_tier": "<string>",
"stop": {
"OfString": {},
"OfStringArray": ["<string>"]
},
"store": {},
"stream": False,
"stream_options": {
"include_obfuscation": {},
"include_usage": {}
},
"temperature": {},
"tool_choice": {
"OfAllowedTools": {
"allowed_tools": {
"mode": "<string>",
"tools": [{}]
},
"type": "<string>"
},
"OfAuto": {},
"OfCustomToolChoice": {
"custom": { "name": "<string>" },
"type": "<string>"
},
"OfFunctionToolChoice": {
"function": { "name": "<string>" },
"type": "<string>"
}
},
"tools": [
{
"OfCustom": {
"custom": {
"description": {},
"format": {
"OfGrammar": {
"grammar": {
"definition": "<string>",
"syntax": "<string>"
},
"type": "<string>"
},
"OfText": { "type": "<string>" }
},
"name": "<string>"
},
"type": "<string>"
},
"OfFunction": {
"function": {
"description": {},
"name": "<string>",
"parameters": {},
"strict": {}
},
"type": "<string>"
}
}
],
"top_logprobs": {},
"top_p": {},
"user": {},
"web_search_options": {
"search_context_size": "<string>",
"user_location": {
"approximate": {
"city": {},
"country": {},
"region": {},
"timezone": {}
},
"type": "<string>"
}
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audio: {format: '<string>', voice: '<string>'},
frequency_penalty: {},
logit_bias: {},
logprobs: {},
max_completion_tokens: {},
max_tokens: {},
messages: [{content: 'Explain nordlys routing.', role: 'user'}],
metadata: {},
modalities: ['<string>'],
model: 'claude-opus-4-5',
models: ['<string>'],
n: {},
parallel_tool_calls: {},
prediction: {
content: {OfArrayOfContentParts: [{text: '<string>', type: '<string>'}], OfString: {}},
type: '<string>'
},
presence_penalty: {},
provider_configs: {},
provider_data_collection: '<string>',
provider_enforce_distillable_text: true,
provider_ignore: ['<string>'],
provider_max_completion_price: 123,
provider_max_image_price: 123,
provider_max_prompt_price: 123,
provider_max_request_price: 123,
provider_only: ['<string>'],
provider_order: ['<string>'],
provider_quantizations: ['<string>'],
provider_require_parameters: true,
provider_sort: '<string>',
provider_zdr: true,
reasoning_effort: '<string>',
response_format: {
OfJSONObject: {type: '<string>'},
OfJSONSchema: {
json_schema: {description: {}, name: '<string>', schema: '<unknown>', strict: {}},
type: '<string>'
},
OfText: {type: '<string>'}
},
seed: {},
service_tier: '<string>',
stop: {OfString: {}, OfStringArray: ['<string>']},
store: {},
stream: false,
stream_options: {include_obfuscation: {}, include_usage: {}},
temperature: {},
tool_choice: {
OfAllowedTools: {allowed_tools: {mode: '<string>', tools: [{}]}, type: '<string>'},
OfAuto: {},
OfCustomToolChoice: {custom: {name: '<string>'}, type: '<string>'},
OfFunctionToolChoice: {function: {name: '<string>'}, type: '<string>'}
},
tools: [
{
OfCustom: {
custom: {
description: {},
format: {
OfGrammar: {grammar: {definition: '<string>', syntax: '<string>'}, type: '<string>'},
OfText: {type: '<string>'}
},
name: '<string>'
},
type: '<string>'
},
OfFunction: {
function: {description: {}, name: '<string>', parameters: {}, strict: {}},
type: '<string>'
}
}
],
top_logprobs: {},
top_p: {},
user: {},
web_search_options: {
search_context_size: '<string>',
user_location: {
approximate: {city: {}, country: {}, region: {}, timezone: {}},
type: '<string>'
}
}
})
};
fetch('https://api.example.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"choices": [
{
"finish_reason": "<string>",
"index": 123,
"logprobs": {
"content": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>"
}
]
}
],
"refusal": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>"
}
]
}
]
},
"message": {
"annotations": [
{
"type": "<string>",
"url_citation": {
"end_index": 123,
"start_index": 123,
"title": "<string>",
"url": "<string>"
}
}
],
"audio": {
"data": "<string>",
"expires_at": 123,
"id": "<string>",
"transcript": "<string>"
},
"content": "<string>",
"function_call": {
"arguments": "<string>",
"name": "<string>"
},
"refusal": "<string>",
"role": "<string>",
"tool_calls": [
{
"custom": {
"input": "<string>",
"name": "<string>"
},
"function": {
"arguments": "<string>",
"name": "<string>"
},
"id": "<string>",
"type": "<string>"
}
]
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "<string>",
"service_tier": "<string>",
"system_fingerprint": "<string>",
"usage": {
"completion_tokens": 123,
"completion_tokens_details": {
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123,
"rejected_prediction_tokens": 123
},
"prompt_tokens": 123,
"prompt_tokens_details": {
"audio_tokens": 123,
"cached_tokens": 123
},
"total_tokens": 123
}
}API Reference
Chat completions
OpenAI-compatible chat completions with NordlysProxy routing.
POST
/
v1
/
chat
/
completions
Chat completions
curl --request POST \
--url https://api.example.com/v1/chat/completions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"audio": {
"format": "<string>",
"voice": "<string>"
},
"frequency_penalty": {},
"logit_bias": {},
"logprobs": {},
"max_completion_tokens": {},
"max_tokens": {},
"messages": [
{
"content": "Explain nordlys routing.",
"role": "user"
}
],
"metadata": {},
"modalities": [
"<string>"
],
"model": "claude-opus-4-5",
"models": [
"<string>"
],
"n": {},
"parallel_tool_calls": {},
"prediction": {
"content": {
"OfArrayOfContentParts": [
{
"text": "<string>",
"type": "<string>"
}
],
"OfString": {}
},
"type": "<string>"
},
"presence_penalty": {},
"provider_configs": {},
"provider_data_collection": "<string>",
"provider_enforce_distillable_text": true,
"provider_ignore": [
"<string>"
],
"provider_max_completion_price": 123,
"provider_max_image_price": 123,
"provider_max_prompt_price": 123,
"provider_max_request_price": 123,
"provider_only": [
"<string>"
],
"provider_order": [
"<string>"
],
"provider_quantizations": [
"<string>"
],
"provider_require_parameters": true,
"provider_sort": "<string>",
"provider_zdr": true,
"reasoning_effort": "<string>",
"response_format": {
"OfJSONObject": {
"type": "<string>"
},
"OfJSONSchema": {
"json_schema": {
"description": {},
"name": "<string>",
"schema": "<unknown>",
"strict": {}
},
"type": "<string>"
},
"OfText": {
"type": "<string>"
}
},
"seed": {},
"service_tier": "<string>",
"stop": {
"OfString": {},
"OfStringArray": [
"<string>"
]
},
"store": {},
"stream": false,
"stream_options": {
"include_obfuscation": {},
"include_usage": {}
},
"temperature": {},
"tool_choice": {
"OfAllowedTools": {
"allowed_tools": {
"mode": "<string>",
"tools": [
{}
]
},
"type": "<string>"
},
"OfAuto": {},
"OfCustomToolChoice": {
"custom": {
"name": "<string>"
},
"type": "<string>"
},
"OfFunctionToolChoice": {
"function": {
"name": "<string>"
},
"type": "<string>"
}
},
"tools": [
{
"OfCustom": {
"custom": {
"description": {},
"format": {
"OfGrammar": {
"grammar": {
"definition": "<string>",
"syntax": "<string>"
},
"type": "<string>"
},
"OfText": {
"type": "<string>"
}
},
"name": "<string>"
},
"type": "<string>"
},
"OfFunction": {
"function": {
"description": {},
"name": "<string>",
"parameters": {},
"strict": {}
},
"type": "<string>"
}
}
],
"top_logprobs": {},
"top_p": {},
"user": {},
"web_search_options": {
"search_context_size": "<string>",
"user_location": {
"approximate": {
"city": {},
"country": {},
"region": {},
"timezone": {}
},
"type": "<string>"
}
}
}
'import requests
url = "https://api.example.com/v1/chat/completions"
payload = {
"audio": {
"format": "<string>",
"voice": "<string>"
},
"frequency_penalty": {},
"logit_bias": {},
"logprobs": {},
"max_completion_tokens": {},
"max_tokens": {},
"messages": [
{
"content": "Explain nordlys routing.",
"role": "user"
}
],
"metadata": {},
"modalities": ["<string>"],
"model": "claude-opus-4-5",
"models": ["<string>"],
"n": {},
"parallel_tool_calls": {},
"prediction": {
"content": {
"OfArrayOfContentParts": [
{
"text": "<string>",
"type": "<string>"
}
],
"OfString": {}
},
"type": "<string>"
},
"presence_penalty": {},
"provider_configs": {},
"provider_data_collection": "<string>",
"provider_enforce_distillable_text": True,
"provider_ignore": ["<string>"],
"provider_max_completion_price": 123,
"provider_max_image_price": 123,
"provider_max_prompt_price": 123,
"provider_max_request_price": 123,
"provider_only": ["<string>"],
"provider_order": ["<string>"],
"provider_quantizations": ["<string>"],
"provider_require_parameters": True,
"provider_sort": "<string>",
"provider_zdr": True,
"reasoning_effort": "<string>",
"response_format": {
"OfJSONObject": { "type": "<string>" },
"OfJSONSchema": {
"json_schema": {
"description": {},
"name": "<string>",
"schema": "<unknown>",
"strict": {}
},
"type": "<string>"
},
"OfText": { "type": "<string>" }
},
"seed": {},
"service_tier": "<string>",
"stop": {
"OfString": {},
"OfStringArray": ["<string>"]
},
"store": {},
"stream": False,
"stream_options": {
"include_obfuscation": {},
"include_usage": {}
},
"temperature": {},
"tool_choice": {
"OfAllowedTools": {
"allowed_tools": {
"mode": "<string>",
"tools": [{}]
},
"type": "<string>"
},
"OfAuto": {},
"OfCustomToolChoice": {
"custom": { "name": "<string>" },
"type": "<string>"
},
"OfFunctionToolChoice": {
"function": { "name": "<string>" },
"type": "<string>"
}
},
"tools": [
{
"OfCustom": {
"custom": {
"description": {},
"format": {
"OfGrammar": {
"grammar": {
"definition": "<string>",
"syntax": "<string>"
},
"type": "<string>"
},
"OfText": { "type": "<string>" }
},
"name": "<string>"
},
"type": "<string>"
},
"OfFunction": {
"function": {
"description": {},
"name": "<string>",
"parameters": {},
"strict": {}
},
"type": "<string>"
}
}
],
"top_logprobs": {},
"top_p": {},
"user": {},
"web_search_options": {
"search_context_size": "<string>",
"user_location": {
"approximate": {
"city": {},
"country": {},
"region": {},
"timezone": {}
},
"type": "<string>"
}
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audio: {format: '<string>', voice: '<string>'},
frequency_penalty: {},
logit_bias: {},
logprobs: {},
max_completion_tokens: {},
max_tokens: {},
messages: [{content: 'Explain nordlys routing.', role: 'user'}],
metadata: {},
modalities: ['<string>'],
model: 'claude-opus-4-5',
models: ['<string>'],
n: {},
parallel_tool_calls: {},
prediction: {
content: {OfArrayOfContentParts: [{text: '<string>', type: '<string>'}], OfString: {}},
type: '<string>'
},
presence_penalty: {},
provider_configs: {},
provider_data_collection: '<string>',
provider_enforce_distillable_text: true,
provider_ignore: ['<string>'],
provider_max_completion_price: 123,
provider_max_image_price: 123,
provider_max_prompt_price: 123,
provider_max_request_price: 123,
provider_only: ['<string>'],
provider_order: ['<string>'],
provider_quantizations: ['<string>'],
provider_require_parameters: true,
provider_sort: '<string>',
provider_zdr: true,
reasoning_effort: '<string>',
response_format: {
OfJSONObject: {type: '<string>'},
OfJSONSchema: {
json_schema: {description: {}, name: '<string>', schema: '<unknown>', strict: {}},
type: '<string>'
},
OfText: {type: '<string>'}
},
seed: {},
service_tier: '<string>',
stop: {OfString: {}, OfStringArray: ['<string>']},
store: {},
stream: false,
stream_options: {include_obfuscation: {}, include_usage: {}},
temperature: {},
tool_choice: {
OfAllowedTools: {allowed_tools: {mode: '<string>', tools: [{}]}, type: '<string>'},
OfAuto: {},
OfCustomToolChoice: {custom: {name: '<string>'}, type: '<string>'},
OfFunctionToolChoice: {function: {name: '<string>'}, type: '<string>'}
},
tools: [
{
OfCustom: {
custom: {
description: {},
format: {
OfGrammar: {grammar: {definition: '<string>', syntax: '<string>'}, type: '<string>'},
OfText: {type: '<string>'}
},
name: '<string>'
},
type: '<string>'
},
OfFunction: {
function: {description: {}, name: '<string>', parameters: {}, strict: {}},
type: '<string>'
}
}
],
top_logprobs: {},
top_p: {},
user: {},
web_search_options: {
search_context_size: '<string>',
user_location: {
approximate: {city: {}, country: {}, region: {}, timezone: {}},
type: '<string>'
}
}
})
};
fetch('https://api.example.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"choices": [
{
"finish_reason": "<string>",
"index": 123,
"logprobs": {
"content": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>"
}
]
}
],
"refusal": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"bytes": [
123
],
"logprob": 123,
"token": "<string>"
}
]
}
]
},
"message": {
"annotations": [
{
"type": "<string>",
"url_citation": {
"end_index": 123,
"start_index": 123,
"title": "<string>",
"url": "<string>"
}
}
],
"audio": {
"data": "<string>",
"expires_at": 123,
"id": "<string>",
"transcript": "<string>"
},
"content": "<string>",
"function_call": {
"arguments": "<string>",
"name": "<string>"
},
"refusal": "<string>",
"role": "<string>",
"tool_calls": [
{
"custom": {
"input": "<string>",
"name": "<string>"
},
"function": {
"arguments": "<string>",
"name": "<string>"
},
"id": "<string>",
"type": "<string>"
}
]
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "<string>",
"service_tier": "<string>",
"system_fingerprint": "<string>",
"usage": {
"completion_tokens": 123,
"completion_tokens_details": {
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123,
"rejected_prediction_tokens": 123
},
"prompt_tokens": 123,
"prompt_tokens_details": {
"audio_tokens": 123,
"cached_tokens": 123
},
"total_tokens": 123
}
}Authorizations
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
[
{
"content": "Explain nordlys routing.",
"role": "user"
}
]
Show child attributes
Show child attributes
Example:
"claude-opus-4-5"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
false
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

