IN ENGLISH · TOOL GUIDES

Tool guides

A 1xai-*key is not only for code you write yourself. Any tool that accepts a custom base URL (a code editor, an automation platform, a self-hosted chat interface) works with the same key and the same Toman bill. Each guide below has the steps, a configuration to copy, a recommended model and the fixes for that tool's common errors.

[01]GUIDES

One guide per tool

  • Cursor

    IDE. Step by step: connect the Cursor editor to GPT, Claude and Gemini models from Iran with a 1xAi key, by overriding the base URL. No VPN, no foreign card, billed in Toman.

  • Claude Code

    CLI coding agent. Run Claude Code from Iran with two environment variables: ANTHROPIC_BASE_URL on 1xAi's native route and ANTHROPIC_AUTH_TOKEN with a 1xai-* key. No Anthropic account, no VPN, billed in Toman.

  • n8n

    Automation. Use the OpenAI node, AI Agent and LLM chains of n8n from Iran: one OpenAI credential with the base URL https://1xai.ir/v1 and a 1xAi key. Billed in Toman.

  • Cline

    VS Code coding agent. Set up the Cline coding agent in VS Code from Iran: the OpenAI Compatible provider, the base URL https://1xai.ir/v1 and a 1xAi key. Billed in Toman, with a spend cap per key.

  • Open WebUI

    Self-hosted chat interface. Run Open WebUI against 1xAi: two environment variables, OPENAI_API_BASE_URL=https://1xai.ir/v1 and OPENAI_API_KEY, and the models of ten vendors appear in one self-hosted chat.

  • LibreChat

    Self-hosted chat interface. Define 1xAi once as a custom endpoint in librechat.yaml (baseURL https://1xai.ir/v1, the key in .env) and the models of ten vendors are available in LibreChat, billed in Toman.

  • Continue

    VS Code and JetBrains coding assistant. Configure the Continue coding assistant for VS Code and JetBrains against 1xAi: one block per model in config.yaml with provider openai, apiBase https://1xai.ir/v1 and a 1xAi key.

[02]THE TWO SETTINGS

What every tool needs

The base URL https://1xai.ir/v1 (or https://1xai.ir/anthropic for tools that speak Anthropic's API, such as Claude Code), and a 1xai-* key from the dashboard. The rest of the API is in the documentation.

1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.