Replace an environment
Replaces all of the environment’s settings in one atomic write and creates its next revision. Use it from a client that holds the full desired state, such as a CI job. It has the rules, status codes, and response of the update, with these differences:
imageandinstancesare required. Nothing defaults from the environment or the model.- An omitted
resources.acceleratorsis[], so it moves a GPU environment to CPU. resourcesis a full object: an omittedcpuormemoryvalue is unset.variablesis a full map: an omitted name is removed, and anullvalue is400.
As on the update, an omitted weights keeps the current pin, and only null clears it.
Authorizations
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Headers
The ETag of your last read, a revision number in quotes. If the environment's newest revision differs, the write is 412 etag_mismatch and nothing is written. A weak tag, a list, or * is 400.
"\"3\""
Path Parameters
The project's ID, a UUID. It is not the model's ID.
The environment's ID (a UUID) or its name, such as production. A name matches only a live environment; a deleted environment is reachable by its ID only.
Body
The full desired settings. Read-only fields are accepted only with their current values.
The image to run. Send tag, ref, both (they must name the same image), or digest
alone. A tag is a model image tag, or a release of the model; a tag wins over a release
of the same name. A 12 to 64 character lowercase hex tag that no tag has names the image
whose digest it starts. A digest is sha256:<64 hex> or a 12+ character hex prefix. A
ref, a digest, or such a hex tag runs the image with no release.
As on the update. Omitted keeps the current pin; null clears it.
A full object. An omitted accelerators is [] (CPU); an omitted cpu or memory value is unset.
The full map. An omitted name is removed.
ROLLING, REPLACE_ALL Response
The environment after the write.
The environment's ID. It is neither the project's nor the model's ID.
The current image. For production, the deployed release's image. Null for another environment before its first revision.
The pinned weights. Null when none are pinned.
What each instance gets.
Extra arguments passed to the model container.
Read-only.
The current revision. Null before the first revision.
When true, any authenticated caller can open sessions on production. It grants no read. Read-only for customers.
When the environment was deleted. A deleted environment takes no writes.
Variables keyed by name. Names use letters, digits, _, -, and ., with no leading
digit. Reserved names such as MODEL_NAME and any REACTOR_ name are refused.