API reference
Endpoints, authentication, routing and session behaviour of the AgentSlot gateway.
Base URL
https://api.agentslot.devAll requests use HTTPS. Request and response bodies follow the protocol of the endpoint you call; AgentSlot does not add fields to them.
Authentication
Send your access point token in either header:
Authorization: Bearer asl_your_access_point_token
x-api-key: asl_your_access_point_tokenTokens start with asl_. Revoking an access point takes effect immediately on every gateway node.
Endpoints
| Method | Path | Protocol |
|---|---|---|
| POST | /v1/messages | Anthropic Messages, streaming and non-streaming |
| POST | /v1/messages/count_tokens | Anthropic token counting |
| POST | /v1/responses | OpenAI Responses, streaming and non-streaming |
| POST | /v1/chat/completions | OpenAI-compatible Chat Completions, streaming and non-streaming |
| GET | /v1/models | Models available to the access point |
Headers that select protocol versions, such as anthropic-version and anthropic-beta, are passed to the provider unchanged.
/v1/models answers in the Anthropic format when the request carries an anthropic-version header and in the OpenAI format otherwise.
Routing
The gateway looks only at the access point of your token and hands the request to your workspace's router, which resolves the model name.
| Model value | Goes to |
|---|---|
claude-sonnet-4-5 | An instance of the access point's default route group that serves the model |
anthropic-main/up/claude-sonnet-4-5 | The instance with the alias anthropic-main |
An instance is named by its alias when the alias has only lowercase letters, digits and hyphens, and by its instance ID otherwise, with the underscore replaced by a hyphen. The access point's model rules apply to both forms. /v1/models lists every name the access point can use.
Route groups use one of two strategies:
- Priority order: requests go to the first available instance in the order you set. When it recovers, new sessions return to it.
- Session-pinned spread: new sessions take the instances in turn; a session stays on its instance. Member weights are not applied yet.
Sessions
The requests of one conversation stay on the same instance, so the provider can reuse its prompt cache. Conversations are identified by request headers: you can set AgentSlot-Session-Id, and the session headers coding agents such as Claude Code and OpenCode send are recognized as well. Requests without a session header are routed independently.
Failover
When the selected instance fails before the provider has sent any output, because of a rate limit, an invalid key, an unreachable outbound address or a temporary provider error, the request moves to the next instance of the route group. Once output has started it does not move.
Streaming
Streaming responses are passed through as they arrive. During long pauses the gateway sends the keep-alive messages the protocol allows, so idle connections are not closed by intermediate networks.
Limits
| Limit | Value |
|---|---|
| Request body | 32 MB |
| Concurrent requests per access point | Set in the dashboard |
| Concurrent requests per instance | Set in the dashboard |
Request IDs
Every response includes an AgentSlot-Request-Id header. Include it when you contact support.