Using your API key
Create a key, authenticate requests and configure environment variables.
On this page
Create and store
Choose a resource group and model scope when creating an API key. You can edit model permissions later in the console; the resource group is fixed. Grant only the models your project needs.
Create a dcld-sk- key in the console; the full secret is shown only once. Keep it out of git and public screenshots. If exposed, disable or delete the old key and update your clients.
Headers and environment variables
Set env_key to the variable name DECLOUD_API_KEY, not the secret. GUI apps launched from Finder or the Dock typically do not inherit a terminal export; enter the key in their settings.
export DECLOUD_API_KEY='dcld-sk-...'
curl https://macdecloud.com/v1/chat/completions \
-H "Authorization: Bearer $DECLOUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-chat",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'