Authentication
Updated at:
How to obtain and use an API Key
The ParseX API uses Alibaba Cloud Model Studio API Key authentication. Requests carry the API Key in the Authorization header.
Obtain credentials
-
Open the console
Open the Model Studio console and log in with your Alibaba Cloud account.
-
Get the API Key
Obtain the
DASHSCOPE_API_KEYin the console; it starts withsk-. For details, see Get an API Key.WarningAn API Key has account-level permissions. Keep it secure — do not share it through public channels or commit it to a code repository.
Usage
Configure the API Key as an environment variable:
export DASHSCOPE_API_KEY="sk-xxxxxxxxxxxxxxxx"
Include the Authorization header in every request:
curl https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/parse-x/parse/submit \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json"
Permissions
- Alibaba Cloud primary account: can call all endpoints directly
- RAM user: must be granted the required permissions before calling
- The permission scope of an API Key is configured in the console
Security recommendations
- Keep it out of code repositories: store the API Key in environment variables
- Use separate keys per application: give each application its own API Key to simplify tracking and revocation
- Rotate regularly: replace API Keys periodically to reduce the risk of leakage
ImportantOnce your credentials are ready, see Submit a parsing task to start calling the API.
Is this page helpful?