Skip to main content
A preset keeps a model and the settings you send with it under a short name. Send "model": "@preset/<name>" and NagaAI fills in the rest, so you change the model or the instructions without a code change. It also works in tools that let you set only a model name, such as Claude Code, Codex or Cursor. The example saves a preset with the account API, then calls it through the Responses API. The account API takes a provisioning key, and the request takes an ordinary API key.
The save answers with the preset and the version requests now use. The response to the call carries the model that answered in model, here anthropic/claude-sonnet-5.5, or openai/gpt-6.1-sol when the first model couldn’t answer:

What a preset holds

Only model is required. Every other field is used when the request leaves it out, so one preset serves both a client that sends nothing but the model name and one that sets its own temperature. A preset doesn’t name a provider. NagaAI keeps choosing the provider for each request, as Routing describes.

How a preset meets the request

The same preset works on all three chat endpoints: POST /v1/responses, POST /v1/chat/completions and POST /v1/messages. Each field goes where that endpoint expects it. The model always comes from the preset. For any other field, a value in the request wins and the preset fills only what the request leaves out or sets to null. routing is filled key by key, so a request that sets only max_price still gets strategy from the preset. The fallback list goes into models on Responses and Chat Completions and into fallbacks on Messages. The answer limit goes into max_output_tokens, max_tokens or max_completion_tokens, whichever the endpoint reads, unless the request already sets one. Instructions are the one field both sides keep. Text from the preset comes first, and the request’s own follows after a blank line. On Responses that is instructions, on Messages system, and on Chat Completions a system message placed before the request’s messages. A preset costs nothing. A request through it is billed at the price of the model that answered, as any other request is.

Change and roll back a preset

Each PUT to the same name saves a new version, and requests use the newest one from then on. Sending the settings already in use writes no new version. A typo in a model name is refused at save time with 400, so it never reaches your users. To list what you saved, call GET /v1/account/presets/support-bot/versions, newest first. To go back to an earlier version, send its number:
cURL
A rollback writes no new version, so you can move forward again the same way. GET /v1/account/presets lists every preset of the account with the version in use. DELETE /v1/account/presets/support-bot deletes one, and requests that call it fail from then on. Saving the same name again brings it back, with its earlier versions kept. A name is 1 to 64 lower-case letters, digits, - and _, starting with a letter or digit. Presets belong to the account, so every API key of the account can call them.

Troubleshooting

400 model_not_found with @preset/<name>

The account has no preset by that name. It was never saved, it was deleted, or it belongs to another account. Check the name with GET /v1/account/presets, and check that the API key belongs to the same account as the provisioning key that saved it.

400 naming a body field on save

A model in the preset isn’t a chat model NagaAI serves, or it has been retired. Pick a live id from GET /v1/models. A preset can’t call another preset either. A temperature outside 0 to 2, a top_p outside 0 to 1 or a max_output_tokens below 1 is refused the same way, naming its field, because every request through the preset would fail on it.

400 naming body.version on rollback

The preset never saved that version number. List the saved ones with GET /v1/account/presets/<name>/versions.

404 from the account API

GET, PATCH or DELETE named a preset the account doesn’t have, or a name that can’t be one. Save it with PUT first.