Skip to content

What does an API key's monthly credit limit actually restrict?

The key's monthly cap limits credits attributed to that key during the current UTC calendar month. It is not a purchased balance, a daily allowance or a subscription. New tasks must fit both the account's shared balance and the key's remaining allowance. Confirm the current amounts with GET /usage before approving another request.

PROTECT KEYS AND ACCOUNT ACCESSAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Read the reported month; Estimate the next reservation; Investigate differences by job.
Workflow diagram: Read the reported month → Estimate the next reservation → Investigate differences by job. Read the article for evidence and limits.

Reservations affect the available allowance

A submitted task can consume allowance before its final result is delivered. Failed jobs and confirmed settlement changes affect the recorded usage. For text, a maximum reservation can later settle to measured usage. Do not calculate remaining permission merely by counting completed images or by subtracting last month's jobs from this month's cap.

What to do next

  1. 01

    Read the reported month

    Use the month field from /usage rather than the user's local calendar date. Keep monthly_limit and monthly_used alongside the shared balance in your application view.

  2. 02

    Estimate the next reservation

    Obtain the exact quote and compare it with the remaining allowance. A task can be rejected by the cap even when the account wallet holds enough credits.

  3. 03

    Investigate differences by job

    Review recent accepted, pending, completed and failed tasks. Keep this key's cap separate from the broader account job history and other keys' consumption.

A concrete example

Illustrative case: a key has a 100-credit monthly cap with 90 credits used. A 20-credit reservation is not permitted even if the account balance is 1,000. Another key's allowance does not automatically enlarge this one.

Before you call it ready

  • Month boundaries use UTC.
  • Cap and wallet are displayed separately.
  • Pending reservations are considered before creation.

When to stop or choose another method

Do not automatically raise the cap whenever a request fails. Confirm the intended monthly spending approval and the exact cause of the rejection first.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation