Skip to Content
AgentSlot

API reference

Endpoints, authentication, routing and session behaviour of the AgentSlot gateway.

Base URL

https://api.agentslot.dev

All 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_token

Tokens start with asl_. Revoking an access point takes effect immediately on every gateway node.

Endpoints

MethodPathProtocol
POST/v1/messagesAnthropic Messages, streaming and non-streaming
POST/v1/messages/count_tokensAnthropic token counting
POST/v1/responsesOpenAI Responses, streaming and non-streaming
POST/v1/chat/completionsOpenAI-compatible Chat Completions, streaming and non-streaming
GET/v1/modelsModels 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 valueGoes to
claude-sonnet-4-5An instance of the access point's default route group that serves the model
anthropic-main/up/claude-sonnet-4-5The 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

LimitValue
Request body32 MB
Concurrent requests per access pointSet in the dashboard
Concurrent requests per instanceSet in the dashboard

Request IDs

Every response includes an AgentSlot-Request-Id header. Include it when you contact support.

On this page