curl --request PUT \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "@cf/cloudflare/clef"
}
'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/model"
payload = { "model": "@cf/cloudflare/clef" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '@cf/cloudflare/clef'})
};
fetch('https://api.moonbounce.ai/v1/decisions/{decision_id}/model', 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.moonbounce.ai/v1/decisions/{decision_id}/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'model' => '@cf/cloudflare/clef'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.moonbounce.ai/v1/decisions/{decision_id}/model"
payload := strings.NewReader("{\n \"model\": \"@cf/cloudflare/clef\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.moonbounce.ai/v1/decisions/{decision_id}/model")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"@cf/cloudflare/clef\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"@cf/cloudflare/clef\"\n}"
response = http.request(request)
puts response.read_body{
"decision_id": "refund-exception",
"environment": "test",
"model": "@cf/cloudflare/clef",
"pinned": false,
"revision": 2,
"source": "setting",
"created_at": "2026-11-06T16:00:00.000Z",
"changed": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}Choose the model a decision runs on
Sets the model a decision runs on in the calling key’s environment, for every question, as a new revision of the setting. Evaluations run on it from the next call, and a switch also moves imported examples, previews and suggestions. The weights and cut points in a structure were set against one model’s answers and are not checked against another’s, so switch with a test key first and backtest there: each environment has its own setting. Always 200: changed is false, and no revision is written, when the body matches the current revision. A model this deployment does not offer is 400 CAPABILITY_UNSUPPORTED. 404 DECISION_UNKNOWN when the decision doesn’t exist. An Idempotency-Key covers the body as sent, so retry with the same body; it replays even if the model’s configuration changed.
curl --request PUT \
--url https://api.moonbounce.ai/v1/decisions/{decision_id}/model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "@cf/cloudflare/clef"
}
'import requests
url = "https://api.moonbounce.ai/v1/decisions/{decision_id}/model"
payload = { "model": "@cf/cloudflare/clef" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '@cf/cloudflare/clef'})
};
fetch('https://api.moonbounce.ai/v1/decisions/{decision_id}/model', 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.moonbounce.ai/v1/decisions/{decision_id}/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'model' => '@cf/cloudflare/clef'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.moonbounce.ai/v1/decisions/{decision_id}/model"
payload := strings.NewReader("{\n \"model\": \"@cf/cloudflare/clef\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.moonbounce.ai/v1/decisions/{decision_id}/model")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"@cf/cloudflare/clef\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonbounce.ai/v1/decisions/{decision_id}/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"@cf/cloudflare/clef\"\n}"
response = http.request(request)
puts response.read_body{
"decision_id": "refund-exception",
"environment": "test",
"model": "@cf/cloudflare/clef",
"pinned": false,
"revision": 2,
"source": "setting",
"created_at": "2026-11-06T16:00:00.000Z",
"changed": true
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"reason": "<string>",
"param": "<string>",
"details": {
"issues": [
{
"param": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}
}Authorizations
An API key, sent as Authorization: Bearer <key>. Each operation lists the scope its key needs: decisions:evaluate (evaluate and read evaluations), decisions:feedback (your app's feedback) or decisions:develop (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.
Headers
Makes a retry safe. For 24 hours, the same key with the same request returns the first stored result (with Idempotent-Replayed: true); the same key with a different request is a 422 IDEMPOTENCY_KEY_REUSED. Keys are scoped to the organization and environment across every operation, so use a fresh key per request. A request that failed before its result was stored runs again when retried with its key.
1 - 255^[\x20-\x7e]+$Path Parameters
A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.
^[a-z][a-z0-9_.-]{0,127}$Body
A model id from GET /v1/models, such as jev-1.14.0. *-latest and *-preview aliases are refused; whether an id fixes the model's behavior is its pinned flag. Open: new models are added without a contract change.
1 - 128"jev-1.14.0"
Response
The setting, changed or not
A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.
^[a-z][a-z0-9_.-]{0,127}$The environment of the key that made the call: production or test. Evaluations, feedback, reviews and suggestions are separate per environment; decisions and their versions belong to the whole organization.
production, test A model id from GET /v1/models, such as jev-1.14.0. *-latest and *-preview aliases are refused; whether an id fixes the model's behavior is its pinned flag. Open: new models are added without a contract change.
1 - 128"jev-1.14.0"
Whether the model is pinned (see GET /v1/models). False when this deployment doesn't offer it.
Which edit of the setting this is: 1 for the first stored here, then 2, 3... Evaluations report the one they ran on as model.revision. Null when nothing is stored in this environment and the deployment default applies.
x >= 1setting: a stored revision. default: none is stored here, so the deployment default applies.
setting, default When the revision was stored.
False when the body matched the current revision, so nothing was written.