Skip to content

Requests

Usage & billing

A task model costs a one-time create fee and flat monthly hosting. Predictions are billed per window ($0.003).

What you pay for

Create fee (once)HostingPredictions
$1.00$1.00 / month$0.003 per window
  • Create fee. $1.00, paid once when a task model is created. It includes every window of the fit (every method Wizard tests on your trials). Estimates (dry runs) and failed fits are free; an estimate is refused with 402 INSUFFICIENT_CREDIT when the balance cannot cover the create fee and the first month of hosting. A model created with defer_fit pays its collected batches (the first and every /trialsbatch) per window, and the create fee at its successful fit. It is never a monthly charge.
  • Hosting. $1.00 a month per model, charged from your prepaid credit in whole 30-day months in advance: the first when the model is fitted, then every 30 days, until it expires or you delete it. Set an expiry (at create, with PATCH, or on the dashboard) and nothing is charged after it. Deleting early does not refund the current month.
  • Predictions are billed per window ($0.003), whatever the channel count. The selected method determines how trials are divided into windows. The response reports the billed count. Every prediction window has the same price.
  • Free: requests refused before any work, failures on our side, dry runs, reading and listing task models, and anything done with a test key (test-key task models are deleted after 30 days). CPU time, GPU time and request count add nothing.

Read your usage

GET /v1/usage returns today’s and this month’s totals and the limits on your account. The dashboard shows the same numbers, with create fees, hosting and prediction spend apart.

Example request
Python
import os
import requests

response = requests.get(
    'https://dydema--eegapi-gateway.modal.run/v1/usage',
    headers={"Authorization": f"Bearer {os.environ['DYDEMA_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
usage = response.json()
print("windows this month:", usage["month"]["windows"] if usage["month"] else 0)
print("cost this month (USD):", usage["month"]["usd"] if usage["month"] else "0")
FieldMeaning
month.usdEverything charged this month, in USD: create fees, hosting and predictions.
month.task_model_create_usdCreate fees charged this month (present once the first is recorded).
month.task_model_hosting_usdHosting charged this month (present once the first month is recorded).
month.windowsWindows processed this month, including those a create fee covers.
X-Usage-UsdCost of this response, in USD.
Money and counters are decimal strings. A counter that is null means nothing has been recorded for that period yet. The dashboard reads the API’s recorded cost rather than recalculating it.

Diagnostics and limits

The usage block also reports submitted channels, input seconds, channel-seconds and compute time. These help you inspect workloads; they are not billing units. Rate limits and spend caps are separate from pricing; the dashboard shows the limits on your account.

Prepaid credit

New accounts start with $5 of free credit. After that you pay in advance: add credit under Billing ($5 minimum, paid on Stripe’s page), and each charge is taken off your balance the moment it is billed. Requests with insufficient credit are refused with 402 INSUFFICIENT_CREDIT until you add credit. There is no subscription and no monthly invoice. Creating a task model requires credit for its create fee and first month of hosting.

Turn on auto-recharge under Billing to have your saved card charged a set amount whenever the balance drops below a threshold (at most once an hour). Every purchase and recharge is listed in your billing history; a monthly budget under Limits caps spend on top of the balance.