Stream adapter preparation events (SSE)
const url = 'https://example.com/v1/adapters/example/prepare';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/adapters/example/prepare \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'SSE stream (text/event-stream). Iterates the adapter factory’s prepare(params) async generator and emits each yielded PrepareEvent as an SSE data: frame — used for warmup progress on in-process adapters (model download, cache priming, etc.). Body carries adapter-specific params and is passed through unchanged. Returns 404 when the adapter id is unknown to the in-process factory registry, and 400 bad-input when the adapter has no prepare() implementation (e.g. remote model providers with nothing to download) or the deployment did not wire an adapterFactories binding.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”AdapterId — stable string chosen by the deployment (e.g. sandbox-primary).
Header Parameters
Section titled “Header Parameters”Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).
Request Body
Section titled “Request Body”object
Examplegenerated
{}Responses
Section titled “Responses”SSE stream of PrepareEvent frames — adapter-specific payload shape.
Examplegenerated
exampleAdapter has no prepare() implementation, or adapter factories not wired.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No adapter registered with that id.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}