Publish a ModelRoutingProfile version
curl --request POST \
--url https://api.checkfu.com/v1/model-routing-profiles/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checkfu-version: <checkfu-version>' \
--data '
{
"expected_resource_version": 123,
"candidates": [
{
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [
null
],
"reasoning": true,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": true,
"supportsDeveloperRole": true,
"supportsReasoningEffort": true,
"supportsUsageInStreaming": true,
"supportsFinishReason": true,
"requiresToolResultName": true,
"requiresAssistantAfterToolResult": true,
"requiresThinkingAsText": true,
"requiresReasoningContentOnAssistantMessages": true,
"zaiToolStream": true,
"supportsStrictMode": true,
"supportsOpenAIGrammarTools": true,
"supportsMidConvoSystemMessages": true,
"supportsMidConvoToolAdditions": true,
"supportsThinkingTokenBudget": true
}
}
}
]
}
'import requests
url = "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions"
payload = {
"expected_resource_version": 123,
"candidates": [
{
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [None],
"reasoning": True,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": True,
"supportsDeveloperRole": True,
"supportsReasoningEffort": True,
"supportsUsageInStreaming": True,
"supportsFinishReason": True,
"requiresToolResultName": True,
"requiresAssistantAfterToolResult": True,
"requiresThinkingAsText": True,
"requiresReasoningContentOnAssistantMessages": True,
"zaiToolStream": True,
"supportsStrictMode": True,
"supportsOpenAIGrammarTools": True,
"supportsMidConvoSystemMessages": True,
"supportsMidConvoToolAdditions": True,
"supportsThinkingTokenBudget": True
}
}
}
]
}
headers = {
"checkfu-version": "<checkfu-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'checkfu-version': '<checkfu-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_resource_version: 123,
candidates: [
{
provider: '<string>',
model: '<string>',
credential_source: {type: 'workspace_credential', model_credential_id: '<string>'},
context_window_tokens: 123,
native_capabilities: {
version: 1,
wire_format: 'openai_chat',
max_output_tokens: 123,
input_modalities: [null],
reasoning: true,
thinking_levels: {
off: '<string>',
minimal: '<string>',
low: '<string>',
medium: '<string>',
high: '<string>',
xhigh: '<string>',
max: '<string>'
},
compatibility: {
supportsStore: true,
supportsDeveloperRole: true,
supportsReasoningEffort: true,
supportsUsageInStreaming: true,
supportsFinishReason: true,
requiresToolResultName: true,
requiresAssistantAfterToolResult: true,
requiresThinkingAsText: true,
requiresReasoningContentOnAssistantMessages: true,
zaiToolStream: true,
supportsStrictMode: true,
supportsOpenAIGrammarTools: true,
supportsMidConvoSystemMessages: true,
supportsMidConvoToolAdditions: true,
supportsThinkingTokenBudget: true
}
}
}
]
})
};
fetch('https://api.checkfu.com/v1/model-routing-profiles/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_resource_version' => 123,
'candidates' => [
[
'provider' => '<string>',
'model' => '<string>',
'credential_source' => [
'type' => 'workspace_credential',
'model_credential_id' => '<string>'
],
'context_window_tokens' => 123,
'native_capabilities' => [
'version' => 1,
'wire_format' => 'openai_chat',
'max_output_tokens' => 123,
'input_modalities' => [
null
],
'reasoning' => true,
'thinking_levels' => [
'off' => '<string>',
'minimal' => '<string>',
'low' => '<string>',
'medium' => '<string>',
'high' => '<string>',
'xhigh' => '<string>',
'max' => '<string>'
],
'compatibility' => [
'supportsStore' => true,
'supportsDeveloperRole' => true,
'supportsReasoningEffort' => true,
'supportsUsageInStreaming' => true,
'supportsFinishReason' => true,
'requiresToolResultName' => true,
'requiresAssistantAfterToolResult' => true,
'requiresThinkingAsText' => true,
'requiresReasoningContentOnAssistantMessages' => true,
'zaiToolStream' => true,
'supportsStrictMode' => true,
'supportsOpenAIGrammarTools' => true,
'supportsMidConvoSystemMessages' => true,
'supportsMidConvoToolAdditions' => true,
'supportsThinkingTokenBudget' => true
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"checkfu-version: <checkfu-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions"
payload := strings.NewReader("{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("checkfu-version", "<checkfu-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.checkfu.com/v1/model-routing-profiles/{id}/versions")
.header("checkfu-version", "<checkfu-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checkfu.com/v1/model-routing-profiles/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["checkfu-version"] = '<checkfu-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model_routing_profile_id": "<string>",
"workspace_id": "<string>",
"version": 123,
"model_access_mode": "platform_routed",
"routing_policy": "cheapest_sufficient",
"candidates": [
{
"tier": "default",
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"openrouter_max_price": {
"prompt": 500,
"completion": 500
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [
"text"
],
"reasoning": true,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": true,
"supportsDeveloperRole": true,
"supportsReasoningEffort": true,
"supportsUsageInStreaming": true,
"supportsFinishReason": true,
"maxTokensField": "max_tokens",
"requiresToolResultName": true,
"requiresAssistantAfterToolResult": true,
"requiresThinkingAsText": true,
"requiresReasoningContentOnAssistantMessages": true,
"thinkingFormat": "openai",
"zaiToolStream": true,
"supportsStrictMode": true,
"supportsOpenAIGrammarTools": true,
"supportsMidConvoSystemMessages": true,
"supportsMidConvoToolAdditions": true,
"supportsThinkingTokenBudget": true,
"thinkingTokenBudgetField": "thinking_token_budget"
}
},
"native_sdk_estimation": {
"version": 1,
"unit": "usd_per_million_tokens",
"source": "profile_declared",
"input": 1,
"output": 1,
"cache_read": 1,
"cache_write": 1
},
"effort": "minimal",
"speed": "standard",
"inference_geo": "global"
}
],
"content_sha256": "<string>",
"published_by": {
"kind": "system"
},
"published_at": "<string>"
}{
"error": {
"type": "validation.malformed",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-malformed"
}
}{
"error": {
"type": "auth.invalid_key",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-invalid-key"
}
}{
"error": {
"type": "auth.disabled_tenancy",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-disabled-tenancy"
}
}{
"error": {
"type": "validation.not_found",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-not-found"
}
}{
"error": {
"type": "validation.conflict",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-conflict"
}
}{
"error": {
"type": "budget.exceeded",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#budget-exceeded"
}
}{
"error": {
"type": "runtime.internal",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#runtime-internal"
}
}Publish a ModelRoutingProfile version
Publishes the next immutable candidate ladder and strict credential-source union under the head’s expected_resource_version.
POST
/
v1
/
model-routing-profiles
/
{id}
/
versions
Publish a ModelRoutingProfile version
curl --request POST \
--url https://api.checkfu.com/v1/model-routing-profiles/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checkfu-version: <checkfu-version>' \
--data '
{
"expected_resource_version": 123,
"candidates": [
{
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [
null
],
"reasoning": true,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": true,
"supportsDeveloperRole": true,
"supportsReasoningEffort": true,
"supportsUsageInStreaming": true,
"supportsFinishReason": true,
"requiresToolResultName": true,
"requiresAssistantAfterToolResult": true,
"requiresThinkingAsText": true,
"requiresReasoningContentOnAssistantMessages": true,
"zaiToolStream": true,
"supportsStrictMode": true,
"supportsOpenAIGrammarTools": true,
"supportsMidConvoSystemMessages": true,
"supportsMidConvoToolAdditions": true,
"supportsThinkingTokenBudget": true
}
}
}
]
}
'import requests
url = "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions"
payload = {
"expected_resource_version": 123,
"candidates": [
{
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [None],
"reasoning": True,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": True,
"supportsDeveloperRole": True,
"supportsReasoningEffort": True,
"supportsUsageInStreaming": True,
"supportsFinishReason": True,
"requiresToolResultName": True,
"requiresAssistantAfterToolResult": True,
"requiresThinkingAsText": True,
"requiresReasoningContentOnAssistantMessages": True,
"zaiToolStream": True,
"supportsStrictMode": True,
"supportsOpenAIGrammarTools": True,
"supportsMidConvoSystemMessages": True,
"supportsMidConvoToolAdditions": True,
"supportsThinkingTokenBudget": True
}
}
}
]
}
headers = {
"checkfu-version": "<checkfu-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'checkfu-version': '<checkfu-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_resource_version: 123,
candidates: [
{
provider: '<string>',
model: '<string>',
credential_source: {type: 'workspace_credential', model_credential_id: '<string>'},
context_window_tokens: 123,
native_capabilities: {
version: 1,
wire_format: 'openai_chat',
max_output_tokens: 123,
input_modalities: [null],
reasoning: true,
thinking_levels: {
off: '<string>',
minimal: '<string>',
low: '<string>',
medium: '<string>',
high: '<string>',
xhigh: '<string>',
max: '<string>'
},
compatibility: {
supportsStore: true,
supportsDeveloperRole: true,
supportsReasoningEffort: true,
supportsUsageInStreaming: true,
supportsFinishReason: true,
requiresToolResultName: true,
requiresAssistantAfterToolResult: true,
requiresThinkingAsText: true,
requiresReasoningContentOnAssistantMessages: true,
zaiToolStream: true,
supportsStrictMode: true,
supportsOpenAIGrammarTools: true,
supportsMidConvoSystemMessages: true,
supportsMidConvoToolAdditions: true,
supportsThinkingTokenBudget: true
}
}
}
]
})
};
fetch('https://api.checkfu.com/v1/model-routing-profiles/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_resource_version' => 123,
'candidates' => [
[
'provider' => '<string>',
'model' => '<string>',
'credential_source' => [
'type' => 'workspace_credential',
'model_credential_id' => '<string>'
],
'context_window_tokens' => 123,
'native_capabilities' => [
'version' => 1,
'wire_format' => 'openai_chat',
'max_output_tokens' => 123,
'input_modalities' => [
null
],
'reasoning' => true,
'thinking_levels' => [
'off' => '<string>',
'minimal' => '<string>',
'low' => '<string>',
'medium' => '<string>',
'high' => '<string>',
'xhigh' => '<string>',
'max' => '<string>'
],
'compatibility' => [
'supportsStore' => true,
'supportsDeveloperRole' => true,
'supportsReasoningEffort' => true,
'supportsUsageInStreaming' => true,
'supportsFinishReason' => true,
'requiresToolResultName' => true,
'requiresAssistantAfterToolResult' => true,
'requiresThinkingAsText' => true,
'requiresReasoningContentOnAssistantMessages' => true,
'zaiToolStream' => true,
'supportsStrictMode' => true,
'supportsOpenAIGrammarTools' => true,
'supportsMidConvoSystemMessages' => true,
'supportsMidConvoToolAdditions' => true,
'supportsThinkingTokenBudget' => true
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"checkfu-version: <checkfu-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.checkfu.com/v1/model-routing-profiles/{id}/versions"
payload := strings.NewReader("{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("checkfu-version", "<checkfu-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.checkfu.com/v1/model-routing-profiles/{id}/versions")
.header("checkfu-version", "<checkfu-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checkfu.com/v1/model-routing-profiles/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["checkfu-version"] = '<checkfu-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_resource_version\": 123,\n \"candidates\": [\n {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"credential_source\": {\n \"type\": \"workspace_credential\",\n \"model_credential_id\": \"<string>\"\n },\n \"context_window_tokens\": 123,\n \"native_capabilities\": {\n \"version\": 1,\n \"wire_format\": \"openai_chat\",\n \"max_output_tokens\": 123,\n \"input_modalities\": [\n null\n ],\n \"reasoning\": true,\n \"thinking_levels\": {\n \"off\": \"<string>\",\n \"minimal\": \"<string>\",\n \"low\": \"<string>\",\n \"medium\": \"<string>\",\n \"high\": \"<string>\",\n \"xhigh\": \"<string>\",\n \"max\": \"<string>\"\n },\n \"compatibility\": {\n \"supportsStore\": true,\n \"supportsDeveloperRole\": true,\n \"supportsReasoningEffort\": true,\n \"supportsUsageInStreaming\": true,\n \"supportsFinishReason\": true,\n \"requiresToolResultName\": true,\n \"requiresAssistantAfterToolResult\": true,\n \"requiresThinkingAsText\": true,\n \"requiresReasoningContentOnAssistantMessages\": true,\n \"zaiToolStream\": true,\n \"supportsStrictMode\": true,\n \"supportsOpenAIGrammarTools\": true,\n \"supportsMidConvoSystemMessages\": true,\n \"supportsMidConvoToolAdditions\": true,\n \"supportsThinkingTokenBudget\": true\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model_routing_profile_id": "<string>",
"workspace_id": "<string>",
"version": 123,
"model_access_mode": "platform_routed",
"routing_policy": "cheapest_sufficient",
"candidates": [
{
"tier": "default",
"provider": "<string>",
"model": "<string>",
"credential_source": {
"type": "workspace_credential",
"model_credential_id": "<string>"
},
"openrouter_max_price": {
"prompt": 500,
"completion": 500
},
"context_window_tokens": 123,
"native_capabilities": {
"version": 1,
"wire_format": "openai_chat",
"max_output_tokens": 123,
"input_modalities": [
"text"
],
"reasoning": true,
"thinking_levels": {
"off": "<string>",
"minimal": "<string>",
"low": "<string>",
"medium": "<string>",
"high": "<string>",
"xhigh": "<string>",
"max": "<string>"
},
"compatibility": {
"supportsStore": true,
"supportsDeveloperRole": true,
"supportsReasoningEffort": true,
"supportsUsageInStreaming": true,
"supportsFinishReason": true,
"maxTokensField": "max_tokens",
"requiresToolResultName": true,
"requiresAssistantAfterToolResult": true,
"requiresThinkingAsText": true,
"requiresReasoningContentOnAssistantMessages": true,
"thinkingFormat": "openai",
"zaiToolStream": true,
"supportsStrictMode": true,
"supportsOpenAIGrammarTools": true,
"supportsMidConvoSystemMessages": true,
"supportsMidConvoToolAdditions": true,
"supportsThinkingTokenBudget": true,
"thinkingTokenBudgetField": "thinking_token_budget"
}
},
"native_sdk_estimation": {
"version": 1,
"unit": "usd_per_million_tokens",
"source": "profile_declared",
"input": 1,
"output": 1,
"cache_read": 1,
"cache_write": 1
},
"effort": "minimal",
"speed": "standard",
"inference_geo": "global"
}
],
"content_sha256": "<string>",
"published_by": {
"kind": "system"
},
"published_at": "<string>"
}{
"error": {
"type": "validation.malformed",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-malformed"
}
}{
"error": {
"type": "auth.invalid_key",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-invalid-key"
}
}{
"error": {
"type": "auth.disabled_tenancy",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-disabled-tenancy"
}
}{
"error": {
"type": "validation.not_found",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-not-found"
}
}{
"error": {
"type": "validation.conflict",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-conflict"
}
}{
"error": {
"type": "budget.exceeded",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#budget-exceeded"
}
}{
"error": {
"type": "runtime.internal",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#runtime-internal"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
2026-08-31 Maximum string length:
255Path Parameters
Pattern:
^mrp_[0-9a-f]{32}$Body
application/json
Response
candidate providers and credential sources must match the version access mode
Pattern:
^mrprev_[0-9a-f]{32}$Pattern:
^mrp_[0-9a-f]{32}$Pattern:
^wrkspc_[0-9a-f]{32}$Available options:
platform_routed, harness_owned Available options:
cheapest_sufficient, pinned, fallback Required array length:
1 - 64 elementsan OpenRouter price ceiling requires the OpenRouter provider
- Option 1
- Option 2
Show child attributes
Show child attributes
Pattern:
^sha256:[0-9a-f]{64}$- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
A canonical UTC ISO-8601 timestamp with millisecond precision.
Maximum string length:
24Pattern:
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$