estateclip.ai

Developer documentation

API v1

Billing

What a generation costs, how it is paid from your balance, and what is not charged. Prices are in euros and depend on the resolution, the length of the clips that succeed, and whether a final with music is made.

  • Your current prices: GET /v1/prices (below) and the overview in the dashboard. Both show them with your discount applied.
  • Your balance: GET /v1/balance (Balance), the overview and the playground in the dashboard.
  • To add credit: Billing in the dashboard, by card (Add credit).
  • Every generation states its price in charge, from the moment it is created.
  • To see what a generation would cost before you create it, try the options in the Playground.

Prices

A price is set in euro cents per second of video:

Rate Charged for
The rate of the resolution (720p, 1080p) Every second of every clip that succeeded
compose_cents_per_second The same seconds again, if the final was made
music_cents_per_second The same seconds again, if the final was made with music
  • A generation keeps the prices and the discount it was created with. A change of prices applies to generations created afterwards.
  • The overlay costs nothing extra.

Get your prices

GET /v1/prices needs your API key, like every route except GET /v1/health:

cURL
curl https://api.estateclip.ai/v1/prices -H "Authorization: Bearer $ESTATECLIP_API_KEY"

It answers with the rates your workspace pays, after its discount (example values):

JSON
{
  "currency": "EUR",
  "discount": 15,
  "resolutions": [
    {"resolution": "720p", "cents_per_second": "6.8"},
    {"resolution": "1080p", "cents_per_second": "11.9"}
  ],
  "compose_cents_per_second": "0.425",
  "music_cents_per_second": "0.425"
}
  • Rates are decimal text in euro cents: "6.8" is €0.068 per second. A discount gives rates with more decimal places; they are exact, read them as decimals, not as floating point numbers.
  • discount: your workspace's discount in percent, already applied to every rate.
  • While no prices are set, the rates are null.

How the charge is formed

charge = output seconds × (rate of the resolution + compose rate + music rate) × (100 − discount) / 100
  • Output seconds are clip_seconds times the clips that succeeded (output_seconds of the generation). Transitions do not shorten them.
  • The compose rate counts only if the final was made, the music rate only if that final has music.
  • The result is rounded once per generation, half up, to whole cents: 114.75 ct become 115 ct, 76.5 ct become 77 ct.

Example, with example rates (not your prices): 3 photos of 5 s at 720p with a final and music, rates 8, 0.5 and 0.5 ct, a discount of 15 %:

  • All three clips succeed: 15 s × (8 + 0.5 + 0.5) ct × 0.85 = 114.75 ct, charged €1.15.
  • One clip fails, the final is made from the other two: 10 s × 9 ct × 0.85 = 76.5 ct, charged €0.77.

The charge of a generation

Every generation has charge (see Retrieve a generation):

JSON
{"currency": "EUR", "estimated_cents": 115, "charged_cents": null}
  • estimated_cents: the most the generation can cost, set when it is created: as if every clip succeeds, with the final and music if you ordered them. null only for a generation created while no prices were set.
  • charged_cents: what the generation was charged, set when it has ended; 0 if it failed, null while it runs. It is never more than estimated_cents.

Balance

Generations are paid in advance, from your workspace's balance:

  1. Creating a generation sets its estimated_cents aside from your balance at once. If the balance does not cover it, the request is refused with 402 insufficient_balance and nothing is created.
  2. When the generation ends, the amount set aside comes back and charged_cents is taken. A generation that failed is charged nothing.

So the money set aside always covers what your running generations can cost, however many you start at once.

Get your balance

cURL
curl https://api.estateclip.ai/v1/balance -H "Authorization: Bearer $ESTATECLIP_API_KEY"

It answers with what a new generation can use, in euro cents (example values):

JSON
{"currency": "EUR", "available_cents": 2500}
  • available_cents already leaves out what your running generations have set aside. A generation whose estimated_cents is more is refused. Use it to warn your users before the balance runs out.
  • It can be below 0 after a payment was taken back; then no generation starts until the balance is evened out.
  • After a 402, add credit and send the same request again, with the same Idempotency-Key: the refused request created nothing, so the key is still free. With automatic top-ups on, the 402 also asks for a top-up; the same request goes through once it is credited.
  • If we refund a charge as a goodwill gesture, the amount is added to your balance; charged_cents of the generation stays as it was.

Add credit

Credit is added on the Billing page of the dashboard, by card:

  1. Enter your billing details once: company, address, country, the email address for your receipts and, if you have one, your VAT ID. They appear on your receipts.
  2. Choose one of the fixed amounts and continue to the payment page of Stripe, our payment provider. Your card details go to Stripe only.
  3. As soon as Stripe confirms the payment, usually within seconds, the amount is added to your balance and the top-up appears in the list on the billing page, with its receipt.

Your balance is credited with the amount you chose. Austrian VAT (20 %) is added on top of that amount and shown on the receipt, unless your VAT ID is from a country other than Austria: then the top-up carries no VAT under the reverse charge procedure, and the receipt says "Reverse charge". VAT IDs from the EU and the United Kingdom count once the tax authorities confirm them (VIES, HMRC). After you save one, the billing page shows that it is being checked, usually for a few seconds, and offers the amounts once it is confirmed.

There is no API for adding credit: a top-up needs a person who pays, or automatic top-ups that a person switched on.

Payments taken back

A top-up that is refunded, or that the cardholder disputes with the bank, is taken off your balance again, at most the amount it added. Your balance can then fall below 0; no generation starts until it is evened out (see Balance). Automatic top-ups are switched off then, so the lower balance does not charge the card again.

Automatic top-ups

With automatic top-ups, your saved card is charged with a fixed amount whenever your balance falls below a threshold you choose. Both are set on the Billing page:

  1. Add a card under Payment method. You enter it on Stripe's page, which asks your bank to confirm it where needed; nothing is charged. We keep only its brand, the last four digits and the expiry date.
  2. Under Auto-recharge, switch it on and choose the threshold (at least €10) and the amount (at least €25), in whole euros, both at most €1,000.

When your balance is below the threshold, the card is charged with the amount within a minute, and the amount is added to your balance. The same happens when a generation is refused with 402 while your balance is above the threshold: the top-up then covers at least what that generation needed. A card is charged at most once an hour; if the balance stays below the threshold, the next top-up follows an hour later at the earliest.

Each automatic top-up has a receipt with the VAT as for any top-up and appears in the list on the billing page as "Automatic top-up". Stripe emails the receipt to your billing email.

Automatic top-ups are switched off, and every account of the workspace gets an email, when:

  • the bank declines the card, or the card is no longer available: nothing is charged; add a card or check yours, then switch them on again;
  • the bank asks the cardholder to confirm the payment (3-D Secure), which is not possible while you are away: nothing is charged; choose Confirm card on the billing page, then switch them on again;
  • your VAT ID cannot be confirmed, or your billing details are incomplete;
  • a top-up is refunded or disputed with the bank, or we correct your balance downwards.

Switch them off on the billing page at any time. Remove under Payment method switches them off and deletes the card from your account.

What is not charged

  • Clips that failed: their seconds are not in output_seconds.
  • The compose and music rates, if a final was ordered but not made (compose_error).
  • A generation that failed: no clip succeeded, or it could not run at all.
  • A generation that was still running one hour before expires_at and failed with timeout, even if some of its clips succeeded (see Data lifecycle).
  • A repeated request with the same Idempotency-Key: it returns the generation created first and charges nothing again (see Idempotency-Key).
  • A request refused with 402 insufficient_balance: nothing was created.