Public API
This page documents the 22 gateway endpoints tagged public in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /public/model_hub | List the model groups published on the AI hub |
| GET | /public/skill_hub | List the skills published on the AI hub |
| GET | /public/model_hub/info | Get the AI hub title, description and useful links |
| GET | /public/providers | List the provider names the gateway supports |
| GET | /public/providers/fields | Describe the credential fields each provider needs |
| GET | /public/complexity_router/scorer_defaults | Get the default thresholds of the complexity scorer |
| GET | /public/complexity_router/fuse_presets | List the built-in fuse presets of the complexity router |
| GET | /public/spanway_model_cost_map | Get the model price and capability map |
| GET | /public/spanway_blog_posts | Get the latest Spanway blog posts |
| GET | /public/autorouter_presets | List the auto router presets |
| GET | /public/whats_new | Get the what's new feed shown in the Admin UI |
| GET | /public/endpoints | List the LLM endpoints and the providers that support each |
| GET | /public/agents/fields | Describe the fields each agent type needs |
| GET | /public/catalogue | Get the public model catalogue with live price, latency and health |
| GET | /public/status | Public status page data |
| POST | /public/compromised_key | Report a leaked virtual key |
| POST | /public/assistant/chat | Ask the website assistant a question |
| GET | /public/assistant/search | Search the website assistant knowledge base |
| GET | /public/v1/model_hub | Browse the published models |
| GET | /public/v1/model_hub/{facet} | List the filter values of the published models |
| GET | /.well-known/agent-skills/index.json | List the skills agents can install from this gateway |
| GET | /v1/skills/{skill_id}/archive | Download one skill as a zip archive |
Endpoints
GET /public/model_hub
List the model groups published on the AI hub
List the model groups an admin made public with POST /model_group/make_public, so people can see which
models they may use: the providers behind each, token limits, prices per token, capability flags, the
parameters the gateway accepts and the result of the latest health check. An empty list means nothing has been
published. Anyone may call it without a key while the AI hub is open (enable_public_model_hub), otherwise any
valid key is needed. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/model_hub" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Every public model group with limits, prices, capabilities and the latest health check. | application/json array of ModelGroupInfoProxy |
| 400 | No models configured on proxy | application/json ProxyError |
| 401 | Authentication Error, No api key passed in. | application/json ProxyError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
GET /public/skill_hub
List the skills published on the AI hub
List the skills on the AI hub, with the manifest fields the hub shows (description, version, category, source and namespace). Every enabled skill in the skill marketplace is listed, so enabling a skill publishes it and disabling it takes it off the hub. Anyone may call it without a key while the AI hub is open, otherwise any valid key is needed. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/skill_hub" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The enabled skills with their manifest metadata. | application/json ListPluginsResponse |
| 401 | Authentication Error, No api key passed in. | application/json ProxyError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
plugins | array of PluginListItem | Yes | Plugins |
count | integer | Yes | Count |
GET /public/model_hub/info
Get the AI hub title, description and useful links
Return the text the AI hub shows above the catalogue: the title, the custom description an admin set and the
useful links saved with POST /model_hub/update_useful_links. The gateway version is deliberately left out.
Anyone may call it without a key while the AI hub is open, otherwise any valid key is needed. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/model_hub/info" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The hub header, without the gateway version. | application/json PublicModelHubInfo |
| 401 | Authentication Error, No api key passed in. | application/json ProxyError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
docs_title | string | Yes | Docs Title |
custom_docs_description | string or null | Yes | Custom Docs Description |
useful_links | object or null | Yes | Useful Links |
GET /public/providers
List the provider names the gateway supports
List every provider name the gateway accepts as the prefix of spanway_params.model, such as anthropic in
anthropic/claude-sonnet-5-5, for building provider pickers. Anyone may call it without a key. Nothing is
changed.
Example request:
curl -X GET "http://localhost:4000/public/providers"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Provider slugs. | application/json array of string |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
GET /public/providers/fields
Describe the credential fields each provider needs
Return the form definition behind the Admin UI's provider credential fields: which keys each provider needs, their labels, whether they are required and how they are entered. Anyone may call it without a key, and it holds no credential values. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/providers/fields"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One entry per provider with the fields the Add Model and Add Credential forms render. | application/json array of ProviderCreateInfo |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
GET /public/complexity_router/scorer_defaults
Get the default thresholds of the complexity scorer
Return the tier boundaries, token thresholds and dimension weights the complexity router's rule-based scorer ships with. The Add Auto Router form prefills its advanced scoring controls from this, so the numbers always match what the router uses. No key is needed.
Example request:
curl -X GET "http://localhost:4000/public/complexity_router/scorer_defaults"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The shipped scorer defaults. | application/json ComplexityScorerDefaults |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
tier_boundaries | object | Yes | Tier Boundaries |
token_thresholds | object | Yes | Token Thresholds |
dimension_weights | object | Yes | Dimension Weights |
GET /public/complexity_router/fuse_presets
List the built-in fuse presets of the complexity router
Return the calibrated Fuse v2 presets the Add Auto Router form offers for a capability router, with the model pairs and the harnesses they were calibrated on. No key is needed.
Example request:
curl -X GET "http://localhost:4000/public/complexity_router/fuse_presets"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The preset catalog, with one entry per calibrated model pair and harness. | application/json FusePresetCatalog |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Yes | The calibration release the presets come from |
models | array of FuseModelPreset | Yes | One preset per calibrated model |
harnesses | array of FuseHarnessPreset | Yes | One preset per calibrated agent runtime |
GET /public/spanway_model_cost_map
Get the model price and capability map
Return the price and capability map the gateway prices requests with: per-token prices, token limits, mode and
capability flags for every model it knows. catalog_only=true returns the bundled catalogue without the entries
registered at runtime for this gateway's own deployments and custom prices. Anyone may call it without a key.
Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
catalog_only | query | boolean | No |
Example request:
curl -X GET "http://localhost:4000/public/spanway_model_cost_map"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One entry per known model, keyed by model name. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error (model cost map unavailable) | application/json ErrorDetail |
GET /public/spanway_blog_posts
Get the latest Spanway blog posts
Return the latest posts of the Spanway blog for the Admin UI Home page. The feed at SPANWAY_BLOG_POSTS_URL is
read at most once an hour, and the list bundled with this release is served when the feed cannot be read, when
SPANWAY_LOCAL_BLOG_POSTS=True or when the gateway is air gapped. Anyone may call it without a key. Nothing is
changed.
Example request:
curl -X GET "http://localhost:4000/public/spanway_blog_posts"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The newest posts, or the list bundled with this release when the feed cannot be read. | application/json BlogPostsResponse |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
posts | array of BlogPost | Yes | Posts |
GET /public/autorouter_presets
List the auto router presets
Return the template catalog the Add Auto Router form offers under Use a template, keyed by template id, each with a label, a description and the complexity router configuration it fills in. The catalog is fetched once per process from the default presets URL (override with SPANWAY_AUTOROUTER_PRESETS_URL) and the copy bundled with the gateway is served when the fetch fails, when SPANWAY_LOCAL_AUTOROUTER_PRESETS=True or when the gateway is airgapped. A restart picks up a new catalog. No key is needed.
Example request:
curl -X GET "http://localhost:4000/public/autorouter_presets"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The template catalog keyed by template id. | application/json object |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
GET /public/whats_new
Get the what's new feed shown in the Admin UI
Return the launches the Admin UI Home page shows under What's new.
Serves the list bundled with this release. Set SPANWAY_WHATS_NEW_URL to fetch a remote list instead, read
once per process on the first request and falling back to the bundled list on any failure, so an air gapped
gateway serves the bundled list without retrying. SPANWAY_LOCAL_WHATS_NEW=True or SPANWAY_AIRGAPPED=True
forces the bundled list even when a URL is set. A restart picks up a newly published list. Anyone may call it
without a key. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/whats_new"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The launch cards for the Home page. | application/json WhatsNewResponse |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
launches | array of WhatsNewLaunch | Yes | Launches |
GET /public/endpoints
List the LLM endpoints and the providers that support each
List the gateway's model endpoints, such as chat completions, embeddings or image generation, and which providers support each one, so you can tell before you configure a model whether the endpoint you need works with it. The list ships with the gateway and is read once per process. Anyone may call it without a key. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/endpoints"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One entry per endpoint with the providers whose integration supports it. | application/json SupportedEndpointsResponse |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
endpoints | array of SupportedEndpoint | Yes | Endpoints |
GET /public/agents/fields
Describe the fields each agent type needs
Return what the Admin UI's Add agent form asks for, per agent type: its display name, description and the credential fields it needs. An agent type that takes its credentials from a model provider also lists that provider's credential fields. Anyone may call it without a key, and it holds no credential values. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/public/agents/fields"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One entry per agent type with the fields the Add Agent form renders. | application/json array of AgentCreateInfo |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | Internal Server Error | application/json ErrorDetail |
GET /public/catalogue
Get the public model catalogue with live price, latency and health
The model groups this gateway publishes, with price per million tokens and token limits from the model cost
map, p50 and p95 latency, error rate and request count aggregated from the spend logs over a rolling window,
and the latest health check. No authentication, and nothing in the response is tied to a key, team, user or
request. Off unless general_settings.public_catalogue: true. While it is off, the route answers 404.
Example request:
curl -X GET "http://localhost:4000/public/catalogue"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The published model groups. Served with Cache-Control and an open CORS origin. | application/json PublicCatalogue |
| 400 | No models configured on proxy | application/json ErrorDetail |
| 404 | Public catalogue is not enabled | application/json ErrorDetail |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
generated_at | string | Yes | Generated At |
window_hours | integer | Yes | Window Hours |
models | array of CatalogueModel | Yes | Models |
GET /public/status
Public status page data
The data behind a public status page that customers can check without a key: uptime over 24h, 7d and 30d, and
daily latency, time to first token and throughput for the model groups in public_model_groups and their
providers, plus the incidents an admin marked public. Anyone may call it and it changes nothing. It is off, and
answers 404, unless general_settings.public_status: true, and the answer is cached for
public_status_cache_seconds.
Example curl:
curl http://0.0.0.0:4000/public/status
Example request:
curl -X GET "http://localhost:4000/public/status"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Uptime, daily series and public incidents | application/json StatusReport |
| 404 | The public status page is turned off | application/json ErrorDetail |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
status | enum: "operational", "degraded", "outage", "unknown" | Yes | Status |
generated_at | string | Yes | Generated At |
model_groups | array of EntityStatus | Yes | Model Groups |
providers | array of EntityStatus | Yes | Providers |
incidents | array of PublicIncident | Yes | Incidents |
POST /public/compromised_key
Report a leaked virtual key
Tell the gateway that a virtual key has leaked, for example because a secret scanner found it in a
repository. No authentication is needed, because the report carries the key itself. When the key matches an
active virtual key, that key is blocked at once. After the answer is sent, a WARNING log line names the key,
the operators are alerted, the key's owner is emailed and, when audit logging is on (store_audit_logs or an
Enterprise license), an audit row records the block with the reporter's address. The answer body is the same
whether or not a key matched, so the route cannot be used to check which keys exist. Each client address may
send compromised_key_reports_per_minute reports a minute (10 by default). On by default, turn it off with
general_settings.compromised_key_reports: false.
Example curl:
curl -X POST http://0.0.0.0:4000/public/compromised_key \
-H "Content-Type: application/json" \
-d '{"key": "sk-9f3a2c7e41b8d6059012ijkl3456mnop", "source": "secret scanner, finding 8841"}'
Request body (application/json, schema CompromisedKeyReport):
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | The leaked virtual key exactly as found, starting with sk-. Hashed keys are not accepted. |
source | string or null | No | Who or what found the key, such as a scanner name or a ticket id. Kept in the audit row. |
Example request:
curl -X POST "http://localhost:4000/public/compromised_key" \
-H "Content-Type: application/json" \
-d '{
"key": "sk-9f3a2c7e41b8d6059012ijkl3456mnop",
"source": "secret scanner, finding 8841"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 202 | The report was taken. A matching active key is now blocked. | application/json CompromisedKeyReceipt |
| 404 | Leaked key reporting is turned off on this gateway. | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | This client sent more reports in the last minute than allowed. | application/json ErrorDetail |
| 503 | The gateway has no database, so keys cannot be looked up. | application/json ErrorDetail |
POST /public/assistant/chat
Ask the website assistant a question
Answers one visitor question from the published Spanway documentation and website, with numbered citations.
No authentication. The Origin header must be one of general_settings.public_assistant_origins. The reply
streams as server-sent events (delta, then answer, then done) unless Accept is application/json, in
which case it is one JSON body. Pass the state token from the previous reply to continue a chat. Off unless
general_settings.public_assistant: true.
Example curl:
curl -X POST http://0.0.0.0:4000/public/assistant/chat \
-H 'Origin: https://www.spanway.ai' -H 'Content-Type: application/json' -H 'Accept: application/json' \
-d '{"message": "Can I self-host Spanway for free?"}'
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Origin | header | string | Yes | The website the visitor is on, which must be in public_assistant_origins. |
Request body (application/json, object):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The visitor's question, 1 to 2000 characters. |
state | string or null | No | The state token from the previous reply, to continue a chat. |
page | string or null | No | The path of the page the visitor is on, for example /pricing/. |
Example request:
curl -X POST "http://localhost:4000/public/assistant/chat" \
-H "Content-Type: application/json" \
-d '{
"message": "Can I self-host Spanway for free?",
"page": "/pricing/"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The answer, as server-sent events by default or one JSON body when Accept is application/json. | application/json AssistantAnswer |
| 400 | The request body or query is not valid (kind invalid_request). | application/json AssistantErrorBody |
| 403 | The Origin header is not an allowed website (kind forbidden_origin). | application/json AssistantErrorBody |
| 404 | The website assistant is turned off on this gateway. | application/json ErrorDetail |
| 409 | The chat reached its turn limit (kind ended). | application/json AssistantErrorBody |
| 429 | Too many messages from this address (kind rate_limited). | application/json AssistantErrorBody |
| 503 | No knowledge index is loaded (not_ready) or the assistant cannot serve now (unavailable). | application/json AssistantErrorBody |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The answer, with [n] markers that point at the citations. |
citations | array of Citation | Yes | The published pages the answer is based on. |
clarifying_question | string or null | Yes | A question back to the visitor when theirs was unclear. |
handoff | Handoff or null | Yes | Set when the visitor should email sales or support instead. |
state | string | Yes | Send this back as state with the next message to continue the chat. |
turn_id | string | Yes | An id for this turn, to quote when reporting a wrong answer. |
turn_index | integer | Yes | Which turn of the chat this is. |
turns_left | integer | Yes | How many more questions this chat may ask. |
knowledge_updated | string | Yes | When the knowledge index the answer used was built. |
usage | AssistantUsage | Yes | The tokens this turn used. |
GET /public/assistant/search
Search the website assistant knowledge base
Returns the three published pages that best match a question, without calling any model. The website uses it
when the assistant is paused. No authentication. Off unless general_settings.public_assistant: true.
Example curl:
curl 'http://0.0.0.0:4000/public/assistant/search?q=how+do+budgets+work'
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | No | The question to search for, 1 to 300 characters. Empty or longer answers 400. |
Example request:
curl -X GET "http://localhost:4000/public/assistant/search"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Up to three matching passages, one per page, and when the index was built. | application/json AssistantSearchResponse |
| 400 | The request body or query is not valid (kind invalid_request). | application/json AssistantErrorBody |
| 403 | A browser called from a website not in public_assistant_origins (kind forbidden_origin). A call with no Origin header is allowed. | application/json AssistantErrorBody |
| 404 | The website assistant is turned off on this gateway. | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | Too many searches from this address (kind rate_limited). | application/json AssistantErrorBody |
| 503 | No knowledge index is loaded (not_ready) or the assistant cannot serve now (unavailable). | application/json AssistantErrorBody |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
passages | array of RetrievedPassage | Yes | The best matching pages, at most three. |
knowledge_updated | string | Yes | When the knowledge index was built. |
GET /public/v1/model_hub
Browse the published models
Lists the model groups an admin chose to publish, with their providers, limits, prices, capabilities and latest health check, for the public Model Hub page. It reads only and changes nothing. Anyone may call it without a key when the AI Hub is public, otherwise any valid key may.
Page with page and page_size (at most 100), sort with sort (a leading - sorts descending, for example
sort=-input_cost_per_token), search the model name with search, and filter with filter[mode][in]=chat,
filter[providers][contains]=openai or filter[features][in]=vision. A rejected request answers with the
parameters, sort fields and filter operators it would have accepted.
Example request:
curl -X GET "http://localhost:4000/public/v1/model_hub" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of the published model groups | application/json ListResponse_ModelGroupInfoProxy_ |
| 400 | A query parameter, sort field or filter is not accepted, or no models are configured | application/problem+json object |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | The gateway could not read its model list | application/problem+json object |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
data | array of ModelGroupInfoProxy | Yes | Data |
meta | ListMeta | Yes | Page-mode counterpart to PageMeta: an entity list pays for the COUNT(*) so the table can show a page count. |
links | ListLinks | Yes | Page-mode counterpart to PageLinks. first/last are knowable here because the total count is. |
GET /public/v1/model_hub/{facet}
List the filter values of the published models
Lists the distinct providers, modes or features across the published model groups, which the Model Hub uses to fill its filter dropdowns. It reads only and changes nothing. Anyone may call it without a key when the AI Hub is public, otherwise any valid key may.
It takes the same filters and search as the list route, so a dropdown offers exactly the values the table can
show. For example /public/v1/model_hub/providers?filter[mode][in]=chat lists only the providers that serve a
chat model.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
facet | path | enum: "providers", "modes", "features" | Yes |
Example request:
curl -X GET "http://localhost:4000/public/v1/model_hub/facet-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The distinct values, one page of them | application/json FacetListResponse |
| 400 | A query parameter, sort field or filter is not accepted, or no models are configured | application/problem+json object |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | The gateway could not read its model list | application/problem+json object |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
data | array of string | Yes | Data |
meta | PageMeta | Yes | has_more rather than total_count, which would need a COUNT(*) over the whole match set per keystroke. |
links | PageLinks | Yes | Hypermedia for a paginated list. No first/last: without a total count the last page is unknown. |
GET /.well-known/agent-skills/index.json
List the skills agents can install from this gateway
Publishes every skill stored on the gateway as an Agent Skills v0.2.0 discovery index, so a coding agent can
install them with npx skills add <gateway url>. Discovery clients send no key, so this route is public, and it
answers 404 until an admin sets spanway_settings.public_skills_index: true. Turning it on lets anyone who can
reach the gateway read every stored skill. Uploads that are not a zip with SKILL.md in one top-level folder are
left out. Read only, nothing changes.
Example request:
curl -X GET "http://localhost:4000/.well-known/agent-skills/index.json"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Every installable skill stored on the gateway | application/json AgentSkillsIndex |
| 404 | The public skills index is turned off, so the gateway answers as if the route did not exist | application/json ErrorDetail |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
$schema | string | No | The discovery schema this index follows |
skills | array of AgentSkillsIndexEntry | Yes | Every installable skill stored on the gateway |
GET /v1/skills/{skill_id}/archive
Download one skill as a zip archive
Downloads one stored skill as a zip archive, repacked so SKILL.md sits at the archive root, which is the file
each entry of the discovery index links to. Public like the index, and answers 404 while
spanway_settings.public_skills_index is off. Read only, nothing changes.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
skill_id | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/v1/skills/skill_id-123/archive"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The skill as a zip file with SKILL.md at its root | application/zip string |
| 404 | The public skills index is turned off, or no installable skill has this id | application/json any |
| 422 | Validation Error | application/json HTTPValidationError |