QUICKSTART

Connection guide

Set the endpoint, API key, and model name to get started.

OPENAI COMPATIBLE

OpenAI format / Codex

https://api.ai.portomo.com/v1

Include /v1 in the Base URL.

ANTHROPIC COMPATIBLE

Anthropic format / Claude Code

https://api.ai.portomo.com

Do not append /v1 to the Base URL.

OPENAI COMPATIBLE

Cursor

https://api.ai.portomo.com/v1

Include /v1 in the Base URL.

Ready-to-use connection examples

YOUR_API_KEY should be replaced with your issued key.

Terminal · bash / zsh
export AIGATEWAY_API_KEY="YOUR_API_KEY"

curl https://api.ai.portomo.com/v1/chat/completions \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [{"role": "user", "content": "Hello"}],
    "max_tokens": 256
  }'
DECISION MODELS

Decision models (API only)

These return probabilities, choices, or scores from input and questions. They are not listed in client model pickers. Use the API shown for each model below.

/v1/decisions

gpt-6-luna-decisions support text and images, but not streaming.

Terminal · bash / zsh
export AIGATEWAY_API_KEY="YOUR_API_KEY"

curl https://api.ai.portomo.com/v1/decisions \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna-decisions",
    "input": "All tests passed; a security review is still pending.",
    "questions": [
      {"type": "predicate", "name": "ready", "instructions": "Is this change ready to deploy without further review?"}
    ]
  }'

Provide questions as an array, using types predicate・choice・score. For images, use messages in input with input_image and a Base64 data URL. Up to 32 questions and a 4 MiB body are allowed. Do not send these to the standard Chat Completions or Responses API.

/v1/systemone

clef・clef-flash・jev-latest require a state (state) and a questions object.

Terminal · bash / zsh
export AIGATEWAY_API_KEY="YOUR_API_KEY"

curl https://api.ai.portomo.com/v1/systemone \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "clef",
    "state": "All tests passed; a security review is still pending.",
    "questions": {
      "ready": {"type": "noul", "instructions": "Is this change ready to deploy without further review?"},
      "next": {"type": "choice", "instructions": "What should happen next?",
               "criteria": {"deploy": "Deploy now", "review": "Wait for the security review"}},
      "risk": {"type": "score", "instructions": "How risky is deploying now?", "criteria": ["low", "medium", "high"]}
    }
  }'

Question types are noul(yes/no probability), choice(choice), and score(a score on a 2–10 level scale). Each request allows up to 32 questions and a 262,144-byte body.

Probabilities are guidance for decisions and must not be treated as permission to execute actions. usage.cost is the amount deducted from your balance (USD).

Troubleshooting

For 401 or 403, check your API key and balance. For 404, check the endpoint and API path. Use the model ID shown in Models & pricing. Never embed your API key in browser JavaScript.