Skip to main content

Skill API authentication

The Skill API uses a Model Studio API key for authentication and is accessed through a workspace endpoint.

The Skill API uses an Alibaba Cloud Model Studio API key for authentication. Each request carries the API key in an HTTP header.

Get an API key

  1. Log on to the Alibaba Cloud Model Studio console.
  2. Go to the API key page, and create and copy an API key.
An API key grants access to Model Studio resources. Keep it secure and do not commit it to code repositories or public channels.

Configure the endpoint

https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/skills
  • workspace_id: the workspace ID. Log on to the Model Studio console and copy it from the workspace menu in the upper-right corner.

Send a request

Set the API key as an environment variable:
export DASHSCOPE_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Each request carries the Authorization header:
curl "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/skills?pageNo=1&pageSize=10" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Permissions

  • Alibaba Cloud primary accounts can call all APIs.
  • RAM users must be granted the required permissions.
  • The scope of an API key is determined by the console configuration.
If identity information is missing or invalid, the API returns 401 WORKSPACE_ID_ILLEGAL. For error handling, see Skill API error codes.