1For AI
  • Welcome
  • Getting Started
    • Quickstart
  • Model
    • Retrieve Model List
    • Get Single Model
  • Chat
    • Create new chat
    • Continue Chat Conversation
  • User
    • User Balance
  • Errors
    • Common Errors
Powered by GitBook
On this page
  1. User

User Balance

API Documentation: Retrieve User Balance

Endpoint

GET /v1/user/balance

Description

This endpoint retrieves the current remaining balance of the authenticated user.

Request

cURL Example:

curl --location 'https://api.1for.ai/v1/user/balance' \
--header 'api-key: {API_KEY}'

Replace {API_KEY} with your actual API key.

Response

The response will be a JSON object with the user's remaining balance, rounded to five decimal places:

{
    "remainingBalance": 123.45678
}
  • remainingBalance: A number representing the amount of balance left for the user.

Notes

  • Ensure the user is authenticated and the api-key header is valid.

  • The balance is precise up to five decimal places.

PreviousContinue Chat ConversationNextCommon Errors

Last updated 1 month ago