Skip to main content

Connecting any tool or code over the API

Explyt Gateway is compatible with the standard OpenAI and Anthropic protocols. This means you can connect any AI tool, IDE plugin, CLI agent, official SDK, or your own code to your Explyt account, as long as it lets you set a custom base URL and API key — even if the tool is not in the list of ready-made guides.

API requests spend credits from the same balance as work in the Explyt JetBrains Plugin or Explyt CLI.

Where to get the connection details​

  1. Sign up at app.explyt.ai and choose the Community plan or a paid plan: the API key is not available on Free (see Plans and balance).

  2. In the Connect to Explyt block, copy two values:

    • OpenAI-compatible URL — https://api.explyt.ai/openai/api (the same address for all users and protocols)
    • API key — your personal key (the Copy key button)

    The Connect to Explyt block in the personal account

Supported APIs​

All three protocols work through the same base URL https://api.explyt.ai/openai/api and the same personal API key:

ProtocolEndpointFull request URL
OpenAI Chat Completions APIPOST /v1/chat/completionshttps://api.explyt.ai/openai/api/v1/chat/completions
OpenAI Responses APIPOST /v1/responseshttps://api.explyt.ai/openai/api/v1/responses
Anthropic Messages APIPOST /v1/messageshttps://api.explyt.ai/openai/api/v1/messages
Base URL format in different tools

Most SDKs and tools append /v1/... to the base address themselves — for them, use https://api.explyt.ai/openai/api. If a tool or HTTP client does not add /v1 automatically, use https://api.explyt.ai/openai/api/v1.

Setup examples​

With environment variables​

Many CLI agents, utilities, and the official OpenAI and Anthropic SDKs read the gateway address and key from environment variables:

export OPENAI_BASE_URL="https://api.explyt.ai/openai/api"
export OPENAI_API_KEY="<YOUR_API_KEY>"

Replace <YOUR_API_KEY> with the personal API key from your personal account.

Sample curl requests​

curl https://api.explyt.ai/openai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "OpenAI/gpt-6.1-sol",
"messages": [
{"role": "user", "content": "Hi! Write a short sorting function in Python."}
]
}'

For the Anthropic protocol, you can authenticate either with the Authorization: Bearer <YOUR_API_KEY> header or with x-api-key: <YOUR_API_KEY>.

Available models​

Main recommended models:

  • autobalanced: automatic selection among mid-range models, available on every plan
  • autofrontier: automatic selection among frontier models, Personal plan and higher
  • Anthropic/opus-5.5: Anthropic model with high-quality answers, Personal plan and higher
  • Anthropic/sonnet-5.5: balance of quality and speed among Anthropic models, Personal plan and higher
  • OpenAI/gpt-6.1-sol: general-purpose OpenAI model, Personal plan and higher

To get the full up-to-date list of models, send a request to https://api.explyt.ai/openai/api/models:

curl https://api.explyt.ai/openai/api/models \
-H "Authorization: Bearer <YOUR_API_KEY>"

For more on choosing models and automatic selection modes, see Models and automatic model selection and the connections overview.

Error codes​

Typical gateway responses (401 Unauthorized, 429 Too Many Requests, model not found) and how to fix them are covered on the Error messages page.