Nexscope

Account credits

Read the committed account credit balance and gross ledger consumption.

Cost0 credits / call
Try online

Account Credits API use cases

Plan API spending

An app developer checks the committed account credit balance before planning more paid API requests. The result shows the account balance and recorded consumption for the requested period.

Review recorded consumption

A finance analyst retrieves credit consumption for a defined time window and compares it with internal records. The analyst uses the documented balance fields to distinguish balances from consumption.

Build an account dashboard

A developer calls the Account Credits endpoint from an internal dashboard using a user API key. The dashboard displays the returned account information without requiring a manual export.

Account Credits API FAQ

What does the Account Credits API return?

Check your Nexscope account credit balance and credit consumption from your own app. The response includes committed account information for the requested time window. Review the parameter and response tables for the precise meaning of each field. In-flight charges may appear later, and separate account queries do not share a single snapshot.

How many credits does the Account Credits API cost?

This account query is free: 0 credits per call. It reads committed account data without adding a business API call or spending credits. A zero or negative balance does not block the free GET request. Both account queries share a limit of 60 requests per account per 60 seconds.

How do I call the Account Credits API?

Send a GET request to /api/skill-api/v1/account/credits with a GENERAL user API key in the Authorization Bearer header. Supply optional dates and pagination as query parameters rather than a JSON body. The published parameter table describes the UTC time-window rules. Website session tokens and plugin keys cannot authorize this account query.

View plans and credits

Related APIs

Account APIs

API overview

Read the committed account credit balance and gross ledger consumption.

Endpoint
GET /api/skill-api/v1/account/credits

Authentication

Send a GENERAL user API key in the Authorization bearer header. Website JWTs, plugin keys, and installation tokens cannot call this endpoint. Zero or negative balance does not block this free GET.

Authorization: Bearer YOUR_API_KEY

Run API

Read committed account data without spending credits or adding a business API call. Both queries share a limit of 60 requests per account per 60 seconds.

GET/api/skill-api/v1/account/credits

Run this API

Endpoint

MethodGET
Path/api/skill-api/v1/account/credits
AuthBearer API key
Request bodyNone. Optional parameters are query fields.

Code example

2026-04-28T20:26:40.000Z → 1777408000000; 2026-05-28T20:26:40.000Z → 1780000000000.

curl -H "Authorization: Bearer YOUR_API_KEY" "https://api.nexscope.ai/api/skill-api/v1/account/credits?startTime=1777408000000&endTime=1780000000000"

Request parameters

The API uses UTC epoch milliseconds. In Online test, enter UTC date and time; the tester converts those UTC fields to milliseconds without using your browser time zone. With no dates, the preceding 30 days is used. A single bound fills the other with a 30-day span or now. The window is [startTime, endTime), no more than 180 days, and cannot end in the future.

NameTypeRequiredDescription
endTimestringoptional
Optional UTC epoch milliseconds, exclusive. The window must end no later than the request time.
startTimestringoptional
Optional UTC epoch milliseconds, inclusive. Enter UTC date and time in the tester; the API receives a decimal millisecond string.

Response example

Complete ResponseData envelope. cost is processing time in milliseconds, not charged credits.

{
  "code": 0,
  "msg": null,
  "data": {
    "scope": "ACCOUNT",
    "observedAt": "1780000000000",
    "startTime": "1777408000000",
    "endTime": "1780000000000",
    "permanentCredit": "120",
    "cycleCredit": "30",
    "debt": "5",
    "netCredit": "145",
    "grossConsumedCredit": "40",
    "quota": null
  },
  "ts": "1780000000000",
  "time": "2026-05-28 20:26:40",
  "cost": "13",
  "traceId": null
}

Response fields

Int64 credits, IDs, page totals, and epoch times are decimal strings; integer status and latency fields remain JSON numbers. Optional fields may be null or absent on error.

