api.acedata.cloud, into strongly typed methods, eliminating the need for manual HTTP, SSE, task polling, error handling, and retry backoff work.
This chapter is organized in the order of actual integration: first obtain the API Token from the console, then select the language to view the corresponding section, and finally look at advanced usage of task polling, streaming responses, and X402 on-chain payments.
Repositories and Packages
- SDK Source Code (monorepo): https://github.com/AceDataCloud/SDK
- TypeScript:
@acedatacloud/sdk - Python:
acedatacloud - Go:
github.com/AceDataCloud/SDK/go - X402 Client (TypeScript):
@acedatacloud/x402-client - X402 Client (Python):
acedatacloud-x402
Capability Matrix for Three Languages
The multimedia resources and task polling of the Go SDK are currently in alpha stage (pseudo versionv0.0.0-20260505072132-4a3d921f9bb4), with stable capabilities beingchat.completions. For multimedia scenarios, please prioritize TypeScript or Python.
When to Use SDK / MCP / Native HTTP / X402
SDK and X402 are not mutually exclusive: the SDK supports both “token path” and “
paymentHandler path”, see SDK + X402 Payment Hook.
Applying for API Token
To use the SDK, first apply for an API Token at Ace Data Cloud Console - Application List:
If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in, and after logging in or registering, you will be automatically returned to the current page.
You will receive a free quota upon your first application, allowing you to experience various AI services provided by Ace Data Cloud for free.
Copy the Token you just obtained, which will be referred to as {token} below.
Unified Environment Variable
The SDKs in the three languages will automatically read the same environment variableACEDATACLOUD_API_TOKEN, and it is recommended to export it in the shell, allowing the SDK to pick it up automatically:
- TypeScript:
new AceDataCloud({ apiToken: '{token}' }) - Python:
AceDataCloud(api_token="{token}") - Go:
adc.NewClient(adc.WithAPIToken("{token}"))
Note: The convention in the AceDataCloud project repository isACEDATACLOUD_API_KEY(in.env/ CI), but these three SDKs only recognizeACEDATACLOUD_API_TOKEN. If your environment only hasACEDATACLOUD_API_KEY, please pass it explicitly during construction.
30 Seconds to Get Started with Three Examples
The following three code snippets do the same thing: callgpt-4o-mini and have it reply with ADC_*_OK exactly. Each snippet includes actual running results, which you can reproduce with your own token.
TypeScript
The SDK currently declares the response asProgram running result:Record<string, unknown>, and at runtime it is a regular JSON object that can be accessed directly by fields. In strict TS projects, if you encounter type errors, you can temporarily useas any, or refer to SDK Task Polling and Streaming Responses to create a custom typed wrapper.
Python
The current return of the Python SDK isProgram running result:dict, so useres["id"]instead ofres.id. This is different fromopenai-python, so be careful during migration.
Go
The Go SDK response is uniformlyProgram running result:map[string]any, without strong typed struct, requiring manual type assertion. All resource accessors are method chains:client.OpenAI().Chat().Completions().Create(...).
id, elapsed_ms, and usage in the responses of the three languages come from the same source: authenticated by PlatformGateway → target OpenAI compatible API → write billing records. The content field is the actual output of the model, using a fixed identifier ADC_*_OK to prove that the response has not been tampered with by the SDK.
Recommended Reading Order
- TypeScript SDK Integration Tutorial —— Code that can run after
npm install. - Python SDK Integration Tutorial —— Three sets of usage: synchronous, asynchronous, and streaming.
- Go SDK Integration Tutorial —— Go style
context.Contextand channel streaming. - SDK Task Polling and Streaming Response —— Differences in TaskHandle units, SSE implementation details, and retry backoff.
- SDK + X402 Payment Hook —— No token, on-chain settlement based on calls.
How to Check Remaining Quota
You can check the current account’s remaining quota through the Ace Data Cloud Console - Application List. You can view all usage history and billing details through the Ace Data Cloud Console - Usage History.Learn More
- 📦 SDK monorepo source code
- 🔌 X402 Integration Guide
- 🛠 MCP Servers Tutorial
- 📊 Service List and Pricing

