Cloudflare Workers AI supports TypeSafe Jev under model identifier typesafe/jev.
Developers can execute Jev directly inside Cloudflare Workers using the native env.AI.run() binding or from external services using Cloudflare's REST API.
Model Identifier & Execution Model
Cloudflare cataloged TypeSafe Jev for developers looking for non-generative, structured decision execution:
•Model Identifier:typesafe/jev on Cloudflare Workers AI.
•Execution Environment: Workers AI can be invoked through the native Worker binding without manually managing an external HTTP API call.
•Authentication: When called via env.AI.run inside a Worker, authentication is handled implicitly by the Cloudflare Workers AI binding. External REST calls use a standard Cloudflare API token.
Workers AI Binding (env.AI.run)
To use Jev in a Cloudflare Worker, configure the AI binding in your wrangler.jsonc or wrangler.toml:
wrangler.jsonc snippet
{ "ai": { "binding": "AI" }}
Then invoke typesafe/jev directly in your Worker handler:
TypeScript (Cloudflare Worker env.AI.run)
export interface Env { AI: Ai;}export default { async fetch(request: Request, env: Env): Promise<Response> { const inputState = "Support ticket: User cannot reset 2FA because SMS is not arriving on phone +14155552671. Carrier: Verizon."; // Invoke Jev using Cloudflare Workers AI binding const response = await env.AI.run("typesafe/jev", { state: inputState, questions: { is_urgent: { type: "noul", instructions: "Does this convey urgency?", criteria: { true: "Explicitly time-sensitive", false: "No urgency expressed" } }, department: { type: "choice", instructions: "Which team should handle this?", criteria: { billing: "Payments, invoicing, refunds", technical: "Bugs, outages, integrations" } }, frustration: { type: "score", instructions: "How frustrated is the customer?", criteria: [ "Calm", "Frustrated", "Very angry" ] } } }); return Response.json(response); }};
Cloudflare REST API Usage
If calling Cloudflare from external services or microservices, use the Cloudflare Workers AI REST endpoint with an account token:
The payload format for typesafe/jev on Cloudflare follows the TypeSafe System One schema containing a shared state string and a keyed questions object (supporting Choice, Score, and Noul primitives):
•Noul: Keyed question with type: "noul", instructions, and optional binary criteria (returns calibrated probability float noul).
•Choice: Keyed question with type: "choice", instructions, and an explicit map of label-to-definition criteria (returns winning choice, confidence, and probabilities map).
•Score: Keyed question with type: "score", instructions, and an ordered list of rubric level strings in criteria (returns continuous weighted score, confidence, legend, and level probabilities).
The execution response returns model metadata, answers keyed by question identifier, and token usage:
Cloudflare Workers AI documents a 32,000-token context window for typesafe/jev.
Context envelope note: Make sure the total length of your shared state string plus all accompanying question prompts and rubric descriptions stays within the 32,000-token limit when submitting requests to Cloudflare Workers AI.
Pricing & Billing Exposure
Cloudflare Workers AI bills inference execution through your Cloudflare account under standard Workers AI usage metrics (Neural Compute Units / Neurons) or published model rates. Check your Cloudflare dashboard under Workers & Pages > AI > Usage for current account allocations and neuron consumption.