Presets and files
Why change the model and settings in code each time, when you can change them once from the panel?
Say your app runs on one model with one system prompt, and you want to change the model. Without a preset you change the code and redeploy. With one, you change it in the panel and you're done.
What a preset is
A preset keeps a model, fallback models and settings under one name. In a request, instead of a model name, you write:
"model": "@preset/code-review"
The wizard has four steps: Name and ID, Models, Settings and Review. Settings offers:
- System prompt: text the model always reads before the request.
- Temperature: from more exact to more varied.
- Output token cap and reasoning depth.
- Web search: the model can search the web, and each search is billed separately.
You can add up to two fallback models. If the main model doesn't answer, the next is tried, and only the one that answers costs anything.
Make a preset0 of 4 steps
- From the Create menu at the top, choose Preset.
- Name it "Summariser" and pick a cheap model.
- Write the system prompt: "Summarise any text in three plain sentences."
- Call it once with
@preset/and its id.
Files
If you give a model the same file repeatedly, upload it once in Files and send it by id afterwards. PDF, Word, Excel, PowerPoint, images, audio, CSV, JSON, Markdown and text are accepted. The type is read from the content, not the extension.
The same works from code, in the standard POST /v1/files form:
curl https://iranrouter.com/v1/files \ -H "Authorization: Bearer ir-..." \ -F purpose=user_data \ -F file=@report.pdf
Each workspace has its own space, and what's used shows at the top of the Files page.
What you learned
- A preset takes the model and settings out of your code.
- Call it with
@preset/id. - Upload a file once and send it by id.
Keep your place
Sign in to the panel and each lesson and your path are saved, so you continue from the same spot on any device.