sangtao.ai
API key

Account

Account

The account an API key belongs to: credits, plan, the key and its limits.

GEThttps://api.sangtao.ai/v2/account

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Any key can read it — no scope needed. Only need the balance? GET /account/balance is lighter.

Response

  • idstring

    The account’s public id, stable. Quote it when you contact support.

  • namestring

    The account’s display name.

  • emailstring

    The account’s email.

  • emailVerifiedboolean

    Whether the email is verified.

  • createdAtstring

    When the account was made, ISO 8601 in UTC.

  • creditsobject

    The balance, as GET /account/balance gives it (without the fields only the website uses).

    Show child attributes
    • freeCreditnumber

      From the plan or a bonus; resets monthly.

    • purchasedCreditnumber

      Bought; never expires.

    • lockedCreditnumber

      Held for jobs running now.

    • availableCreditnumber

      freeCredit + purchasedCredit − lockedCredit

    • hasPurchasedboolean

      Whether credits were ever bought.

  • subscriptionobject | null

    The monthly plan in use. null when there is none.

    Show child attributes
    • tierstring

      The plan.

    • periodStartstring

      Start of the current period.

    • periodEndstring

      End of the current period.

    • daysLeftnumber

      Days left in the period.

    • quotasobject[]

      What the plan allows, per model.

      Show child attributes
      • modelstring | null

        The model the quota is for, by its public name (e.g. "gpt-image-2.6").

      • maxPerMonthnumber

        Most per month.

      • maxPerDaynumber

        Most per day.

      • usedThisPeriodnumber

        Used so far this period.

      • remainingnumber

        Left this period.

  • apiKeyobject

    The key this call was made with.

    Show child attributes
    • namestring

      The name you gave it.

    • prefixstring

      Its first characters, to tell keys apart — never the whole key.

    • legacyboolean

      true for an old-style key: one per account, full access, no name.

    • scopesstring[] | null

      What it may do. null means full access.

    • createdAtstring

      When it was made.

    • expiresAtstring | null

      When it stops working. null: never.

    • lastUsedAtstring | null

      Its last use.

  • limitsobject

    How much the account may do at once.

    Show child attributes
    • requestsPerMinutenumber

      Most requests per minute.

    • maxConcurrentJobsnumber

      Most jobs running at once.

GET/account
curl "https://api.sangtao.ai/v2/account" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "id": "acct_3kT9qPz0B",
    "name": "An Nguyễn",
    "email": "[email protected]",
    "emailVerified": true,
    "createdAt": "2026-08-01T03:12:00Z",
    "credits": {
      "freeCredit": 50,
      "purchasedCredit": 100,
      "lockedCredit": 8,
      "availableCredit": 142,
      "hasPurchased": true
    },
    "subscription": {
      "tier": "Pro",
      "periodStart": "2026-11-01T00:00:00Z",
      "periodEnd": "2026-12-01T00:00:00Z",
      "daysLeft": 22,
      "quotas": [
        {
          "model": "gpt-image-2.6",
          "maxPerMonth": 3000,
          "maxPerDay": 200,
          "usedThisPeriod": 412,
          "remaining": 2588
        }
      ]
    },
    "apiKey": {
      "name": "Worker VPS-03",
      "prefix": "sk_live_ab12",
      "legacy": false,
      "scopes": [
        "jobs:create",
        "jobs:read"
      ],
      "createdAt": "2026-10-02T08:00:00Z",
      "expiresAt": null,
      "lastUsedAt": "2026-11-09T10:01:00Z"
    },
    "limits": {
      "requestsPerMinute": 6000,
      "maxConcurrentJobs": 20
    }
  }
}