agents. A key bound to an account only sees that account’s conversations.
"stream": true the answer is server-sent events: message.delta events with { "delta": "…" } while the agent writes, then one message.completed carrying the stored reply, or an error event ({ "error": { "type", "code", "message" } }). The reply is stored even if your client disconnects mid-stream.
Failures. If the agent’s turn fails, the reply comes back with status: "failed" and an error sentence (streamed: an error event with code turn_failed); your message and the failure both stay in the conversation.
Where the agent runs. Each project gets its own hosted runtime in Allternit’s cloud, started by the project’s first message. While it starts, sending a message answers 503 runtime_starting; retry after a few seconds. An idle runtime sleeps and wakes on the next message; while it wakes, messages also answer 503 runtime_starting (up to about a minute). A message answered with runtime_starting is not stored, so retrying it does not duplicate it. Agent changes reach the runtime before the next message. All of a project’s agents share the project’s runtime; each account’s data stays separate in the API, and the runtime keeps each conversation in its own session.
Limits. content is 1–16,000 characters. One message at a time per conversation: a second one while the agent is still answering gets 409 conversation_busy.
Billing. Each reply records its model tokens as tokens_in and tokens_out usage, billed at the model provider’s list price plus 15%. An agent on your own model key (model: "anthropic/…" with PUT /v1/model_keys/anthropic) records the tokens at no charge; you pay your provider directly. Once the project reaches its monthly spend cap, sending a message answers 402 spend_cap_reached and the agent doesn’t run (Billing and spend caps).
Errors: model_key_missing, model_key_sync_failed, invalid_content, invalid_metadata, agent_not_found, conversation_not_found, conversation_busy, runtime_starting, runtime_unavailable, agent_sync_failed, session_failed, insufficient_scope, spend_cap_reached, spend_check_unavailable.