Devices

Relay one Anthropic Messages request (device only, device.task sessions)

Salt Device 0.3: the local agent inside Salt Device calls this with the DEVICE's own api-key, so no model key sits on a laptop. Allowed only while the session belongs to this device, is active or paused, and its snapshot carries device.task (anything else is 403 {error: "forbidden"}). Salt forwards the request to Anthropic with its own key and returns Anthropic's JSON (id, content, stop_reason, usage, model) unchanged. Nothing about the body or the reply is stored, logged or cached; each successful call is metered per person (see getDeviceModelUsage). The body may be up to 8 MB (screenshots). Errors: 402 {error: "budget", message} when the person's monthly allowance is used up, or when the global monthly ceiling is (message "Computer tasks are paused for now. Try again later."); 413 too_large; 422 for a model outside the allowlist or a malformed request; 429 over 60 calls a minute per device (Retry-After 60) or {error: "busy", retry_after} when the gateway is at its concurrency cap (Retry-After 2; retry, do not hold); 502 {error: "upstream", upstream_status?, retry_after?} when Anthropic failed or timed out (Salt gives up after 55 s, inside CloudFront's 60 s origin timeout); 503 {error: "unavailable"} when Salt has no model key configured.

post/api/v1/device_sessions/{id}/model

Request

  • Base URL: https://saltapp.ai
  • URL: https://saltapp.ai/api/v1/device_sessions/{id}/model
  • Auth: API key in header api-key

Path parameters

idstring required

Request body

model'claude-sonnet-5-5' | 'claude-haiku-5-5'
messagesobject[] required

Anthropic message objects; image blocks (base64 screenshots) ride inside.

toolsobject[]
tool_choiceobject
max_tokensinteger

Capped at 4096; a larger number is lowered, not refused.

Response

Anthropic's JSON, as is.

object required

Changes

No recorded changes to this operation across all 3 revisions of this API.