> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.erlcrussia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI credit balance

> Your credit and coin balance, the exchange rate and model prices. Requires a session or a management key; an `sk-…` execution key does not work.



## OpenAPI

````yaml en/openapi/en-api-v3-openapi.yaml GET /ai/credits/balance
openapi: 3.1.0
info:
  title: ER:LC Russia API V3
  description: >-
    ER:LC Russia API for servers, users, CDN, redirects, subscriptions, and
    access keys.
  version: 3.0.0
servers:
  - url: https://api.erlcrussia.com/v3
    description: Production server (com)
  - url: https://api.erlcrussia.xyz/v3
    description: Backup server (xyz)
security: []
tags:
  - name: ER:LC Server
    description: Obtaining status, online, lists of players and staff of the ER:LC server.
  - name: ER:LC Teams
    description: Sending and queuing in-game server commands (:h, :m, :kick, :ban, etc.).
  - name: Economics
    description: >-
      Interaction with the economic system (users, businesses, mafias, stores,
      advertising).
  - name: Statistics API
    description: >-
      High-performance obtaining statistics of discord servers and game servers
      (online, participants, bots).
  - name: Verification API
    description: Search and comparison of Discord ID and Roblox ID accounts.
  - name: CDN Assets
    description: >-
      Load, manage, statistic and clear MinIO/Edge CDN object storage file
      cache.
  - name: CDN Folders
    description: Hierarchical structure and sorting of CDN media library folders.
  - name: Punishment API
    description: Manage the balance and transaction history of players' points.
  - name: Subscriptions API
    description: >-
      Catalog of plans, FunPay orders, accrual of benefits and activation of
      subscriptions.
  - name: Authorization API
    description: >-
      Login via Discord and Roblox OAuth2, manage user sessions and link
      accounts.
  - name: Management API - WebSocket Keys
    description: Managing access keys to the WebSocket gateway and channel subscriptions.
  - name: Management API - Webhooks
    description: Registration, accessibility validation and monitoring of custom webhooks.
  - name: Control API - Panel
    description: >-
      Management of users, subscriptions, tariffs, manual balance and system
      statistics.
  - name: State API
    description: >-
      Monitoring the performance of the service, connections to PostgreSQL and
      Redis.
  - name: AI Audio
  - name: AI Studio
  - name: AI administration
  - name: API Keys
  - name: Admin API - Servers
  - name: Administration of E-Coins
  - name: CDN
  - name: CDN Domains
  - name: CDN V3
  - name: Custom Webhooks
  - name: Management API - Servers
  - name: Management API - Tokens
  - name: Organization redirects V3
  - name: Private files and library
  - name: Рекламные кампании V3
paths:
  /ai/credits/balance:
    get:
      tags:
        - AI Studio
      summary: AI credit balance
      description: >-
        Your credit and coin balance, the exchange rate and model prices.
        Requires a session or a management key; an `sk-…` execution key does not
        work.
      responses:
        '200':
          description: Balance of credits and coins.
          content:
            application/json:
              example:
                discord_id: '123456789012345678'
                credits: 152.4
                coins: 250
                exchange_rate: 1
                pricing:
                  niya-1:
                    name: Ния 1
                    input_cost: 0.15
                    output_cost: 0.4
                    unit: credits per 1k tokens
                  emmy-1:
                    name: Эмми 1
                    input_cost: 1.2
                    output_cost: 4
                    unit: credits per 1k tokens
                  hubert-1:
                    name: Хуберт 1
                    input_cost: 0.15
                    output_cost: 0.6
                    unit: credits per 1k tokens
                  emmy-voice-1:
                    name: Эмми Войс 1
                    credits_per_minute: 1
                    realtime_input_per_1k_tokens: 1.2
                    realtime_output_per_1k_tokens: 4
                    speech_per_1k_characters: 1
                    realtime_endpoint: /v1/realtime
                    unit: credits per minute
              schema:
                type: object
                properties:
                  discord_id:
                    type: string
                  credits:
                    type: number
                  coins:
                    type: integer
                  exchange_rate:
                    type: number
                  pricing:
                    type: object
                    properties:
                      niya-1:
                        type: object
                        properties:
                          name:
                            type: string
                          input_cost:
                            type: number
                          output_cost:
                            type: number
                          unit:
                            type: string
                      emmy-1:
                        type: object
                        properties:
                          name:
                            type: string
                          input_cost:
                            type: number
                          output_cost:
                            type: number
                          unit:
                            type: string
                      hubert-1:
                        type: object
                        properties:
                          name:
                            type: string
                          input_cost:
                            type: number
                          output_cost:
                            type: number
                          unit:
                            type: string
                      emmy-voice-1:
                        type: object
                        properties:
                          name:
                            type: string
                          credits_per_minute:
                            type: integer
                          realtime_input_per_1k_tokens:
                            type: number
                          realtime_output_per_1k_tokens:
                            type: number
                          speech_per_1k_characters:
                            type: integer
                          realtime_endpoint:
                            type: string
                          unit:
                            type: string
        '401':
          description: Not authorized.
      security:
        - AIManagementKeyHeader: []
        - CookieAuth: []
components:
  securitySchemes:
    AIManagementKeyHeader:
      type: apiKey
      in: header
      name: erlcrussia-api-ai-key
      description: >-
        An ordinary HTTP key for balances, masked AI key lists and existing key
        management. Key creation and coin exchange require the owner session; AI
        execution keys are forbidden.
    CookieAuth:
      type: apiKey
      in: cookie
      name: erlc_auth
      description: Session HTTP-Only authorization cookie on the portal.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.