Fotor OpenAPI
  1. Reference
Fotor OpenAPI
  • Getting Started
    • Introduction
    • Access and Authentication
    • For Serverless Clients
    • Token Consumption
  • Reference
    • Get User Token Balance
      GET
    • Query Task Details
      GET
    • AI Upscaler
      POST
    • AI Skin Retouch
      POST
    • Text to Image
      POST
    • Image to Image (AI Art Effects)
      POST
    • Background Remover
      POST
    • AI Headshot
      POST
    • Photo Colorize
      POST
    • Photo Restoration
      POST
    • Face Swap
      POST
    • AI Replace
      POST
    • AI Expand
      POST
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  1. Reference

Get User Token Balance

GET
/v1/credits
This API allows you to retrieve the Token balance of a user account, including total and remaining Tokens. It requires authorization via a Bearer token.

Request

Header Params
Authorization
string 
optional
Example:
Bearer <your api key>

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api-b.fotor.com/v1/credits' \
--header 'Authorization: Bearer <your api key>'

Responses

🟢200成功
application/json
Body
code
string 
required
Status code; "000".
msg
string 
required
Response message.
data
object 
required
Token information object.
businessId
string 
required
Reserved for future use or enterprise ID.
total
integer 
required
Total tokens allocated to the account.
remaining
integer 
required
Remaining tokens.
Example
{
    "code": "000",
    "msg": "success",
    "data": {
        "businessId": "",
        "total": 92000,
        "remaining": 90272
    }
}
Modified at 2025-07-09 09:08:56
Previous
Token Consumption
Next
Query Task Details
Built with