Today we will talk about how to integrate the Jev model into AI coding tools such as Claude Code and Codex. If you still don't know what Jev is, you can check out this article:
How to Apply for an API Key
Open the official console: https://console.typesafe.ai
After logging in, go to the API Keys page: https://console.typesafe.ai/keys to create an API Key, then set the environment variable locally:
export TYPESAFE_API_KEY="your key"
New users get a $5 initial credit, which is enough for functional testing. Based on the official pricing (input $0.042/million tokens, output free), this credit can cover approximately 120 million input tokens, which is quite generous. The free credit policy is subject to the current official website terms, and there is no recharge option at the moment.
Install the Jev Skill
We need to install the official plug-and-play Skill repository: https://github.com/typesafe-ai/skills. Of course, third-party Jev skills have also appeared, but choosing the official one is more reliable.
Claude Code installation:
claude plugin marketplace add typesafe-ai/skillsclaude plugin install typesafe@typesafe-ai
Codex and other coding agents installation:
npx skills add typesafe-ai/skills --skill typesafe-ai
During installation, npx skills will prompt you to select the corresponding agent (Codex, Cursor, etc. are supported). Just choose the one you want. It is installed to the current project by default; add -g to install globally.
Verify Key Usability
Before installing the Skill, it is recommended to first run a curl command to confirm that the key is available. Jev's API has only one endpoint: POST the "state + typed questions" to it, and it directly returns structured answers with probabilities rather than generating a piece of text:
curl -s https://api.typesafe.ai/v1/systemone \ -H "Authorization: Bearer $TYPESAFE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "jev-latest", "state": { "command": "git push --force", "branch": "main" }, "questions": { "needs_confirm": { "type": "noul", "instructions": "Should manual confirmation be required before executing `command`?" }, "risk": { "type": "score", "instructions": "How high is the risk of executing `command` on the `branch` branch?", "criteria": ["Low: can recover normally", "Medium: has side effects but controllable", "High: may cause irreversible loss"] }, "action": { "type": "choice", "instructions": "Which action should be taken?", "criteria": { "Execute directly": null, "Execute after confirmation": null, "Refuse and suggest an alternative": null } } } }'
The returned JSON looks like this:
{ "model": "jev-1.13.0", "answers": { "needs_confirm": { "type": "noul", "noul": 0.89 }, "risk": { "type": "score", "score": 1.9, "confidence": 0.86, "legend": { "0": "Low: can recover normally", "1": "Medium: has side effects but controllable", "2": "High: may cause irreversible loss" }, "probabilities": { "0": 0.0, "1": 0.09, "2": 0.91 } }, "action": { "type": "choice", "choice": "Refuse and suggest an alternative", "confidence": 0.72, "probabilities": { "Refuse and suggest an alternative": 0.81, "Execute after confirmation": 0.19, "Execute directly": 0.0 } } }, "usage": { "input_tokens": 431, "output_tokens": 91 }}
The three question types correspond to three answer types: noul returns the probability of "yes" (0~1, without a separate confidence); choice returns the selected option plus the full probability distribution and confidence; score returns a probability-weighted score (which can fall between two levels), the probabilities of each level, and confidence. The entire request usually returns in sub-second time.
If you prefer Python, the official SDK can also run in just a few lines:
pip install typesafe-sdk
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient with TypeSafeClient() as client: response = client.system_one( state={"command": "git push --force", "branch": "main"}, questions={ "needs_confirm": Noul(instructions="Should manual confirmation be required before executing `command`?"), "action": Choice( instructions="Which action should be taken?", criteria={"Execute directly": None, "Execute after confirmation": None, "Refuse and suggest an alternative": None}, ), }, ) print(response.nouls["needs_confirm"].noul)print(response.choices["action"].choice)
Using Jev in Claude Code
After installation, you can trigger it directly with slash commands or natural language. The actual working mechanism is: /typesafe:typesafe-ai loads the official Skill's instructions to Claude Code, Claude Code then writes the calling script for you according to the instructions, makes a real request to the Jev API, and finally summarizes the structured results for you. Here are two more practical real-world scenarios:
Case 1: Project code refactoring decisions
/typesafe:typesafe-aiPlease analyze the file src/utils/permissions.ts, focusing on:1. Which complex if-else or repetitive logic can be replaced with structured judgment?2. Which functions/code blocks do you recommend deleting, keeping, or extracting into shared components?3. Give a clear decision for each candidate block (delete / keep / refactor), using TypeSafe's Choice for the decision and Score for the refactoring cost rating.
Claude Code will send the relevant code snippets as state and the "delete/keep/refactor" options as Choice choices to Jev, then summarize them into a decision table (for example, a certain permission check has a Choice result of "delete" with a confidence of 0.87). You can directly implement the refactoring based on the table.
Case 2: Safety gating for dangerous commands/tool calls
/typesafe:typesafe-aiI am about to execute this command:[paste the command here, e.g., rm -rf ./tmp or git push --force] Please use TypeSafe to judge:1. Risk level (Score: low / medium / high)2. Whether manual confirmation is required before execution (Noul)3. Handling method (Choice: execute directly / execute after confirmation / refuse and suggest an alternative) Only return structured judgment results; do not execute directly.
Jev usually returns probability-bearing judgments in sub-second time (for example, a 0.72 probability of "high risk" and a 0.93 probability of "requires manual confirmation", as shown in the real return format in the curl example above). Claude Code decides whether to continue execution based on thresholds, effectively adding a cheap and fast safety guardrail to the agent.
Update commands:
claude plugin marketplace update typesafe-aiclaude plugin update typesafe@typesafe-ai
Then restart or run /reload-plugins.
Using Jev in Codex
Codex does not have a slash-command trigger. Once the Skill is installed, Codex will automatically discover it, and you can just use natural language, for example:
Use TypeSafe to determine whether the following command requires manual confirmation. Only return the structured result; do not execute:git push --force origin main
Codex will read the installed typesafe-ai Skill and call the Jev API to complete the judgment. The usage is similar to Claude Code: let Codex handle code generation, and let Jev handle judgment and decision-making.
Summary
The most interesting thing about Jev is that it provides a brand-new way of usage: it does not generate content, but instead helps you make judgments, analyses, and decisions.
The most recommended approach is to pair it with coding agents like Claude Code and Codex: the agent focuses on doing the work, while Jev focuses on making judgments.
The official Skill is already packaged, so you can get started with almost zero hassle. There is still free credit available, and the input token price is extremely low ($0.042/million, with free output). It is perfect for large-scale testing on real projects, code refactoring, and complex technical decision-making. Give it a try now!