For the complete documentation index, see llms.txt. This page is also available as Markdown.

Client и Usage

Endpoints для проверки ключа, профиля клиента и расхода API.

Проверка клиента и ключа

Current client API health

get
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Sanctum token in Authorization: Bearer <token> format.

Responses
200

Client API diagnostics.

application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
get/private/health/client
GET /api/v3/private/health/client HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "state": 0,
  "message": "text",
  "result": {
    "health": {
      "version": "client-health-v1",
      "status": "ok",
      "client": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "token": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "security": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "quota": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "webhooks": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "contracts": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "time": "2026-01-01T00:00:00.000Z"
    }
  },
  "meta": {
    "request_id": "text",
    "correlation_id": "text",
    "timestamp": "2026-01-01T00:00:00.000Z",
    "pagination": {
      "mode": "page",
      "current_page": 1,
      "per_page": 1,
      "total": 1,
      "last_page": 1,
      "from": 1,
      "to": 1,
      "cursor": "text",
      "next_cursor": "text",
      "has_more": true
    }
  }
}

Профиль клиента

Current client profile

get
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Sanctum token in Authorization: Bearer <token> format.

Responses
200

Client profile.

application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
get/private/client
GET /api/v3/private/client HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Client profile.

{
  "state": 0,
  "message": "text",
  "result": {
    "id": 1,
    "name": "text",
    "email": "text",
    "balance": {},
    "orders": {},
    "api_token": {
      "id": 1,
      "name": "text",
      "scopes": [
        "text"
      ],
      "scope_details": [
        {
          "scope": "public-api:client:read",
          "group": "client",
          "title": "Client profile",
          "description": "text",
          "risk": "low",
          "grantable": true,
          "endpoints": [
            "text"
          ]
        }
      ],
      "security": {
        "hmac_required": true,
        "hmac_verified": true,
        "signature_algorithm": "text"
      },
      "last_used_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z"
    }
  },
  "meta": {
    "request_id": "text",
    "correlation_id": "text",
    "timestamp": "2026-01-01T00:00:00.000Z",
    "pagination": {
      "mode": "page",
      "current_page": 1,
      "per_page": 1,
      "total": 1,
      "last_page": 1,
      "from": 1,
      "to": 1,
      "cursor": "text",
      "next_cursor": "text",
      "has_more": true
    }
  }
}

Usage, квоты и billing summary

API usage, quota and billing summary

get
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Sanctum token in Authorization: Bearer <token> format.

Responses
200

Current token usage summary.

application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
get/private/usage
GET /api/v3/private/usage HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "state": 0,
  "message": "text",
  "result": {
    "api_token": {
      "id": 1,
      "name": "text",
      "status": "text",
      "plan": "text",
      "billable": true
    },
    "quota": {
      "day": {
        "limit": 1,
        "used": 1,
        "remaining": 1,
        "resets_at": "2026-01-01T00:00:00.000Z"
      },
      "month": {
        "limit": 1,
        "used": 1,
        "remaining": 1,
        "resets_at": "2026-01-01T00:00:00.000Z"
      }
    },
    "billing": {
      "currency": "text",
      "unit_price": "text",
      "billable_units": 1,
      "estimated_amount": "text"
    },
    "usage": {
      "ANY_ADDITIONAL_PROPERTY": {
        "requests": 1,
        "errors": 1,
        "billable_units": 1,
        "total_duration_ms": 1
      }
    }
  },
  "meta": {
    "request_id": "text",
    "correlation_id": "text",
    "timestamp": "2026-01-01T00:00:00.000Z",
    "pagination": {
      "mode": "page",
      "current_page": 1,
      "per_page": 1,
      "total": 1,
      "last_page": 1,
      "from": 1,
      "to": 1,
      "cursor": "text",
      "next_cursor": "text",
      "has_more": true
    }
  }
}

Последнее обновление

Это было полезно?