NameTypeRequiredDescription
codeintegeroptional
Business result code. Only 0 means success, even when HTTP is 200.
coststringoptional
Request processing duration in milliseconds, not credits. -1 means non-Web context.
dataobject | nulloptional
Committed account credit snapshot on success; null on an error.
data.cycleCreditstringoptional
Currently valid cycle credits in the committed balance; decimal string.
data.debtstringoptional
Outstanding credit debt, decimal string.
data.endTimestringoptional
Actual exclusive UTC epoch-millisecond window end.
data.grossConsumedCreditstringoptional
Windowed settled account-ledger consumption before refunds; excludes top-ups, admin adjustments, expiry, and debt repayment. Decimal string.
data.netCreditstringoptional
permanentCredit + cycleCredit − debt; may be negative and does not guarantee a paid call.
data.observedAtstringoptional
UTC epoch milliseconds when this committed-data read was observed.
data.permanentCreditstringoptional
Permanent credits in the committed account balance; decimal string.
data.quotanulloptional
Always null: there is no unified business-call quota.
data.scopestringoptional
Account ledger scope.
Allowed: ACCOUNT
data.startTimestringoptional
Actual inclusive UTC epoch-millisecond window start.
msgstring | nulloptional
Optional business message; may be null or omitted on success.
timestringoptional
Server-formatted response time (yyyy-MM-dd HH:mm:ss); its zone is not specified by this field.
traceIdstring | nulloptional
Optional error trace ID; may be null or omitted on success.
tsstringoptional
Server response timestamp, UTC epoch milliseconds as a decimal string.

Responses

HTTP 200Inspect ResponseData.code: only 0 is a successful business result. A nonzero code may still arrive with HTTP 200.
HTTP 400Invalid time window or pagination parameters return a parameter error.
HTTP 401 / 403The key is missing, invalid, or lacks access.
HTTP 429Shared account-query rate protection; Retry-After: 60 seconds.
HTTP 5xxService or dependency error; retry according to the returned status.

netCredit = permanentCredit + cycleCredit − debt and may be negative; it does not guarantee a paid call. grossConsumedCredit is settled account-ledger consumption before refunds, excluding top-ups, admin adjustments, expiry, and debt repayment. quota is null because no unified business-call quota exists.

observedAt marks the read time. Only committed results appear; in-flight charges may arrive later. Separate queries do not share a snapshot, and usage pages can shift as calls complete.

What can you do with this API?

Data explained and practical use cases

AI Guide

Question

What account credit data can the Account credits API provide, and how might I use it?

AI answer

This API returns a committed account credit snapshot and settled consumption for a reported time window. Its scope is the account ledger (ACCOUNT).

Data categoryDocumented fieldsWhat the values mean
Credit balancesdata.permanentCredit, data.cycleCreditPermanent and currently valid cycle credits in the committed balance.
Debt and net balancedata.debt, data.netCreditOutstanding debt and permanent plus cycle credits minus debt; net credit can be negative.
Settled consumptiondata.grossConsumedCreditAccount ledger consumption settled within the window before refunds; excludes top-ups, admin adjustments, expiry, and debt repayment.
Measurement windowdata.startTime, data.endTimeThe inclusive start and exclusive end of the UTC window used for consumption.
Snapshot contextdata.scope, data.observedAtThe ACCOUNT scope and when the committed-data read was observed.
Quotadata.quotaAlways null; no unified business-call quota is provided.
  • Display the account's committed permanent, cycle, debt, and net credit figures.
    • Prompt example: “Show my current permanent credits, cycle credits, debt, and net credits from the latest committed account snapshot. Include observedAt and leave any missing value unspecified.”
  • Track gross settled account consumption over the returned window.
    • Prompt example: “How many credits does my account show as gross settled consumption for the returned UTC window? State startTime and endTime and explain that the amount is before refunds.”
  • Reconcile a balance view with its observation time and exact window boundaries.
    • Prompt example: “Prepare a balance snapshot with net credits, observedAt, and the exact inclusive-start/exclusive-end UTC window. Flag any missing field instead of supplying a default.”
  • Flag a negative data.netCredit for review. A positive value does not guarantee that a paid call will succeed.
    • Prompt example: “Check whether my returned netCredit is negative. Show the balance and observation time, and do not assume that a positive balance guarantees a paid API call.”

Online test

Send one real, free account GET with your user API key. No request runs until you select Run API.

Try it

Send a real request with the contract shown above. Account queries are free.

Endpoint
GET /api/skill-api/v1/account/credits

Time window (UTC)

Leave both dates empty for the most recent 30 days. Select a date and 24-hour UTC time. The request sends UTC epoch milliseconds.

Start date and time (UTC)

Inclusive · Optional

End date and time (UTC)

Exclusive · Optional

Response
No response yet. Run the request to see the response here.