Docs
JavaScript kit
Know what the JavaScript kit can do today, and what to use instead for open models.
Example
The kit in the package store, version 0.7.0, does not have open model calls yet, so no JavaScript example is shown. Use plain HTTP for open 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}'What success looks like
- The reply says "done": true and "state": "completed".
If it fails
- Status 202 means still working: send the same call again with the same Idempotency-Key.
Details
Everything else
Pictures, video, voice and text work with the published kit: npm install corent-sdk.