The credential must be a secret the tenant holds; its value is never read here. A put under an existing name replaces the option, and every install that names it follows.
const url = 'https://api.canopyhq.dev/inferences/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"compact_at":1,"provider":"simulated","retry":{"attempts":1,"backoff":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.canopyhq.dev/inferences/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "compact_at": 1, "provider": "simulated", "retry": { "attempts": 1, "backoff": "example" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The name the tenant gives the option; installs select it by this.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Compact before the next inference at this absolute prompt-token count; defaults to 100000.
object
Retry.attempts: 1..=10
100ms..=1m
object
Compact before the next inference at this absolute prompt-token count; defaults to 100000.
A secret’s identifier within its owning tenant, never its value.
object
Retry.attempts: 1..=10
100ms..=1m
Responses
Section titled “Responses”The outcome is replaced or unchanged; every install that names it follows.
The result of writing a named resource, without returning its value.
object
The result of applying a resource write at the door.
Example
{ "outcome": "created"}The option now exists under this tenant.
The result of writing a named resource, without returning its value.
object
The result of applying a resource write at the door.
Example
{ "outcome": "created"}An invalid body returns an error naming the field and reason; the option may also name a secret the tenant does not hold.
No console token, or one that did not verify.
Only an owner of the tenant may configure it.