Docs
Open models
List open models, run one with a spending limit, wait for it, or stop it.
Example
# List every open model Corent can run. No key needed, nothing is charged.
curl -s https://api.corent.tech/v1/open/public-models# 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}'The same in Python, with the kit from the package store.
import os
import time
from corent import Corent
client = Corent(os.environ["CORENT_API_KEY"])
# What this key can run now, with the most each model can cost.
for model in client.open_available_models()["models"][:3]:
print(model["model"], model["max_cost_cents"])
job = client.open_invoke(
"corent/open/qwen-qwen3-4b-instruct-2507-ecefd4d6",
{"prompt": "Say hello in one sentence.", "max_new_tokens": 64},
max_cost_cents=19,
idempotency_key="first-run-python-1",
)
# Read until it has ended. Reading never starts or charges anything.
finished = {"completed", "failed", "cancelled", "blocked", "expired"}
while job["state"] not in finished:
time.sleep(5)
job = client.open_invocation_status(job["id"])
print(job["state"], job["charge_cents"], "cents")
print(job["output"])What success looks like
- The list shows each model's "id", the least a run can cost ("from_cents") and the most ("ceiling_cents").
- A finished request says "done": true, "state": "completed" and carries "output" and "charge_cents".
If it fails
- A limit below the model's ceiling_cents is refused before anything is held. Raise max_cost_cents or pick another model.
- When every machine is busy, the request waits in line. Nothing is held or charged until it starts.
- A failed run costs nothing.
Details
Waiting for the result
Add ?wait=N to POST /v1/open/invocations or to GET /v1/open/invocations/{id}. The call is held open for up to N seconds, at most 55.
- A reply with status 200 and "done": true has ended. Read "state": completed, failed, cancelled, blocked or expired.
- A reply with status 202 and "done": false is still working. Send the same call again with the same Idempotency-Key, or read the request.
- Sending the same call again never runs or charges it twice. A new Idempotency-Key is a new request.
Stopping
POST /v1/open/invocations/{id}/stop withdraws a request that has not started, and nothing is charged. That includes one that is still starting a machine. A run a machine has taken cannot be stopped; it ends within its time limit.
Starting a machine
Machines run only when there is work, so the first run after a quiet spell can wait several minutes. The request reads "state": "running" with "phase": "starting" and "start_by", the latest moment a machine may take it, at most 15 minutes away. Then it reads "phase": "running" and the model's time limit begins. Waiting is not billed. If no machine starts by then, the request is cancelled and nothing is charged. Your credit stays held while it waits.
What you can run
106 open models and tools are listed right now. Each entry says its limits and anything you must accept first.
Some models have their own usage rules. Accept them once with one of your keys before the first run; the refusal says how.