Routing presets
Create, read, replace, disable and delete routing presets from code.
Every routing preset in your workspace, enabled or not. Needs a key with the routing_preset:read scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/namespaces/me/routing-presets"{ "data": [ { "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string" } ]}A named set of request defaults (model, system prompt, parameters) and provider rules. Call it by sending "model": "@<name>". Needs a key with the routing_preset:write scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Request Body
application/json
Routing preset request body.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/namespaces/me/routing-presets" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string"}One routing preset by id. Needs a key with the routing_preset:read scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Path Parameters
Surrogate id of the routing_presets row.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/namespaces/me/routing-presets/string"{ "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string"}Replaces the whole spec; fields you leave out are cleared. Leave out name to keep it. Needs a key with the routing_preset:write scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Path Parameters
Surrogate id of the routing_presets row.
Request Body
application/json
Routing preset replacement.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/namespaces/me/routing-presets/string" \ -H "Content-Type: application/json" \ -d '{}'{ "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string"}Stops applying the preset without deleting it. Safe to repeat. Needs a key with the routing_preset:write scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Path Parameters
Surrogate id of the routing_presets row.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/namespaces/me/routing-presets/string/disable"{ "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string"}Applies the preset again from the next request. Safe to repeat. Needs a key with the routing_preset:write scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Path Parameters
Surrogate id of the routing_presets row.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/namespaces/me/routing-presets/string/enable"{ "disabled_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "name": "string", "params": {}, "routing": { "ignore": [ "string" ], "only": [ "string" ], "sort": "string" }, "system_prompt": "string"}Requests that name it afterwards fail. Needs a key with the routing_preset:write scope.
x-api-key: <key>. Anthropic SDKs send this.
In: header
Path Parameters
Surrogate id of the routing_presets row.
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/namespaces/me/routing-presets/string"{ "deleted": true}How is this guide?