Tài liệu API

API quản lý nhóm

Tự động hóa nhóm, thành viên, lời mời và ngân sách qua các endpoint quản trị an toàn.

Tóm tắt hướng dẫn

Tự động hóa nhóm, thành viên, lời mời và ngân sách qua các endpoint quản trị an toàn.

Tự động hóa nhóm, thành viên, lời mời và ngân sách qua các endpoint quản trị an toàn.

Ví dụ mã

These examples use an environment variable so the secret is not written into shell history more than necessary.

Read team members
export TEAM_MANAGER_KEY="mk-lcx-..."

curl https://lingcorex.ai/v1/team-management/members \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"
List team API keys
curl "https://lingcorex.ai/v1/team-management/apikeys?status=active" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# Response items include:
# id, user_id, user_email, masked_key,
# qpm_limit, daily_spend_limit, allowed_groups,
# supported_model_ids, team_group_id, created_at.
# Provider fields are not returned.
Usage by day and member
curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"
Update API-key limits
curl -X PATCH https://lingcorex.ai/v1/team-management/apikeys/14/limits \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qpm_limit":60,"daily_spend_limit":"1000.000000"}'

Ví dụ mã 2

The usage endpoint supports whole-team dashboards, member drill-downs, and request-level investigation.

Team daily dashboard
curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# Response highlights:
# - time_series: one point per day for the whole team
# - models: model-level cost and token breakdown for the window
# - members: member ranking for the whole window
# - total_tokens / total_cost: whole-team totals
Hourly incident window
curl "https://lingcorex.ai/v1/team-management/usage?bucket=hour&start_time=2026-06-16T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# Use this when investigating a sudden spike.
# The response keeps the same shape as the daily dashboard,
# but time_series buckets look like "2026-06-16 14:00:00".
Team usage grouped by member
curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# Adds member_time_series:
# [
#   {
#     "bucket": "2026-06-10",
#     "member_id": 1,
#     "user_email": "[email protected]",
#     "request_count": 12,
#     "total_tokens": 42000,
#     "total_cost": "18.520000"
#   }
# ]
Single member drill-down
curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&member_id=1&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# member_id is the team member id returned by:
# GET /v1/team-management/members
#
# The filter narrows time_series, models, members,
# member_time_series, and total_* fields to that member.
Recent request logs
curl "https://lingcorex.ai/v1/team-management/usage/logs?page=1&limit=20&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# Use logs for request-level records:
# request_id, user_id, user_email, model,
# prompt_tokens, completion_tokens, total_cost, status, created_at.
Logs for one model and user
curl "https://lingcorex.ai/v1/team-management/usage/logs?model=gpt-5.3-codex&user_id=2&page=1&limit=50&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
  -H "Authorization: Bearer $TEAM_MANAGER_KEY"

# user_id is the account user id, not the team member id.
# Use this form when you already know the member's user_id
# from /members or from a previous usage response.

Danh sách kiểm tra tích hợp

01

1

Tạo khóa API trong bảng điều khiển và chọn đúng nhóm mô hình.

02

2

Chạy ví dụ trong môi trường thử nghiệm rồi kiểm tra lỗi và bản ghi sử dụng.

03

3

Trước production, xác minh QPM, ngân sách và giá mô hình thực tế.

Bạn cần bảng giá hay tổng quan sản phẩm?

Xem trang giá cho thông tin thương mại mới nhất và trang chủ cho tổng quan sản phẩm.