Introduction to Usage & Credits
Welcome to the Usage & Credits service documentation!
This service provides open APIs for querying your account’s credits balance, API usage logs, and credits change history. You can programmatically monitor your consumption and integrate billing data into your own systems.
Authentication
All endpoints require authentication via API Key. You can pass it in one of two ways:
| Method | Example |
|---|
| Request Header | X-API-Key: your-api-key |
| Query Parameter | ?key=your-api-key |
Keep your API Key secure. Do not expose it in client-side code or public repositories.
Features
- Credits Balance — Query your current credits balance in real time.
- Service List — Retrieve all available services and their IDs for filtering.
- API Usage Logs — Search detailed API call records including status codes, consumed credits, trace IDs, and metadata.
- Credits Change History — View credits deduction details with before/after balances and deducted amounts.
Available Endpoints
| Endpoint | Method | Description |
|---|
/api-user/credits | GET | Query current credits balance |
/api-user/services | GET | List available services |
/api-user/usage/search | POST | Search API usage logs |
/api-user/points/search | POST | Search credits change history |
Quick Start
Query Credits Balance
curl https://dk.mountsea.ai/api-user/credits \
-H "X-API-Key: your-api-key"
Response:import requests
headers = {"X-API-Key": "your-api-key"}
resp = requests.get("https://dk.mountsea.ai/api-user/credits", headers=headers)
print(resp.json())
# {"credits": 10000}
const resp = await fetch("https://dk.mountsea.ai/api-user/credits", {
headers: { "X-API-Key": "your-api-key" }
});
const data = await resp.json();
console.log(data);
// { credits: 10000 }
Search Credits Change History
curl -X POST https://dk.mountsea.ai/api-user/points/search \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"dateRange": {
"start": 1767801600000,
"end": 1773071999999
},
"page": 1,
"limit": 10
}'
import requests
headers = {
"X-API-Key": "your-api-key",
"Content-Type": "application/json"
}
body = {
"dateRange": {
"start": 1767801600000,
"end": 1773071999999
},
"page": 1,
"limit": 10
}
resp = requests.post(
"https://dk.mountsea.ai/api-user/points/search",
headers=headers,
json=body
)
print(resp.json())
const resp = await fetch("https://dk.mountsea.ai/api-user/points/search", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
dateRange: { start: 1767801600000, end: 1773071999999 },
page: 1,
limit: 10
})
});
const data = await resp.json();
console.log(data);
Explore the API Documentation