loopling.ai

API reference

Get the current account

Read your Ink balance and the calling key’s spend and cap.

GET https://loopling.ai/v1/me

Authorization

Authorization

string · required

Your API key, as Bearer lpl_….

Response · 200

object

enum<string>

Object type.

Available options: account

user_id

string

Your account ID.

key

object

The key that made this call.

id

string

Key ID.

prefix

string

First 12 characters, as shown on API keys.

name

string

The name you gave it.

ink_limit

integer | null

The key’s Ink cap. null when uncapped.

ink_charged

integer

Ink this key has ever charged. Counts against ink_limit.

ink_reserved

integer

Ink held by this key’s running generations.

ink

object

Your account’s Ink.

balance

integer

Spendable Ink: plan grant plus pay-as-you-go.

period_grant_remaining

integer

Plan grant left this period. Spent first.

payg_balance

integer

Pay-as-you-go Ink. Never expires.

usd_payg_equivalent

number

balance in pay-as-you-go USD.

Request

curl

curl https://loopling.ai/v1/me \
  -H "Authorization: Bearer $LOOPLING_API_KEY"

Node

const res = await fetch('https://loopling.ai/v1/me', {
  headers: { Authorization: `Bearer ${process.env.LOOPLING_API_KEY}` },
})
const me = await res.json() // { key: { name, ink_limit, ink_charged }, ink: { balance, … } }

Python

res = requests.get(
    "https://loopling.ai/v1/me",
    headers={"Authorization": f"Bearer {os.environ['LOOPLING_API_KEY']}"},
)
me = res.json()  # {"key": {"name": …, "ink_limit": …}, "ink": {"balance": …}}

Response

200

{
  "object": "account",
  "user_id": "7d3f2b9a-5c1e-4a8d-b6f0-2e9c4a1d8b57",
  "key": {
    "id": "4e1a9c27-8b3d-4f6e-a052-c7d9e1b3f468",
    "prefix": "lpl_a1b2c3d4",
    "name": "production renderer",
    "ink_limit": 5000,
    "ink_charged": 1290,
    "ink_reserved": 0
  },
  "ink": {
    "balance": 8716,
    "period_grant_remaining": 6200,
    "payg_balance": 2516,
    "usd_payg_equivalent": 87.16
  }
}

401

{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key is invalid, revoked or expired.",
    "request_id": "0b7c6f1e-2d4a-4e8b-9c3f-5a1d7e2b8c40"
  }
}

Use it to check a key before you submit, or to show a balance in your own tools.

Explore models

loopling.ai · grows with you, grows itself

hello@loopling.ai · for agents · community · pricing · Enterprise · API · privacy · terms