morigraph Developer Docs

Billing and limits

Every call is charged to the credits of the workspace the key belongs to. The price is the same as when an assistant calls the tool through MCP. Credits bought or granted in the dashboard are the same credits the API spends.

Prices

Prices are per call, per image or per second, depending on the tool. They are not listed on this page because they follow the providers behind each tool. Ask the API, which is always current:

curl https://api.morigraph.com/v1/tools -H "Authorization: Bearer $MORIGRAPH_API_KEY"

Each tool carries price.min_credits, price.max_credits and price.unit. The range covers the providers a tool can use; the cost argument on a call sets the most you are willing to pay.

What a call cost

Every tool response says so:

"credits": { "charged": 0.14, "reserved": 0, "remaining": 4.86 }
  • charged: taken from the balance for this request.
  • reserved: held for a job that is still running. It becomes a charge when the job finishes, and is released if the job fails.
  • remaining: what the workspace can still spend.

On GET /v1/jobs/{id} the figures are the job's, not the poll's: reserved while it runs, then charged with the final cost once it has finished. Polling itself is free.

The same numbers are in the X-Credits-Charged and X-Credits-Remaining response headers.

When nothing is charged

  • A request refused before a provider is contacted: a bad key, an unknown tool, a switched-off tool, no credits.
  • A tool that ran and failed. The hold is released, and error.credits.charged in the response confirms it.
  • Checking a job with GET /v1/jobs/{id}.
  • GET /v1/me, GET /v1/tools and GET /v1/credits.
  • A free tool: web page scraping and the market-data tools. They are rate limited instead, 10 calls a minute and 200 a day for each workspace, and work with no credits in the account.

Retrying without paying twice

Send an Idempotency-Key header, any unique string, with each tool call. If the connection drops and you repeat the request with the same key within 24 hours, you get the first answer back and are charged once. The response carries Idempotent-Replayed: true. The command line does this for you.

Balance

curl https://api.morigraph.com/v1/credits -H "Authorization: Bearer $MORIGRAPH_API_KEY"

This returns the workspace balance and this key's calls and spend over the last 30 days. A workspace admin can see every key's spend, and top up, in the dashboard.

Running out

A call made with no credits available answers 402 insufficient_credits and contacts no provider. Top up in the dashboard under Billing. An agent that receives this should stop and tell its user, not retry.