Models
The hosted API at api.vakyn.com serves 2 models. They take the same requests and give the same kind of answers. They differ in price and in the questions they suit best.
Pick a model with the model field of each request. Leave it out and vakyn-max answers. You pay for input tokens only, from your prepaid balance; output is free on every model.
Current models
| Model | ID | Input price | Output | Rate limit | Context | Input |
|---|---|---|---|---|---|---|
| VAKYN MAXdefault | vakyn-max | $30 per billion tokens$0.03 per million | free | 60 requests per second per key | 32,768 tokensstate + longest question | Text: a string, a JSON object or a JSON array |
| VAKYN Fast | vakyn-fast | $23.31 per billion tokens$0.02331 per million | free | 60 requests per second per key | 32,768 tokensstate + longest question | Text: a string, a JSON object or a JSON array |
Prices are in US dollars. Input tokens are the state and the questions you send, as counted in usage.input_tokens. Calls that end in an error cost nothing.
Choosing a model
Set model in the body of POST /v1/systemone. Every question in the request goes to that model. The model field of the response names the model that answered.
curl -s "https://api.vakyn.com/v1/systemone" \ -H "Authorization: Bearer $TYPESAFE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "vakyn-fast", "state": "My order #4471 arrived with a cracked screen. I would like a replacement, not a refund.", "questions": { "damaged": { "type": "noul", "instructions": "Does the customer report a damaged item?" } } }'With the SDKs you can also set TYPESAFE_DEFAULT_MODEL in the environment, so code that never names a model picks yours. A name the API does not know gets a 400 with model_not_found:
{ "detail": { "error_type": "model_not_found", "message": "Unknown model \"vakyn-mini\". Use one of: vakyn-max, vakyn-fast. See https://vakyn.com/docs/models." }}When to pick which
| Model | Pick it for |
|---|---|
vakyn-max | Choice questions, especially with many options, and multi-step workflows such as invoices, customer records, agent traces and security reviews. |
vakyn-fast | Yes-or-no and score questions on short documents, where price matters most. |
Not sure? Start with vakyn-max. Then run a sample of your own cases on vakyn-fast and compare the answers and how sure they are. If they are good enough for your threshold, switch and pay less. The Confidence page shows how to set that threshold.
Aliases
Some names point at a model. Use them when you want code to follow the default.
| Alias | Points at |
|---|---|
vakyn-latest | vakyn-max |
jev-latest | vakyn-max |
jev-latest is the name code written for TypeSafe's Jev API sends by default, so that code works unchanged. The response names the model the alias pointed at, not the alias.
Limits
Both models have the same limits.
| Limit | Value |
|---|---|
| State + the longest question | 32,768 tokens |
| State + all questions | 65,536 tokens |
| Options in a choice | 1–255 |
| Levels in a score | 1–10 |
| Input | Text: a string, a JSON object or a JSON array |
A request over a token limit gets a 400 with max_tokens_exceeded. It is never cut short: every answer is computed on all of what you sent. To work with longer documents, see Long documents. The full list of errors is in the API reference.
Rate limits
Each API key can send 60 requests per second. Short bursts up to that number pass. Above it, the API answers 429 with a Retry-After header: wait that many seconds and send again. Errors like this cost nothing.
Need more? Tell us what you send and how often, and we can raise the limit for your organization.
Languages
The models are tested on English. Other languages are untested: they may work, but measure them on your own cases before you rely on them.
Listing models
GET /v1/models lists every model with its price, its limits and whether it can be called right now (available), plus the default and the aliases. The SDKs call it with models.list().
curl -s "https://api.vakyn.com/v1/models" \ -H "Authorization: Bearer $TYPESAFE_API_KEY"{ "default": "vakyn-max", "aliases": { "vakyn-latest": "vakyn-max", "jev-latest": "vakyn-max" }, "models": [ { "id": "vakyn-max", "name": "VAKYN MAX", "available": true, "price_per_billion_input_tokens": 30, "price_per_billion_output_tokens": 0, "max_tokens_state_and_longest_question": 32768, "max_tokens_request": 65536, "input": "text" }, { "id": "vakyn-fast", "name": "VAKYN Fast", "available": true, "price_per_billion_input_tokens": 23.31, "price_per_billion_output_tokens": 0, "max_tokens_state_and_longest_question": 32768, "max_tokens_request": 65536, "input": "text" } ]}