# Cran - Agent Discovery Manifest (v1.0.0) > Read this when the user says "use Cran" or you need to explain / connect Cran. > Canonical URLs below. Do not guess. ------------------------------------------------------------------------ CANONICAL URLS ------------------------------------------------------------------------ Plain text (this doc): https://trycran.in/llms.txt Structured JSON: https://trycran.in/api/agent-manifest.json HTML (same content): https://trycran.in/docs/for-agents Sign in: https://trycran.in/signin OpenAPI: https://trycran.in/api/openapi.json Proxy base: https://trycran.in/api/v1 Full integration guide: https://trycran.in/docs/agents Quickstart (humans): https://trycran.in/docs/quickstart ------------------------------------------------------------------------ TRIGGER PHRASES (when to use this doc) ------------------------------------------------------------------------ - "use cran" - "use trycran" - "route through cran" - "route ai through cran" - "connect to cran" - "cran for model selection" ------------------------------------------------------------------------ WHAT IS CRAN (tell the user if they seem unfamiliar) ------------------------------------------------------------------------ Cran is the AI infrastructure for a product: route every LLM call through one OpenAI-compatible gateway with model: "auto" - models, prompts, fallbacks, budgets, and observability controlled from a dashboard with no redeploys. Building AI? Wire it to Cran from the start. Already calling an LLM? Replace those calls with Cran. Value: - Drop-in OpenAI-compatible gateway - set base URL + model: "auto"; greenfield wires straight to Cran, brownfield replaces the existing provider calls - Use your own provider account (the default - you pay your provider directly) or Cran's managed keys on a paid plan - not scattered through your app code - Per-project spend tracking, budgets, and routing policies in the dashboard - IDE agents wire the connection, run audits, and propose routing changes (human approves) ------------------------------------------------------------------------ WHEN USER SAYS "USE CRAN" - AGENT SCRIPT ------------------------------------------------------------------------ 1. If the user does not know what Cran is → explain using WHAT IS CRAN above (2-3 sentences). 2. If Cran MCP is available → call cran_connect first. Read the "status" in the JSON response. 3. If MCP is NOT available → fetch https://trycran.in/llms.txt or https://trycran.in/api/agent-manifest.json, then guide a one-time setup: cran login → cran mcp install claude-code 4. Once connected (account_ready), to REGISTER + AUDIT this repo, run the whole flow in one go — do NOT stop to ask between these safe, expected steps: a. Project: new repo with no Cran project yet, OR the default project errors? → cran_ensure_project named for the repo (e.g. its folder name) + cran_use_project, so workflows land in a project tied to THIS repo, never an unrelated default. Otherwise use the default / the repo's linked project. b. Register call-sites: cran_scan_codebase → read EVERY candidate file (all hinted lines) → cran_submit_manifest. Be exhaustive: one workflow per distinct LLM call site (a file can have many). For each, also record: downstream_consumers (copy the candidate's "consumed by" list — these become the pipeline edges), is_helper (true for candidates the scan marked HELPER — shared utilities, not stages), endpoints (the routes/surfaces that invoke it, from the scan's "served by"), and feature (a short label like "Post generation"). Scan-then-submit is ONE continuous flow; submitting is safe + idempotent (upsert by slug), so never ask "should I submit?". c. Audit: cran_run_architecture_audit — THE default for "run an audit" / "audit my project". It covers the WHOLE project (every workflow) — do not ask which workflow. Summarize the findings and link https://trycran.in/dashboard/architecture. d. Only for a SPECIFIC workflow's model comparison (usually to act on an architecture finding) → cran_run_audit. 5. GO LIVE (deploy) — the consumer's goal once workflows are audited + a model is published: 1. Publish a model per workflow: after an audit, set the winner live (dashboard 'Make it live', or cran_propose_change -> human approves -> cran_apply_proposal). 2. Wire the app (a code change you CAN make): point the OpenAI/SDK client at OPENAI_BASE_URL + OPENAI_API_KEY read from env, and use model: "auto" at every call site - never hardcode the key. 3. Get the connection key: cran_link_repo (writes .env) or the dashboard Deploy page. Read scope, routing only. 4. Hand the deploy to the USER: tell them to set OPENAI_API_KEY + OPENAI_BASE_URL in their host (e.g. Vercel -> Settings -> Environment Variables, Production) and redeploy. Do not set their production secrets yourself. 5. Verify: open the dashboard Deploy page and send one request - it flips to 'you're live' and the response carries an x-cran-model header. After this, change models/prompts from the dashboard with NO redeploy. Security: only the connection key (cran_…) goes in the app (as OPENAI_API_KEY); the cran login session is agent-only — never in app env, never committed. Change code to READ the key from env; tell the USER to set the production secret in their host. ------------------------------------------------------------------------ ONBOARDING DECISION TREE (cran_connect / cran_onboard statuses) ------------------------------------------------------------------------ [needs_login] Agent: Ask the user to run `cran login` once in a terminal and approve in the browser. One account login connects Cran for EVERY repo — there is no per-project linking. Tell user: Cran needs a one-time browser login. Run `cran login`, approve in the browser, then ask me to use Cran again. [account_ready] Agent: Connected via account login — no per-repo link needed. Project tools (workflows, audits, proposals, limits) target the user's DEFAULT project. Call cran_list_projects to see all and cran_use_project to switch. To register THIS repo's call sites: cran_scan_codebase → cran_submit_manifest. cran_link_repo is OPTIONAL — only to route the app's live traffic through the proxy. Tell user: You're connected to Cran. I'll wire this product's AI calls through Cran and register them - connect a provider key in the dashboard (Settings → AI providers) so it can run. [already_linked] Agent: This repo already has proxy routing env (OPENAI_API_KEY + OPENAI_BASE_URL in .env). Scaffold LLM clients with model: "auto". Do NOT re-link. Tell user: This repo is already wired to route traffic through Cran. I'll use model: "auto". ------------------------------------------------------------------------ MCP TOOLS (in order of onboarding) ------------------------------------------------------------------------ - cran_connect → User says use Cran - entry point; returns onboarding status (account_ready when logged in). - cran_onboard → Same assessment as cran_connect. - cran_list_projects → List the user's Cran projects. - cran_use_project → Switch the active project for this session (id or slug). Omit to use the default. No files written. - cran_ensure_project → Create or find a project. Use for a NEW repo (name it after the repo) so its workflows don't land in an unrelated default project. - cran_scan_codebase → STEP 1 — discover ALL LLM call sites locally (source never uploaded); per workflow record feeds_into (data-flow) + endpoints/feature (which app surface it serves). Be exhaustive. Always follow immediately with cran_submit_manifest. - cran_submit_manifest → STEP 2 — register the scanned workflows. Safe + idempotent (upsert by slug); run it right after scanning, never ask to confirm. - cran_run_architecture_audit → THE default audit — run for 'run an audit' / 'audit my project'. Reviews the WHOLE project's AI architecture (every workflow); don't ask which workflow. - cran_run_audit → Per-workflow MODEL benchmark for ONE workflow (NOT the project audit) — use to act on an architecture finding. - cran_link_repo → OPTIONAL: route live traffic — mint a connection key + write .env. Not needed for scan/audit/manage. Install MCP: npm i -g cran-cli && cran login && cran mcp install claude-code ------------------------------------------------------------------------ CLI COMMANDS (fallback when MCP unavailable) ------------------------------------------------------------------------ - cran login → One-time browser auth → ~/.cran/session.json (connects Cran for every repo) - cran mcp install claude-code → Add Cran MCP to your IDE (claude-code | cursor | claude | windsurf | codex) after login. Works on your default project. - cran projects list → List your Cran products - cran link [--team SLUG] [--project NAME] → OPTIONAL: mint a connection key + write .env to route live traffic - cran init → Write .env.example and .cran template (only when routing traffic) ------------------------------------------------------------------------ GO LIVE (DEPLOY) — route the app's traffic through Cran ------------------------------------------------------------------------ This is the consumer's goal: once workflows are registered + audited and a model is published (dashboard "Make it live", or cran_propose_change -> approve -> cran_apply_proposal), route the app's live traffic through Cran so model: "auto" serves it. Connecting the MCP (cran login) is separate + already done. Get a connection key (cran_link_repo or the dashboard Deploy page) and set: OPENAI_API_KEY=cran_… # Cran connection key - NOT an OpenAI sk- key OPENAI_BASE_URL=https://trycran.in/api/v1 Every LLM call: model: "auto" # Cran routes to published architecture baseURL / base_url → OPENAI_BASE_URL Node example: import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, baseURL: process.env.OPENAI_BASE_URL, }); await client.chat.completions.create({ model: "auto", messages: [{ role: "user", content: "Hello" }], }); Then HAND THE DEPLOY TO THE USER (you can change code, but never set their production secrets): tell them to put OPENAI_API_KEY + OPENAI_BASE_URL in their host (e.g. Vercel -> Settings -> Environment Variables, Production) and redeploy. Verify: open the dashboard Deploy page + send one request -> it flips to "you're live" and the response has an x-cran-model header. After that, change models / prompts from the dashboard with NO redeploy. Staging vs prod: Use two Cran projects (e.g. app-staging, app-prod) with separate connection keys; map Preview -> staging, Production -> prod. SECURITY (two credentials — never mix): - Connection key (cran_…) -> the app, as OPENAI_API_KEY. Routing only, read scope. - cran login session (~/.cran/session.json) -> agent/CLI ONLY. Never in app env, never committed. Read the key from env; never hardcode it or commit .env. ------------------------------------------------------------------------ NEVER DO ------------------------------------------------------------------------ - Do not add OpenAI/Anthropic/Google provider API keys to the user's app when routing through Cran. - Do not run cran_link_repo / cran link just to use the MCP - the account login already connects it. Link only to route live traffic, and don't re-link if .env already has a connection key. - Do not skip team or project selection when the API returns team_required or project_required. - Do not upload source code in manifests - only paths, configs, and sample inputs. - Do not put the `cran login` session (~/.cran/session.json) in the app's environment or commit it - it authenticates the agent/CLI only. The ONLY credential that belongs in the deployed app is the connection key (cran_…), as OPENAI_API_KEY. - Do not hardcode the connection key or commit .env - read it from the environment, and tell the USER to set the production secret in their host themselves; never plant a customer's production secret. ------------------------------------------------------------------------ OPTIONAL DEEP WORK (after connected) ------------------------------------------------------------------------ - Fetch manifest schema: GET https://trycran.in/api/agent-manifest.schema.json - cran_scan_codebase → read files locally → cran_submit_manifest - cran_run_audit → cran_get_routing_policy - Full protocol reference: https://trycran.in/docs/agents ------------------------------------------------------------------------ OPTIONAL - AUDIT API (after connected + workflows registered) ------------------------------------------------------------------------ Use audits when the team wants proof of which model to ship for a workflow. Do NOT run audits before the user is connected unless they explicitly ask. Model catalog (85 models): - openai/gpt-5.5 · GPT-5.5 · ctx 1,050,000 · $5/M in · $30/M out - openai/gpt-5.5-pro · GPT-5.5 Pro · ctx 1,050,000 · $30/M in · $180/M out - openai/gpt-5.4 · GPT-5.4 · ctx 1,050,000 · $2.5/M in · $15/M out - openai/gpt-5.4-pro · GPT-5.4 Pro · ctx 1,050,000 · $30/M in · $180/M out - openai/gpt-5.4-mini · GPT-5.4 mini · ctx 272,000 · $0.75/M in · $4.5/M out - openai/gpt-5.4-nano · GPT-5.4 nano · ctx 272,000 · $0.2/M in · $1.25/M out - openai/gpt-5.2 · GPT-5.2 · ctx 272,000 · $1.75/M in · $14/M out - openai/gpt-5.2-pro · GPT-5.2 Pro · ctx 272,000 · $21/M in · $168/M out - openai/gpt-5.1 · GPT-5.1 · ctx 272,000 · $1.25/M in · $10/M out - openai/gpt-5 · GPT-5 · ctx 272,000 · $1.25/M in · $10/M out - openai/gpt-5-mini · GPT-5 mini · ctx 272,000 · $0.25/M in · $2/M out - openai/gpt-5-nano · GPT-5 nano · ctx 272,000 · $0.05/M in · $0.4/M out - openai/gpt-5-pro · GPT-5 Pro · ctx 128,000 · $15/M in · $120/M out - openai/gpt-4.1 · GPT-4.1 · ctx 1,047,576 · $2/M in · $8/M out - openai/gpt-4.1-mini · GPT-4.1 mini · ctx 1,047,576 · $0.4/M in · $1.6/M out - openai/gpt-4.1-nano · GPT-4.1 nano · ctx 1,047,576 · $0.1/M in · $0.4/M out - openai/gpt-4o · GPT-4o · ctx 128,000 · $2.5/M in · $10/M out - openai/gpt-4o-mini · GPT-4o mini · ctx 128,000 · $0.15/M in · $0.6/M out - openai/o3 · o3 · ctx 200,000 · $2/M in · $8/M out - openai/o3-pro · o3-pro · ctx 200,000 · $20/M in · $80/M out - openai/o3-mini · o3-mini · ctx 200,000 · $1.1/M in · $4.4/M out - openai/o4-mini · o4-mini · ctx 200,000 · $1.1/M in · $4.4/M out - openai/o1 · o1 · ctx 200,000 · $15/M in · $60/M out - anthropic/claude-fable-5 · Claude Fable 5 · ctx 1,000,000 · $10/M in · $50/M out - anthropic/claude-opus-4-8 · Claude Opus 4.8 · ctx 1,000,000 · $5/M in · $25/M out - anthropic/claude-sonnet-5 · Claude Sonnet 5 · ctx 1,000,000 · $2/M in · $10/M out - anthropic/claude-opus-4-7 · Claude Opus 4.7 · ctx 1,000,000 · $5/M in · $25/M out - anthropic/claude-opus-4-6 · Claude Opus 4.6 · ctx 1,000,000 · $5/M in · $25/M out - anthropic/claude-opus-4-5 · Claude Opus 4.5 · ctx 200,000 · $5/M in · $25/M out - anthropic/claude-opus-4-1 · Claude Opus 4.1 · ctx 200,000 · $15/M in · $75/M out - anthropic/claude-sonnet-4-6 · Claude Sonnet 4.6 · ctx 1,000,000 · $3/M in · $15/M out - anthropic/claude-sonnet-4-5 · Claude Sonnet 4.5 · ctx 200,000 · $3/M in · $15/M out - anthropic/claude-sonnet-4 · Claude Sonnet 4 · ctx 1,000,000 · $3/M in · $15/M out - anthropic/claude-3-7-sonnet · Claude 3.7 Sonnet · ctx 200,000 · $3/M in · $15/M out - anthropic/claude-haiku-4-5 · Claude Haiku 4.5 · ctx 200,000 · $1/M in · $5/M out - anthropic/claude-3-haiku · Claude 3 Haiku · ctx 200,000 · $0.25/M in · $1.25/M out - google/gemini-3.1-pro · Gemini 3.1 Pro · ctx 1,048,576 · $2/M in · $12/M out (preview) - google/gemini-3-pro · Gemini 3 Pro · ctx 1,048,576 · $2/M in · $12/M out (preview) - google/gemini-3.5-flash · Gemini 3.5 Flash · ctx 1,048,576 · $1.5/M in · $9/M out - google/gemini-3-flash · Gemini 3 Flash · ctx 1,048,576 · $0.5/M in · $3/M out (preview) - google/gemini-3.1-flash-lite · Gemini 3.1 Flash Lite · ctx 1,048,576 · $0.25/M in · $1.5/M out (preview) - google/gemini-2.5-pro · Gemini 2.5 Pro · ctx 1,048,576 · $1.25/M in · $10/M out - google/gemini-2.5-flash · Gemini 2.5 Flash · ctx 1,048,576 · $0.3/M in · $2.5/M out - google/gemini-2.5-flash-lite · Gemini 2.5 Flash Lite · ctx 1,048,576 · $0.1/M in · $0.4/M out - google/gemini-2.0-flash · Gemini 2.0 Flash · ctx 1,048,576 · $0.1/M in · $0.4/M out - google/gemini-2.0-flash-lite · Gemini 2.0 Flash Lite · ctx 1,048,576 · $0.075/M in · $0.3/M out - xai/grok-4 · Grok 4 · ctx 256,000 · $3/M in · $15/M out - xai/grok-3-mini · Grok 3 Mini · ctx 131,072 · $0.3/M in · $0.5/M out - groq/llama-3.3-70b-versatile · Llama 3.3 70B (Groq) · ctx 131,072 · $0.59/M in · $0.79/M out - groq/llama-3.1-8b-instant · Llama 3.1 8B (Groq) · ctx 131,072 · $0.05/M in · $0.08/M out - mistral/mistral-large-latest · Mistral Large · ctx 131,072 · $2/M in · $6/M out - mistral/mistral-small-latest · Mistral Small · ctx 131,072 · $0.1/M in · $0.3/M out - deepseek/deepseek-chat · DeepSeek V3 · ctx 128,000 · $0.27/M in · $1.1/M out - deepseek/deepseek-reasoner · DeepSeek R1 · ctx 128,000 · $0.55/M in · $2.19/M out - together/llama-3.3-70b-instruct-turbo · Llama 3.3 70B (Together) · ctx 131,072 · $0.88/M in · $0.88/M out - together/qwen2.5-72b-instruct-turbo · Qwen 2.5 72B (Together) · ctx 32,768 · $1.2/M in · $1.2/M out - fireworks/llama-v3p3-70b-instruct · Llama 3.3 70B (Fireworks) · ctx 131,072 · $0.9/M in · $0.9/M out - fireworks/kimi-k2-instruct · Kimi K2 (Fireworks) · ctx 131,072 · $0.6/M in · $2.5/M out - cohere/command-a · Command A · ctx 256,000 · $2.5/M in · $10/M out - azure/gpt-4o · GPT-4o (Azure) · ctx 128,000 · $2.5/M in · $10/M out - azure/gpt-4o-mini · GPT-4o mini (Azure) · ctx 128,000 · $0.15/M in · $0.6/M out - azure/gpt-4.1 · GPT-4.1 (Azure) · ctx 1,047,576 · $2/M in · $8/M out - openrouter/auto · OpenRouter Auto · ctx 128,000 · $5/M in · $15/M out - openrouter/llama-3.3-70b-instruct · Llama 3.3 70B (OpenRouter) · ctx 131,072 · $0.3/M in · $0.4/M out - perplexity/sonar-pro · Sonar Pro · ctx 200,000 · $3/M in · $15/M out - perplexity/sonar · Sonar · ctx 128,000 · $1/M in · $1/M out - cerebras/llama-3.3-70b · Llama 3.3 70B (Cerebras) · ctx 128,000 · $0.85/M in · $1.2/M out - cerebras/gpt-oss-120b · GPT-OSS 120B (Cerebras) · ctx 128,000 · $0.35/M in · $0.75/M out - sambanova/llama-3.3-70b · Llama 3.3 70B (SambaNova) · ctx 128,000 · $0.6/M in · $1.2/M out - nvidia/llama-3.3-70b-instruct · Llama 3.3 70B (NVIDIA NIM) · ctx 128,000 · $0.3/M in · $0.3/M out - huggingface/llama-3.3-70b-instruct · Llama 3.3 70B (Hugging Face) · ctx 128,000 · $0.4/M in · $0.4/M out - hyperbolic/llama-3.3-70b-instruct · Llama 3.3 70B (Hyperbolic) · ctx 131,072 · $0.4/M in · $0.4/M out - novita/llama-3.3-70b-instruct · Llama 3.3 70B (Novita) · ctx 131,072 · $0.39/M in · $0.39/M out - moonshot/kimi-k2-turbo · Kimi K2 Turbo · ctx 256,000 · $0.6/M in · $2.5/M out - moonshot/kimi-k2-thinking · Kimi K2 Thinking · ctx 256,000 · $0.6/M in · $2.5/M out - qwen/qwen-max · Qwen Max · ctx 131,072 · $1.6/M in · $6.4/M out - qwen/qwen-plus · Qwen Plus · ctx 131,072 · $0.4/M in · $1.2/M out - zhipu/glm-4.6 · GLM-4.6 · ctx 200,000 · $0.6/M in · $2.2/M out - openai/text-embedding-3-small · Embedding 3 Small · ctx 8,191 · $0.02/M in · $0/M out - openai/text-embedding-3-large · Embedding 3 Large · ctx 8,191 · $0.13/M in · $0/M out - google/gemini-embedding · Gemini Embedding · ctx 2,048 · $0.15/M in · $0/M out - cohere/embed-v4 · Cohere Embed v4 · ctx 128,000 · $0.12/M in · $0/M out - openai/gpt-image-1 · GPT Image 1 · ctx 0 · $0/M in · $0/M out - openai/dall-e-3 · DALL·E 3 · ctx 0 · $0/M in · $0/M out - google/imagen-4 · Imagen 4 · ctx 0 · $0/M in · $0/M out (preview) Available on this deployment: - openai/gpt-5.5 - openai/gpt-5.5-pro - openai/gpt-5.4 - openai/gpt-5.4-pro - openai/gpt-5.4-mini - openai/gpt-5.4-nano - openai/gpt-5.2 - openai/gpt-5.2-pro - openai/gpt-5.1 - openai/gpt-5 - openai/gpt-5-mini - openai/gpt-5-nano - openai/gpt-5-pro - openai/gpt-4.1 - openai/gpt-4.1-mini - openai/gpt-4.1-nano - openai/gpt-4o - openai/gpt-4o-mini - openai/o3 - openai/o3-pro - openai/o3-mini - openai/o4-mini - openai/o1 Run audit: POST https://trycran.in/api/audits Authorization: Bearer cran_ Fetch audit: GET https://trycran.in/api/audits/ List audits: GET https://trycran.in/api/audits?limit=20 Manifest schema: GET https://trycran.in/api/agent-manifest.schema.json OpenAPI: GET https://trycran.in/api/openapi.json Full agent protocol: https://trycran.in/docs/agents ------------------------------------------------------------------------ END ------------------------------------------------------------------------