Skip to content

Jev API 400: Invalid Request and Unknown Model

Last checked · Independent guide, not affiliated with TypeSafe AI

ANSWER

TypeSafe returns HTTP 400 with error_type api_usage_error in two common cases we reproduced: 'Invalid request.' when a question uses a type the API does not know (for example boolean, the name Vercel uses), and 'Unknown model: <name>' when the model name is wrong. Use the types noul, choice and score, and a model name such as jev-1.13.0 or jev-latest.

TypeSafe’s API reference says validation problems return 422, but several mistakes actually come back as 400 with an api_usage_error. We reproduced both messages below on September 19, 2026.

HTTP 400
{ "detail": { "error_type": "api_usage_error", "message": "Invalid request." } }

The message gives no hint about which field is wrong. In our tests the trigger was a question with an unsupported type:

"questions": {
"is_greeting": { "type": "boolean", "instructions": "Is this a greeting?" }
}

boolean is the name Vercel’s AI SDK uses for Jev’s yes/no questions. TypeSafe’s own API only accepts three types: noul, choice and score. Code ported from Vercel, or written from memory, hits this first.

Fix: use "type": "noul" for yes/no questions and read the answer from the noul field (Vercel returns it as probability). Also check for typos such as "Choice" with a capital letter, or "yes_no".

HTTP 400
{ "detail": { "error_type": "api_usage_error", "message": "Unknown model: jev-1.13" } }

Names that worked and failed on September 19, 2026:

Model name Result
jev-1.13.0 Works
jev-latest Works (currently jev-1.13.0)
jev-preview Works (currently jev-1.13.0)
jev-1.13 400 Unknown model
typesafe/jev-1.13 (OpenRouter’s name) Not accepted by TypeSafe’s API
typesafe-ai/jev (Vercel’s name) Not accepted by TypeSafe’s API

The jev-1.13 spelling is an easy trap: one of the code examples in TypeSafe’s own documentation (on its Jev 1.13 known-issues page) creates a client with model="jev-1.13". The Python SDK passes the name through unchanged, and the call fails with TypeSafeBadRequestError: ... 400 Unknown model: jev-1.13.

Fix: use the full version jev-1.13.0 when you want repeatable results, or jev-latest to follow new releases. GET https://api.typesafe.ai/v1/models lists the aliases your account can use; versioned IDs are accepted even though they are not listed.

A state that is too long also returns 400, but with a different body: {"detail": {"error_type": "max_tokens_exceeded"}}. See max_tokens_exceeded.

Aspect 400 api_usage_error 422
Body One message string A list of fields, each with type, loc and msg
Typical cause A value the API does not recognize (type name, model name) A required field is missing (model, questions, a Choice’s criteria)
Tells you which field? No Yes, in loc

See 422: Field required for the second kind.

Do not retry a 400 unchanged; the official SDKs do not. Log the full request body (without the key), fix the field, and send it again.

Sources

  1. API reference: question types and model field (TypeSafe docs)
  2. Models and aliases (TypeSafe docs)
  3. Jev on Vercel AI Gateway (boolean question type)