Docs

Start in 5 minutes

Get your first answer from a model with one call, and read what it cost.

All docs

Example

  1. Sign in and create an access key at corent.tech/dashboard/api-keys. Give it a daily spending limit.
  2. Put the key in your terminal as CORENT_API_KEY. Never put a key in a web page or a phone app.
  3. See what is available. This needs no key.
List open models
# List every open model Corent can run. No key needed, nothing is charged.
curl -s https://api.corent.tech/v1/open/public-models

Run one model and wait for the answer in the same call.

Run a model and wait
# Ask once and wait up to 50 seconds for the finished answer.
# max_cost_cents is the most you will pay. A failed run costs nothing.
curl -s -X POST "https://api.corent.tech/v1/open/invocations?wait=50" \
  -H "Authorization: Bearer $CORENT_API_KEY" \
  -H "Idempotency-Key: first-run-1" \
  -H "Content-Type: application/json" \
  -d '{"model":"corent/open/qwen-qwen3-4b-instruct-2507-ecefd4d6","input":{"prompt":"Say hello in five words.","max_new_tokens":64},"max_cost_cents":19}'

Then read the receipt.

Read the receipt
# Put the "id" from the reply in REQUEST_ID, then read what was held and charged.
curl -s "https://api.corent.tech/v1/open/invocations/$REQUEST_ID/receipt" \
  -H "Authorization: Bearer $CORENT_API_KEY"

What success looks like

  • The reply says "done": true and "state": "completed", with the answer under "output".
  • "charge_cents" is what you paid. It is never more than the max_cost_cents you sent.
  • A first run can take a minute or more, because a machine may have to wake up.

If it fails

  • Status 202 means it is still working. Send exactly the same call again.
  • Status 401 means the key was not accepted. Status 402 means you need more credit.
  • Every other refusal says what happened and whether money moved. See corent.tech/docs/errors.

Details

Next