Get Proxy Call Records from AceDataCloud Platform

Returns the call records of the current account for Proxy class services (such as OpenAI compatible proxy, Claude compatible proxy).

The difference from API call records (/usages/):

Interface Applicable Services Key Fields
/usages/ API class services (self-developed interfaces) api_id + path
/proxy-usages/ (this interface) Proxy class services (forwarding compatible with upstream SDK) proxy_id + upstream_path + model

If you are unsure which category a call belongs to, first check the type field in the service details.

ℹ️ This interface belongs to the AceDataCloud Platform Management API, with a unified prefix of https://platform.acedata.cloud/api/v1/.

Interface Overview

Item Content
Method GET
URL https://platform.acedata.cloud/api/v1/proxy-usages/
Authentication ✅ Requires account token

Authentication Instructions (How to Obtain Account Token)

Request Header:

Authorization: Bearer platform-v1-92eb****629c

For obtaining the token, see Manage AceDataCloud Platform Account Token.

Required Query Parameters

⚠️ Must include ?user_id=<your_user_id>.

To get user_id: Open https://auth.acedata.cloud/user/profile.

Query Parameters

Parameter Type Required Default Description
user_id UUID Current account user ID
application_id UUID No Filter by Application
service_id UUID No Filter by service
credential_id UUID No Filter by credential
proxy_id UUID No Filter by Proxy
model string No Filter by model name (e.g., gpt-4.1, claude-sonnet-4)
status_code integer No Filter by HTTP status code
start_at datetime No Lower time bound
end_at datetime No Upper time bound
limit integer No 10 Number of items per page
offset integer No 0 Offset
ordering string No Sorting, commonly -created_at

Request Example

cURL

USER_ID=89518d07-5560-4b05-92c1-667f3ddf6a4b
curl "https://platform.acedata.cloud/api/v1/proxy-usages/?user_id=${USER_ID}&model=gpt-4.1&limit=100" \
  -H 'authorization: Bearer platform-v1-92eb****629c'

Python

import requests

PLATFORM_TOKEN = "platform-v1-92eb****629c"
USER_ID = "89518d07-5560-4b05-92c1-667f3ddf6a4b"

resp = requests.get(
    "https://platform.acedata.cloud/api/v1/proxy-usages/",
    headers={"authorization": f"Bearer {PLATFORM_TOKEN}"},
    params={"user_id": USER_ID, "model": "gpt-4.1", "limit": 100},
    timeout=10,
)
data = resp.json()
for u in data["items"]:
    print(f"  {u['created_at']}  {u['model']:30s}  in/out: {u['input_tokens']}/{u['output_tokens']}  ${u['consumption']:.4f}")

Node.js

const USER_ID = '89518d07-5560-4b05-92c1-667f3ddf6a4b'
const url = new URL('https://platform.acedata.cloud/api/v1/proxy-usages/')
url.searchParams.set('user_id', USER_ID)

const r = await fetch(url, {
  headers: { authorization: 'Bearer platform-v1-92eb****629c' },
})
console.log(await r.json())

Response Example (HTTP 200)

{
  "count": 8203,
  "items": [
    {
      "id": "px-abc123...",
      "user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
      "application_id": "82f57141-2323-4453-8730-60f7d833a2da",
      "service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
      "credential_id": "df3e1b1b-9e72-4c4f-9a83-1e23f7c8b4d6",
      "proxy_id": "9c4e3f2b-...",
      "method": "POST",
      "upstream_path": "/v1/chat/completions",
      "model": "gpt-4.1",
      "input_tokens": 320,
      "output_tokens": 145,
      "cached_tokens": 0,
      "status_code": 200,
      "consumption": 0.0084,
      "client_ip": "203.0.113.7",
      "duration_ms": 2104,
      "request_id": "chatcmpl-9f8e7d",
      "trace_id": "trc-1234567890abcdef",
      "metadata": null,
      "created_at": "2026-04-26T08:30:00Z"
    }
  ]
}

Response Field Descriptions

The meanings of the fields are generally the same as in the call record list, with additional fields:

Field Type Description
proxy_id UUID Proxy endpoint ID
upstream_path string Path passed to the upstream (e.g., /v1/chat/completions)
model string Name of the model called (only available for LLM Proxy, e.g., gpt-4.1)
input_tokens integer Number of input tokens (exclusive to LLM Proxy)
output_tokens integer Number of output tokens
cached_tokens integer Number of tokens that hit the prompt cache (only supported by some models)

Error Handling

HTTP Code Meaning
401 not_authenticated Missing account token
403 permission_denied ?user_id= not provided or provided another's user_id

Practical Tips

  • Use this interface for OpenAI / Claude / Gemini and other LLM calls/usages/ will not return token counts.
  • Analyze costs grouped by model: You can group by the model field in BI tools to see which model is the most expensive.
  • cached_tokens > 0 indicates that part of the input hit the prompt cache, and this part is billed at the cached price (usually 90% cheaper).