Create AceDataCloud Platform API Credentials

An application's API Key is used to call service APIs at https://api.acedata.cloud. You can copy the General Application's Key from the console, or issue a separate credential for a specified application through the management API.

Copy an API Key in the Console

To call service APIs such as chat, image, or music, sign in to the application list, open the General Application, and click the copy button marked 1 in the image below in the API KEY field.

API Key copy button on the General Application card (marked 1)

Paste the copied raw value into the API Key field of your SDK or client. When sending HTTP requests directly, use Authorization: Bearer YOUR_API_KEY in the request header. The General Application's Key can call services enabled for the account. When you need to set separate API scopes, limits, or expiration times for a project, you can create a separate credential in Manage Credentials.

Create a Credential Through the Management API

To programmatically issue a service Key for a specified application, first create an Account Token for management operations, and obtain the application's application_id from the application list.

export PLATFORM_TOKEN='你的账户令牌'
export APPLICATION_ID='你的 Application ID'

API Overview

Item Value
Method POST
URL https://platform.acedata.cloud/api/v1/credentials/
Authentication Account Token; OAuth token requires credentials:write
Body JSON

Request Body

Field Type Required Description
application_id UUID Yes Target Application
name string No Credential display name
limited_amount number / null No Per-credential usage limit; null means no separate limit
expired_at datetime / null No ISO 8601 expiration time
allowed_api_ids UUID[] / null No Only these APIs may be called; an empty array is normalized to no restrictions
host string No Credential host information
for_user_id string No Used when the Application owner issues an authorization credential for another user
tags / metadata array / object No Custom extension data
curl -X POST 'https://platform.acedata.cloud/api/v1/credentials/' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d "{\"application_id\":\"${APPLICATION_ID}\",\"name\":\"production\",\"limited_amount\":50}"

Response Description

A successful request returns 201 and a Credential object:

  • API/Agent-type services typically return type=Token and token;
  • id, user_id, creator_id, used_amount, and time fields are generated by the server.

The current list and detail APIs also return credentials in plaintext, but clients should not rely on this historical behavior. Save the credential immediately after creation and avoid writing the response to logs; future APIs may return masked values.

Error Handling

  • 400: Invalid field format, unknown allowed_api_ids, or other creation constraints.
  • 401: Invalid Account Token.
  • 403/404: No access to the target Application, or the Application/authorized user does not exist.

Next Steps