Saltar al contenido
Lumean

Descripciones en inglés

La interfaz de la sección está traducida a su idioma, pero las descripciones de operaciones, esquemas y errores solo existen en ruso y en inglés: aquí se muestra la versión en inglés.
GET/subscriptions

Get subscriptions of API key owner

Returns the key owner's subscriptions together with the remaining token balance and the models each plan unlocks.

This is the primary way to answer "how much generation do I have left" before submitting a large job.

Subscriptions do not auto-renew: an expired one simply stops working, and a new one is purchased through the web interface.

Required key permission: billing.read.

Parámetros

Los valores se escriben directamente en la línea de la solicitud y la URL se arma sola. Abajo están el tipo, la obligatoriedad y los valores permitidos de cada parámetro.

GEThttps://api.lumean.app/api/public/subscriptions

    Respuestas posibles

    200

    Success. The payload is in data.

    Ejemplo de cuerpo
    {
      "success": true,
      "message": "Success",
      "data": {
        "available_models": [
          "gpt-4.1-mini",
          "claude-haiku-4.5"
        ],
        "subscriptions": [
          {
            "id": 301,
            "status": "active",
            "current_period_start": "2026-07-15T00:00:00+00:00",
            "current_period_end": "2026-08-15T00:00:00+00:00",
            "items": [
              {
                "plan": {
                  "code": "creator",
                  "name": "Creator"
                },
                "status": "active",
                "is_usable": true,
                "billing_period": "monthly",
                "start_at": "2026-07-15T00:00:00+00:00",
                "end_at": "2026-08-15T00:00:00+00:00",
                "token_allowance": 30000,
                "tokens_used": 8200,
                "tokens_remaining": 21800
              }
            ]
          }
        ]
      }
    }
    Campos de la respuesta
    successobligatorio

    Success flag. Branch on the HTTP status code instead: any 2xx response carries true here, while an error comes back in a different shape that need not contain this field at all.

    boolean
    messageobligatorio

    A human-readable note in the account language. Fine to show to a user; do not parse it — the wording changes without notice and is not an error code.

    string
    dataobligatorio

    The response payload.

    object
    available_modelsobligatorio

    Codes of the models your active subscriptions grant. A model outside this list is rejected when creating an order.

    array<string>
    subscriptionsobligatorio

    Your subscriptions. An empty list means there is no active subscription: orders are then possible only with a positive LMC balance.

    array<object>
    elemento del array
    idobligatorio

    Subscription identifier.

    integer
    statusobligatorio

    Subscription state. There is no auto-renewal: once the term ends the subscription expires and the plan has to be purchased again.

    string
    current_period_startobligatorio

    Start of the current period, ISO 8601.

    string
    current_period_endobligatorio

    End of the current period, ISO 8601 — the moment the subscription expires.

    string
    itemsobligatorio

    The plans inside the subscription: what was purchased and how many tokens are left.

    array<object>
    elemento del array
    planobligatorio

    The purchased plan: code and name.

    object
    codeobligatorio

    Plan code.

    string
    nameobligatorio

    Display name of the plan.

    string
    statusobligatorio

    State of the plan within the subscription.

    string
    is_usableobligatorio

    Whether this plan can be spent right now. Branch on this, not on status: a plan can be formally active yet already exhausted.

    boolean
    billing_periodobligatorio

    Billing period. Only monthly is supported.

    string
    start_atobligatorio

    When the plan took effect, ISO 8601.

    string
    end_atobligatorio

    When the plan expires, ISO 8601. Any remaining tokens are forfeited after that moment.

    string
    token_allowanceobligatorio

    How many tokens the plan grants per period.

    integer
    tokens_usedobligatorio

    How many tokens have been consumed in the current period.

    integer
    tokens_remainingobligatorio

    How many tokens are left. This balance is spent before any LMC is charged — a top-up kicks in only once it runs out.

    integer
    401

    The key is missing, unknown, disabled or expired.

    Analizar esta respuesta
    Ejemplo de cuerpo
    {
      "success": false,
      "message": "API key is missing. Provide it in the X-API-KEY header.",
      "data": null
    }
    Campos de la respuesta
    successobligatorio

    Always false in error responses.

    boolean
    messageobligatorio

    Error text in the key's language (set through the X-Locale header).

    string
    dataobligatorio

    Always null when the request is rejected before processing.

    admite null
    null
    403

    The key lacks the required permission, or the object belongs to another user.

    Analizar esta respuesta
    Ejemplo de cuerpo
    {
      "success": false,
      "message": "This API key does not have permission to perform this action."
    }
    Campos de la respuesta
    successobligatorio

    Always false in error responses.

    boolean
    messageobligatorio

    Error text in the key's language (set through the X-Locale header).

    string

    Esta página para IA

    Abrir .mdllm.md

    versión de la API 1.0.0