How to Get a Jev API Key and Set Up Your Environment

Updated Applies to Jev 1.13

Before you send a single judgment question, you need an API key and an environment that keeps it safe. The fastest path to a working Jev setup runs through OpenRouter, the model’s main demo channel: it exposes Jev through an OpenAI-compatible endpoint, so the key you get there works with the request shape you already know. This guide walks through getting the key, wiring it into your environment, setting up credits, and the security habits that prevent an expensive accident.

TL;DR: Sign up on OpenRouter, add credits, and create an API key. Store it in an environment variable (OPENROUTER_API_KEY), never in code. Jev is listed at roughly $0.0462 per 1M input tokens on third-party listings — confirm current pricing on the OpenRouter model page. For the official TypeSafe AI channel and its own endpoints, follow the official documentation at typesafe.ai.

Step 1: Get the key from OpenRouter

  1. Create an account on OpenRouter and sign in.
  2. Open the Keys section of your dashboard and create a new API key.
  3. Copy the key immediately — some dashboards only show it once. If you lose it, create a new one and revoke the old.
  4. Find the Jev model page and note the exact model id. As of this writing it is listed as typesafe/jev-1.13; always confirm the exact model slug on the OpenRouter model page, because slugs change with versions.
  5. Review the model page’s pricing tab for the current per-token rates.

For the official TypeSafe AI channel (direct API access, enterprise terms, version guarantees), do not guess at endpoints — follow the official documentation on typesafe.ai and the announcement post introducing System One models and Jev. The trade-offs between the two channels are covered in the API channels guide.

Step 2: Put the key in your environment

The one non-negotiable rule: the key never goes into source code, config files in git, or chat messages. Use an environment variable:

# ~/.zshrc or ~/.bashrc — session-scoped export
export OPENROUTER_API_KEY="sk-or-v1-your-key-here"

After adding the line, restart your shell or run source ~/.zshrc. Your code then reads it at runtime:

import os

api_key = os.environ["OPENROUTER_API_KEY"]  # raises if missing — good

Reading from the environment at runtime is the right default: if the variable is missing, the process fails loudly instead of silently shipping a request without auth.

For teams, prefer a secrets manager (AWS Secrets Manager, Doppler, 1Password Connect) and inject the variable at deploy time. For local automation tools like n8n, use the tool’s own credential store rather than pasting the key into workflow nodes.

Step 3: Set up credits and billing

OpenRouter works on prepaid credits:

SettingWhereRecommendation
Credit balanceBilling / Credits pageStart with a small top-up while testing
Spend limitKey settingsCap each key so a leaked key cannot drain the account
Per-key limitsKeys pageOne key per project, so usage is attributable
Auto top-upBilling settingsEnable only after your pipeline is stable

A practical pricing anchor: at the listed rate of about $0.0462 per 1M input tokens (third-party listing data — confirm on the OpenRouter model page), a million judgment calls with short prompts is measured in tens of dollars, not hundreds. Work out your own math in the cost-and-latency guide.

Step 4: Verify the key works

Make one cheap call before wiring anything up:

# Confirm the exact model slug on the OpenRouter model page
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe/jev-1.13",
    "messages": [{"role": "user", "content": "Judgment question: is the sky blue?"}]
  }'

A 200 response with a structured answer in the message content means the key, the credits and the model slug are all correct.

The parsed answer — example fixture, confirm exact field names in the official documentation:

{
  "answer": "yes",
  "confidence": 0.99,
  "rationale": "Visible-sky blue coloration is the expected answer to this common-knowledge question."
}

If you get a 401, the key is wrong or missing; a 404 usually means the model slug is off. Both are covered in the troubleshooting guide.

Security habits that matter

Once the key verifies, continue to the first API call tutorial for the full request walkthrough, or the ticket triage case to see the key used in a real workflow.

This guide applies to Jev 1.13.

Frequently asked questions

Where do I get a Jev API key?

The main demo channel is OpenRouter: create an account, add credits, and generate an API key from the keys page. For the official TypeSafe AI channel, check the official documentation at typesafe.ai.

How much does calling Jev cost?

Third-party listings show about $0.0462 per 1M input tokens on OpenRouter. Treat that as indicative and confirm current pricing on the OpenRouter model page before budgeting.

Should I hardcode my API key?

Never. Keep the key in an environment variable or a secrets manager, restrict who can read it, and rotate it if it ever appears in logs or code.

Keep reading