Presets
A preset is a saved, named set of parameter and output settings for a service, created in the platform and reused by ID when you create orders.
A preset is a reusable, named bundle of settings for one service. You create it once in the platform UI — configuring a service's parameters (and output files) exactly how you want them — and then reference it by preset_id every time you create an order. The order inherits the preset's settings, so you don't have to spell out every parameter_value on each request.
Presets are scoped to your organization and tied to a single service_id. A given preset can only be used with the service it was created for.
Two ways to set up an order
When you create an order you choose how the parameters get filled. Both are valid — pick based on how much control you want at call time:
| Explicit parameters | Presets | |
|---|---|---|
| How | Send every value in parameter_values | Save settings once in the UI, send preset_id |
| Best when | You vary options per order and want to set them flexibly from your side | You have a stable, well-defined configuration per service and rarely change it |
| Where config lives | In your code | In the Relu platform, editable without a code change |
| Override per order | n/a | Yes — send parameter_values alongside preset_id to override individual keys |
You can also mix the two: start from a preset and override just the handful of parameters that differ for a given order. See Combining a preset with overrides.
Creating a preset in the platform
- Log in to automate.relu.ai and open the service you want to configure.
- Set the parameters (and, if relevant, the output files) to the values you want.
- Click Save Preset, give it a name, and save.
The preset now belongs to your organization and shows up wherever that service is used. Editing the preset later changes the configuration for every future order that references it — no code change on your side.
Presets capture more than parameters
A preset also stores the service's output file selection and, for services
that support it, the engraving / text selection. Referencing the preset in
an order pulls all of these in, not just parameter_values.
Finding a preset's ID
preset_id is what you pass when creating an order. Discover it via:
GET /presets— lists active presets in your organization. Filter byservice_idto find presets for a given service. Passinclude_deleted=trueto also return soft-deleted presets; thedeletedfield identifies them.GET /presets/{preset_id}— fetch a single preset, including itsparameter_name_to_value, to inspect exactly what it will apply.GET /services/{service_id}— the service response includes anincluded_presetsarray with the presets available for that service.
import requests
presets = requests.get(
"https://api.automate.relu.ai/presets",
headers={"Authorization": "ApiKey <your_api_token>"},
).json()
for p in presets:
if p["service_id"] == "<service-uuid>":
print(p["id"], p["name"])const res = await fetch('https://api.automate.relu.ai/presets', {
headers: { Authorization: `ApiKey ${process.env.RELU_API_TOKEN}` },
});
const presets = await res.json();
presets
.filter((p) => p.service_id === '<service-uuid>')
.forEach((p) => console.log(p.id, p.name));Reading and writing presets through the API requires the matching preset scopes on your token (read:presets, create:presets, …). See Scopes.
Using a preset when creating an order
Pass preset_id in the POST /orders body instead of (or alongside) parameter_values. You still provide input_data and service_id as usual:
response = requests.post(
"https://api.automate.relu.ai/orders",
json={
"service_id": "<service-uuid>",
"preset_id": "<preset-uuid>",
"order_name": "case-001",
"input_data": {
"lower_jaw": {
"external_download_url": "https://.../lower.stl",
"extension": ".stl",
},
},
"callback_url": "https://your-app.com/relu-webhook",
},
headers={"X-API-Key": "<your_api_token>"},
)
order = response.json()
print(order["id"])const res = await fetch('https://api.automate.relu.ai/orders', {
method: 'POST',
headers: {
'X-API-Key': process.env.RELU_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
service_id: '<service-uuid>',
preset_id: '<preset-uuid>',
order_name: 'case-001',
input_data: {
lower_jaw: {
external_download_url: 'https://.../lower.stl',
extension: '.stl',
},
},
callback_url: 'https://your-app.com/relu-webhook',
}),
});
const order = await res.json();
console.log(order.id);Combining a preset with overrides
You don't have to choose all-or-nothing. Send preset_id for the baseline and parameter_values for the few keys that differ on this order. Relu resolves parameters in this priority order:
parameter_valuesyou send on the order (highest priority)- The preset's saved values
- The service's built-in defaults (lowest priority)
So any key present in parameter_values wins; everything else falls back to the preset, and anything the preset doesn't set falls back to the service default.
{
"service_id": "<service-uuid>",
"preset_id": "<preset-uuid>",
"order_name": "case-001",
"input_data": {
"lower_jaw": { "external_download_url": "...", "extension": ".stl" }
},
"parameter_values": {
"guide_thickness": 2.8
}
}In the example above the order uses every setting from the preset, except guide_thickness, which is overridden to 2.8 for this order only. The preset itself is unchanged.
Related
- Parameters — the explicit
parameter_valuesroute and how to discover a service's parameter keys - Orders — the full
POST /ordersbody - Create your first order — end-to-end walkthrough