Using Jev with Vercel AI Gateway and the AI SDK.
On Vercel, Jev is the AI Gateway model typesafe-ai/jev. Gateway accepts it through three interfaces: TypeSafe's own client, a plain HTTP endpoint, and the AI SDK. Separately, the AI SDK can skip Gateway and call TypeSafe directly with @ai-sdk/typesafe-ai.
Pick by what your code already uses. The interface decides the field names; the service decides the key, the model ID, and who bills you.
Which path to use
| If you have | Use | What changes |
|---|---|---|
Existing @typesafe-ai/sdk code | TypeSafe-compatible Gateway route | baseURL and the API key. systemOne, noul, and response shapes stay. |
| An AI SDK app, or new TypeScript code | AI SDK experimental_evaluate via Gateway | ai 7.0.105 or later and model: "typesafe-ai/jev". No extra provider package. |
| No AI SDK, or a non-TypeScript backend | POST /v1/evaluate | Same model, state, and questions as the AI SDK, sent as JSON. |
| AI SDK code, but TypeSafe keys and billing instead of Vercel's | @ai-sdk/typesafe-ai (not Gateway) | TYPESAFE_AI_API_KEY and typeSafeAi.evaluationModel("jev-latest"). |
Vercel positions the TypeSafe-compatible route as a migration path. For new code it recommends the evaluation API, which is the same capability with neutral names.
Interface vs. service
Four paths, two services. The first three all end at Vercel AI Gateway (ai-gateway.vercel.sh); the fourth never touches it.
| Path · your code calls | Service · endpoint | Credential | Model ID |
|---|---|---|---|
TypeSafe SDK via Gatewayclient.systemOne() | AI Gateway/typesafe/v1/systemone | Gateway key or Vercel OIDC | typesafe-ai/jev |
| HTTP evaluation API Any HTTP client | AI Gateway/v1/evaluate | Gateway key or Vercel OIDC | typesafe-ai/jev |
AI SDK via Gatewayexperimental_evaluate() | AI Gateway (AI SDK's own transport) | Gateway key or Vercel OIDC | typesafe-ai/jev |
AI SDK directexperimental_evaluate() | TypeSafeapi.typesafe.ai/v1 | TypeSafe key | jev-latest |
model line; billing, keys, and Gateway controls are not. And the two TypeSafe keys have different variable names: @typesafe-ai/sdk reads TYPESAFE_API_KEY, while @ai-sdk/typesafe-ai reads TYPESAFE_AI_API_KEY.Contract differences
Gateway speaks two vocabularies for the same model. The TypeSafe-compatible route keeps TypeSafe's names; /v1/evaluate and the AI SDK (both Gateway and direct) use the evaluation API's names.
| Field | TypeSafe-compatible (/typesafe) | Evaluation API (/v1/evaluate, AI SDK) |
|---|---|---|
| Yes/no type | "noul" | "boolean" |
| Yes/no answer | answers.x.noul | answers.x.probability |
| Choice options | criteria: { label: description } | criteria: { label: description } |
| Score rubric | criteria: [lowest, …, highest] | criteria: [lowest, …, highest] |
| Choice answer | choice, probabilities, confidence | choice, probabilities (optional in the AI SDK types) |
| Choice/Score confidence | answers.x.confidence | AI SDK: providerMetadata.typesafe.confidence.x. Not shown in Vercel's /v1/evaluate docs. |
| Usage | usage.input_tokens | usage.inputTokens |
| Gateway metadata | provider_metadata.gateway | providerMetadata.gateway |
Choice uses criteria on every path. There is no options array; the AI SDK types reject it.
Probability vs. confidence
.probability, or .noul on the TypeSafe route) is P(true). 0.02 is a confident no, not low confidence. Uncertainty sits near 0.5.probabilities[choice] for the selected one.Two results can give the leading option the same 0.54 and still differ in confidence. Set thresholds for each signal separately, on labeled examples from your workflow. Vercel's probabilities and thresholds guide ↗ covers this in depth.
TypeSafe SDK via Gateway
For existing @typesafe-ai/sdk code. Change the base URL and the key; the rest of the call is unchanged.
Vercel's API reference passes model: "typesafe-ai/jev". Its migration example omits model, in which case the SDK sends its default, jev-latest. Setting TYPESAFE_BASE_URL works in place of the baseURL option. The same route answers raw HTTP at POST /typesafe/v1/systemone and lists models at GET /typesafe/v1/models. Errors keep TypeSafe's message / error_type shape.
HTTP: POST /v1/evaluate
For any language, with no SDK. The body uses the evaluation API's names: boolean, choice, score, each with instructions and, where needed, criteria.
The response carries answers, usage, and Gateway routing and cost metadata:
Boolean criteria ({ true, false }) is optional. Score criteria is an ordered array of at least two levels. state can be a string, object, or array.
AI SDK via Gateway
experimental_evaluate ships in ai 7.0.105 and later (pnpm add ai@latest). A plain model string resolves through AI Gateway, so no provider package is needed.
Answers keep your question IDs, and choice is typed as a union of your criteria keys. For an explicit provider instance, use gateway.evaluationModel("typesafe-ai/jev") from @ai-sdk/gateway. The AI SDK calls Gateway through its own transport, not /v1/evaluate; the question schema is the same. The API is experimental and may change in patch releases.
AI SDK direct to TypeSafe
@ai-sdk/typesafe-ai is the AI SDK's TypeSafe provider. Same interface as above, different service: requests go to api.typesafe.ai on your TypeSafe key, so Vercel's promotion, budgets, logs, and providerOptions.gateway do not apply.
Install with pnpm add @ai-sdk/typesafe-ai ai. Model IDs are TypeSafe's (jev-latest, or a pinned version), not typesafe-ai/jev. createTypeSafeAi({ apiKey, baseURL }) overrides the key or the https://api.typesafe.ai/v1 default. The provider maps boolean to TypeSafe's noul and moves Choice/Score confidence to providerMetadata.typesafe.confidence. It defines no provider options yet. For TypeSafe's own client, see the TypeScript SDK guide; for keys and direct access, see API & access.
Authentication
AI_GATEWAY_API_KEY, sent as Authorization: Bearer. Works on all three Gateway paths; the AI SDK reads it automatically.VERCEL_OIDC_TOKEN. The AI SDK uses it when no API key is set; for HTTP or the TypeSafe route, send it as the Bearer token. Locally, vercel link then vercel env pull; tokens last 12 hours.@ai-sdk/typesafe-ai takes a TypeSafe key only (TYPESAFE_AI_API_KEY). Gateway keys and OIDC tokens do not work there.Privacy & observability
Vercel lists Jev with Zero Data Retention and No Training support. Both are per-request flags in providerOptions.gateway: zeroDataRetention: true and disallowPromptTraining: true. Vercel documents them for the AI SDK and /v1/evaluate, not for the TypeSafe-compatible route.
Pricing
As of September 23, 2026, Vercel's Jev model card ↗ shows Jev as Free, with promotional pricing ending September 25, 2026.
The card's underlying model data lists $0.042 per million input tokens and $0 output. Vercel does not label that figure as the post-promotion price, so check the card after September 25. The direct @ai-sdk/typesafe-ai path is billed by TypeSafe and is not covered by the Vercel promotion; see Jev pricing for TypeSafe's rates.
Code examples on this page were typechecked against ai 7.0.111, @ai-sdk/typesafe-ai 3.0.4, and @typesafe-ai/sdk 0.6.0, and run against mocked transports to confirm request URLs, bodies, and response access. They were not run against live endpoints.