Anthropic skills API
This page documents the 4 gateway endpoints tagged anthropic_skills 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 | /v1/skills | List skills |
| POST | /v1/skills | Create a skill on the provider account |
| GET | /v1/skills/{skill_id} | Get a skill |
| DELETE | /v1/skills/{skill_id} | Delete a skill |
Endpoints
GET /v1/skills
List skills
List the skills on the provider account behind a deployment, one page at a time. Any key that may call that deployment can list them, and nothing changes. When several provider accounts are set up, name the deployment with the model query parameter or the x-spanway-model header. With custom_llm_provider=spanway_proxy and a query, the Spanway-hosted skills the key can reach are ranked by how closely they match the query instead. Docs
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer or null | No | |
after_id | query | string or null | No | |
before_id | query | string or null | No | |
custom_llm_provider | query | string or null | No | |
query | query | string or null | No | Describe what you need in natural language to rank the skills you can access by semantic similarity over their title and description. Each result carries a search_score. Only supported for custom_llm_provider=spanway_pro |
top_k | query | integer | No | With query: the maximum number of ranked skills to return. |
model | query | string | No | Deployment whose provider account holds the skill, when several accounts exist. The x-spanway-model header does the same. |
Example request:
curl -X GET "http://localhost:4000/v1/skills" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of skills | application/json ListSkillsResponse |
| 400 | A query was sent for a provider that cannot rank skills, or ranking is not set up | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key may not call the deployment that holds the skill | application/json ProxyError |
| 404 | The provider account has no skill with that id | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | The key or the provider account is over its rate limit | application/json ProxyError |
| 503 | The embedding model that ranks skills did not answer | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
data | array of Skill | Yes | This page of skills |
has_more | boolean | No | Whether more skills follow this page |
next_page | string or null | No | The token for the next page, if there is one |
POST /v1/skills
Create a skill on the provider account
Upload a skill, a folder of instructions and files a Claude model can load when a task needs it, to the provider account behind a deployment. Any key that may call that deployment can create skills, and each creation is written to the audit log. Send the files as multipart form fields. When several provider accounts are set up, name the deployment with the model form field, the model query parameter or the x-spanway-model header. The answer is the new skill with its id, display title and timestamps.
Before the skill is stored, the guardrails set for skill scanning read SKILL.md, every bundled file and the text form fields. A blocked file, or a file the gateway could not check while scanning fails closed, refuses the upload with 400 and the scan result is kept for admins. Docs
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
custom_llm_provider | query | string or null | No | |
model | query | string | No | Deployment whose provider account holds the skill, when several accounts exist. The x-spanway-model header does the same. |
Request body (multipart/form-data, object):
| Field | Type | Required | Description |
|---|---|---|---|
display_title | string | No | Name shown to users and models |
files[] | array of string | Yes | The skill folder, at least a SKILL.md, or one zip archive |
model | string | No | Deployment whose provider account stores the skill |
Example request:
curl -X POST "http://localhost:4000/v1/skills" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-F files[]="value"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The new skill | application/json Skill |
| 400 | The request is invalid, for example a missing or unsupported parameter, a prompt longer than the model's context window, content a guardrail or the provider refused, or no deployment that satisfies the data policy of the key, team or organization (No deployment of model 'gpt-5.5' satisfies the data policy: ...). error.message says which. | application/json ProxyError |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key may not call the deployment that holds the skill | application/json ProxyError |
| 404 | The provider account has no skill with that id | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | The key or the provider account is over its rate limit | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
created_at | string | Yes | When the skill was created, ISO 8601 |
description | string or null | No | What the skill does, filled for Spanway-hosted skills only |
display_title | string or null | No | The name shown to users and models |
id | string | Yes | The skill's id on the provider account |
latest_version | string or null | No | The id of the skill's newest version |
search_score | number or null | No | How closely the skill matches the list query, when one was sent |
source | string | Yes | Who made the skill, custom or anthropic |
type | string | No | Always skill |
updated_at | string | Yes | When the skill last changed, ISO 8601 |
GET /v1/skills/{skill_id}
Get a skill
Read one skill from the provider account behind a deployment. Any key that may call that deployment can read it, and nothing changes. When several provider accounts are set up, name the deployment with the model query parameter or the x-spanway-model header. Docs
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
skill_id | path | string | Yes | |
custom_llm_provider | query | string or null | No | |
model | query | string | No | Deployment whose provider account holds the skill, when several accounts exist. The x-spanway-model header does the same. |
Example request:
curl -X GET "http://localhost:4000/v1/skills/skill_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The skill | application/json Skill |
| 400 | The provider refused the request, for example a skill that still has versions | application/json ProxyError |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key may not call the deployment that holds the skill | application/json ProxyError |
| 404 | The provider account has no skill with that id | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | The key or the provider account is over its rate limit | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
created_at | string | Yes | When the skill was created, ISO 8601 |
description | string or null | No | What the skill does, filled for Spanway-hosted skills only |
display_title | string or null | No | The name shown to users and models |
id | string | Yes | The skill's id on the provider account |
latest_version | string or null | No | The id of the skill's newest version |
search_score | number or null | No | How closely the skill matches the list query, when one was sent |
source | string | Yes | Who made the skill, custom or anthropic |
type | string | No | Always skill |
updated_at | string | Yes | When the skill last changed, ISO 8601 |
DELETE /v1/skills/{skill_id}
Delete a skill
Delete a skill from the provider account behind a deployment. Any key that may call that deployment can delete it, and each deletion is written to the audit log. Anthropic refuses to delete a skill that still has versions, so delete its versions first. When several provider accounts are set up, name the deployment with the model query parameter or the x-spanway-model header. Docs
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
skill_id | path | string | Yes | |
custom_llm_provider | query | string or null | No | |
model | query | string | No | Deployment whose provider account holds the skill, when several accounts exist. The x-spanway-model header does the same. |
Example request:
curl -X DELETE "http://localhost:4000/v1/skills/skill_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The skill is gone | application/json DeleteSkillResponse |
| 400 | The provider refused the request, for example a skill that still has versions | application/json ProxyError |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key may not call the deployment that holds the skill | application/json ProxyError |
| 404 | The provider account has no skill with that id | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | The key or the provider account is over its rate limit | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id of the deleted skill |
type | string | No | Always skill_deleted |