StoriesFly logo
Other endpoint

Account and balance API

Your plan, the price of one unit, your balance and free units, the next step of the ladder and your use of the last 30 days by endpoint. Costs nothing.

GEThttps://storiesfly.com/api/v1/account
  • Price free
  • Always current

Parameters

This endpoint takes no parameters. Send the key and nothing else.

Example request

Put your own key in the header.

curl "https://storiesfly.com/api/v1/account" \
  -H "X-Api-Key: sf_live_your_key"

Example response

200 OK · X-Units-Charged: 0

  "tier" "START"
  "unit_price_usd" 0.0015
  "balance_usd" 9.238
  "free_units" 0
  "lifetime_topup_usd" 10
  "next_tier" null
  "tier_cap" "START"
  "usage_30d" 
    
      "endpoint" "user.profile"
      "calls" 512
      "spent_usd" 0.618
    
    
      "endpoint" "user.posts"
      "calls" 96
      "spent_usd" 0.144
    
  

A real answer, shortened: lists are cut to two items and long texts to 160 characters.

Price and freshness

This call is free. It still counts toward your rate limit.

The answer is always current.

Errors

A failed call answers with an HTTP status and a body {error, code}. These are the codes this endpoint gives. Errors and what is charged covers all of them.

StatusCodeWhen
401unauthorizedThe X-Api-Key header is missing or the key is wrong. Free.
403telegram_requiredThe account behind the key is not linked to Telegram. The answer has a link_url to do it. Free.
429rate_limitedMore requests in a second than your level allows. Wait for the Retry-After header. Free.
500internal_errorA fault on our side. Retry shortly. Free.
FAQ

Questions about this endpoint

Does this call cost anything?

No. It takes 0 requests, so you can check your balance as often as you like within your rate limit.

What does it show?

Your level (tier), the price of a request, your balance, the free requests you have left, your lifetime top-ups, the next level and what it still needs, and your use in the last 30 days by endpoint.

Can I use it to test a key?

Yes. A valid key answers with the account, and a wrong or missing key answers unauthorized (HTTP 401).

Your first 100 requests are on us

Sign in with Telegram, create a key, call any endpoint. Top up only when you need more.