provide query endpoint, firstlocalized example text (task ) andlocalized example text ().
endpointlocalized example text (ID ),, can, query return exceeds 100.
| endpoint | localized example text | Path |
|---|---|---|
| query | query task | GET /api/v2/open/records |
| query | Query Account Balancelocalized example text | GET /api/v2/open/transactions |
Description### Authentication
with endpoint use Bearer Token (API Key).
| Parameterlocalized example text | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer {API_KEY} |
- RequestIf omitted lastId, return.
- returnnextLastId andhasMore:
- hasMore = true when, willnextLastId as RequestlastId Parameter, can.
- hasMore = false when,nextLastId as0, no data.
- Created Time (ID)localized example textreturn, in first.
| Parameter: | Parameterlocalized example text | Type | Required | Default | Description |
|---|---|---|---|---|---|
| lastId | int | No | 0 | : returnnextLastId; If omitted | |
| limit | int | No | 20 | , maximum 100, exceeds 100 |
localized example text```json { "code": 0, "msg": "success", "data": { "list": [], "nextLastId": 0, "hasMore": false } }
| fieldlocalized example text| Type | Description |
|--------|------|------|
| list | array | datalist, endpoint|
| nextLastId | int |; as Request`lastId`.as`0` no data|
| hasMore | bool | with|
---
##, query### endpoint-**endpointPath**: `/api/v2/open/records`
- **RequestMethod**: `GET`
- **Authentication**: Bearer Token (API Key)
### Request Parameters (Query)
| Parameterlocalized example text| Type | Required | Description |
|--------|------|------|------|
| lastId | int | No |,「localized example text」 |
| limit | int | No |, default 20, maximum 100|
| taskId | string | No | Task ID query, task|
| status | string | No | Status:`success` / `processing` / `failed` |
| model | string | No | Model|
| startDate | string | No |, Format`YYYY-MM-DD` |
| endDate | string | No |, Format`YYYY-MM-DD` ()|
### Successlocalized example text```json
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"taskId": "task_20260601_abc123",
"modelType": "video",
"modelName": "Seedance 2.0",
"modelVersion": "2.0",
"genType": "t2v",
"resolution": "1080p",
"duration": 5,
"amount": "0.500000",
"status": "success",
"createdTime": "2026-06-01T12:30:45+08:00"
}
],
"nextLastId": 884512,
"hasMore": true
}
}listfieldDescription
| fieldlocalized example text | Type | Description |
|---|---|---|
| taskId | string | Task ID |
| modelType | string | Task Type:image (image)/ video (video)/ audio (audio) |
| modelName | string | Model name |
| modelVersion | string | Modellocalized example text |
| genType | string | Generation type, localized example textt2i (Text-to-Image)/ t2v (Text-to-Video)/ i2v (Image-to-Video) |
| resolution | string | Resolution, localized example text1080p |
| duration | int | Duration (seconds), imagetask as 0 |
| amount | string | task, Failuretask as0.000000 |
| status | string | Task Status:success / processing / failed |
| createdTime | string | Created Time (RFC3339 Format) |
Request Example
#, 50, onlySuccess task
curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/records?limit=50&status=success" \
-H "Authorization: Bearer your_api_key_here"
#: use return nextLastId
curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/records?limit=50&status=success&lastId=884512" \
-H "Authorization: Bearer your_api_key_here"
# Task ID query
curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/records?taskId=task_20260601_abc123" \
-H "Authorization: Bearer your_api_key_here"##, query### endpoint-endpointPath: /api/v2/open/transactions
- RequestMethod: GET
- Authentication: Bearer Token (API Key)
Request Parameters (Query)
| Parameterlocalized example text | Type | Required | Description |
|---|---|---|---|
| lastId | int | No | ,「localized example text」 |
| limit | int | No | , default 20, maximum 100 |
| taskId | string | No | Task ID query, return task (,, etc. ) |
| type | string | No | Type:recharge ()/freeze ()/unfreeze ()/charge () |
| startDate | string | No | , FormatYYYY-MM-DD |
| endDate | string | No | , FormatYYYY-MM-DD () |
Successlocalized example text```json { "code": 0, "msg": "success", "data": { "list": [ { "txId": "tx_20260601_xyz789", "type": "charge", "amount": "0.500000", "beforeBalance": "1000.500000", "afterBalance": "1000.000000", "relatedId": "task_20260601_abc123", "model": "Seedance 2.0", "remark": "tasklocalized example text", "createdTime": "2026-06-01T12:30:50+08:00" } ], "nextLastId": 552301, "hasMore": true } }
### listfieldDescription
| fieldlocalized example text| Type | Description |
|--------|------|------|
| txId | string | ID|
| type | string | Type:`recharge` / `freeze` / `unfreeze` / `charge` |
| amount | string | localized example text|
| beforeBalance | string | first|
| afterBalance | string | after|
| relatedId | string | ID (task as Task ID, as )|
| model | string | task Model name; no task () when as characters|
| remark | string | localized example text|
| createdTime | string | when (RFC3339 Format)|
### Request Example
```bash#, only
curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/transactions?limit=50&type=charge" \
-H "Authorization: Bearer your_api_key_here"
curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/transactions?limit=50&type=charge&lastId=552301" \ -H "Authorization: Bearer your_api_key_here"
Task ID query task (,, etc. ) curl -X GET"https://mm-internal-cn.leonecloud.com/api/v2/open/transactions?taskId=task_20260601_abc123" \ -H "Authorization: Bearer your_api_key_here"
---
## localized example text### Python
```pythonimport requests
BASE = "https://mm-internal-cn.leonecloud.com/api/v2/open/records"
HEADERS = {"Authorization": "Bearer your_api_key_here"}
last_id = 0
all_records = []
while True:
params = {"limit": 100}
if last_id:
params["lastId"] = last_id
resp = requests.get(BASE, headers=HEADERS, params=params).json()
data = resp["data"]
all_records.extend(data["list"])
if not data["hasMore"]:
break
last_id = data["nextLastId"]
print(f"localized example text{len(all_records)} localized example text")
### JavaScript
```javascriptasync function fetchAllRecords() {
const base = 'https://mm-internal-cn.leonecloud.com/api/v2/open/records';
const headers = { Authorization: 'Bearer your_api_key_here' };
let lastId = 0;
const all = [];
while (true) {
const params = new URLSearchParams({ limit: '100' });
if (lastId) params.set('lastId', String(lastId));
const resp = await fetch(${base}?${params}, { headers }).then((r) => r.json());
const data = resp.data;
all.push(...data.list);
if (!data.hasMore) break;
lastId = data.nextLastId;
}
console.log(localized example text${all.length} localized example text);
return all;
}
---
## Note1. **localized example text**:use return`nextLastId` as`lastId`, or.
2. **localized example text**:`limit` maximumas 100, when 100.
3. **datarange**:endpointreturn first API Key.
4. **Format**:with field as characters, 6,.
5. **when**:`startDate` / `endDate`,`endDate` localized example text.
6. **taskId query**:`taskId` as, only first task; up to return 1, will return task (,, etc. ).`taskId` can and Condition use, Usually can.
7. **localized example text**:ID return; with, will data (data will in ).
## Model (LLM)
- endpoint ( / ) task and.
- **Model (LLM) and in endpoint return range**:LLM token, in in, will / in.
- Model and first「localized example text」/「localized example text」localized example text.
## Error CodesDescription
| Error Codes | Description | localized example text|
|--------|------|----------|
| 10005 | not / API Key no| localized example text`Authorization` and API Key|
| 90003 | localized example text| after or Technical Support|
### ErrorResponse Example
```json{
"code": 10005,
"msg": "not",
"data": null
}