KMYAIKMYAI
TürkçeLog inGet tokens

For developers

Get an API key and connect in 2 minutes

The token balance in your KMYAI account is also an API balance. One key reaches every major model in the format the OpenAI and Anthropic SDKs already speak. Your coding tools and your own programs draw from the same balance.

🔑 One key, every model

Claude, GPT, Gemini, Grok, DeepSeek and more. Switching models means changing a model name, nothing else.

🔌 Both formats

OpenAI-compatible /chat/completions and Anthropic-compatible /messages. In existing code you only change the base URL and the key.

💸 No subscription

No monthly fee and no separate API bill. The balance you use in chat works for the API too, and it never expires.

⚡ Token optimization

Old file contents and command output that coding tools resend on every step are trimmed automatically, so long sessions cost noticeably less.

Connect in three steps

  1. Create a free account and add tokens

    Sign up on KMYAI and buy a token plan. The balance is shared between chat and the API.

  2. Create your API key

    In the app open “VS Code / API” in the menu and press “Create key”. Your key starts with kmy-sk- and is shown in full only once, so store it somewhere safe.

  3. Paste it into your tool or code

    For OpenAI-compatible tools set the Base URL below and use your key as the API key:

    Base URL
    https://kmyai.cloud/api/v1

    For Anthropic-compatible tools such as Claude Code the address is:

    Base URL
    https://kmyai.cloud/api

    Try your first request with cURL:

    bash
    curl https://kmyai.cloud/api/v1/chat/completions \
      -H "Authorization: Bearer YOUR_KMYAI_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Hello!"}]}'

Which tool connects how?

ToolConnection typeGuide
Claude Code (terminal and VS Code)Anthropic · settings fileClaude Code setup →
Cline, Roo Code, Zoo Code, Kilo CodeOpenAI CompatibleCline / Roo setup →
CursorOverride OpenAI Base URLCursor setup →
Continue, OpenCode, Codex CLIOpenAI-compatibleAPI examples →
Your own code (Python, Node, cURL)OpenAI or Anthropic SDKAPI examples →

Code examples

  1. Python (OpenAI SDK)

    python
    # pip install openai
    from openai import OpenAI
    
    client = OpenAI(base_url="https://kmyai.cloud/api/v1", api_key="YOUR_KMYAI_KEY")
    r = client.chat.completions.create(
        model="claude-sonnet-5-5",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(r.choices[0].message.content)
  2. Python (Anthropic SDK)

    python
    # pip install anthropic
    import anthropic
    
    client = anthropic.Anthropic(base_url="https://kmyai.cloud/api", api_key="YOUR_KMYAI_KEY")
    msg = client.messages.create(
        model="claude-sonnet-5-5", max_tokens=1024,
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(msg.content[0].text)

How is usage calculated?

Each request deducts the input and output tokens it used, multiplied by the model's multiplier. Every multiplier and a live calculator are on the pricing page. Coding tools resend the history on every step, so long sessions use more tokens than chat; clearing the session when you start a new task (for example /clear in Claude Code) is the most effective way to save.

Frequently asked questions

Is there a separate fee or subscription for the API?

No. The token balance you use in chat also pays for API requests. There is no separate bill or monthly fee.

Which SDKs does it work with?

The official OpenAI and Anthropic SDKs for Python and JavaScript, and any tool that accepts an OpenAI-compatible base URL. You only change the URL and the key.

Are streaming and tool calling supported?

Yes. Both formats support streaming and tool / function calling, which is what coding agents rely on.

What if my key leaks?

Regenerate it on the API page; the old key stops working immediately. Never commit your key to a public repository or a shared file.

Is there a rate limit?

There is a per-account requests-per-minute limit to prevent abuse. Normal coding and app usage stays well under it.

Related pages

Get started

Create a free account, add tokens and start working with the best models.