Docs

API reference · AI gateway

Replace an alias's strategy and targets, with the checks of a new one

PUT/v1/orgs/{org}/ai/aliases/{alias}
Permission
ai.aliases.manage
Audit log
ai.alias.update
Operation
ai.aliases.replace

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
aliaspathstringyesfor example "als_01h455vb4pex5vsknk084sn02q"
Idempotency-KeyheaderstringnoOne key per intended mutation. A retry with the key replays the recorded response instead of executing again; the key with another request answers 422 idempotency_key_reused. For example "01h455vb4pex5vsknk084sn02q"
x-obhut-management-assignmentheaderstringnoSelect one staff assignment. Direct membership remains the default. Bound API tokens use their stored source and ignore this selector. For example "masg_01h455vb4pex5vsknk084sn02q"

Request body

FieldTypeRequiredNotes
strategystringyesone of "priority", "weighted", "cheapest"
targetsarray of objectyes1 to 16 items
targets[].modelstringyesfor example "cm_01h455vb4pex5vsknk084sn02q"
targets[].credentialstringnofor example "pcr_01h455vb4pex5vsknk084sn02q"
targets[].weightintegerno1 to 10000

Response 200

FieldTypeRequiredNotes
idstringyesfor example "als_01h455vb4pex5vsknk084sn02q"
orgIdstring or nullyes
namestringyes
strategystringyesone of "priority", "weighted", "cheapest"
targetsarray of objectyes
targets[].modelstringyesfor example "cm_01h455vb4pex5vsknk084sn02q"
targets[].providerstringyes
targets[].providerModelstringyes
targets[].locationstringyes
targets[].credentialstringyesfor example "pcr_01h455vb4pex5vsknk084sn02q"
targets[].ownCredentialbooleanyes
targets[].weightinteger or nullyes
shadowedbooleanyes
createdAtstring (date-time)yesUTC, ISO 8601.
updatedAtstring (date-time)yesUTC, ISO 8601.