KMYAIKMYAI
TürkçeLog inGet tokens

API

Claude API: one key, pay for what you use

A KMYAI key is all you need to use Claude models in your own app, bot or automation. The same key works for GPT, Gemini, Grok and DeepSeek, so you tune price and quality per task by changing the model name.

🧾 No separate bill

No monthly minimum and no usage invoice. Buy a token plan and use it until it runs out.

🔁 Model freedom

Switch between Opus, Sonnet, Haiku or another provider's model with the same code.

🧰 Familiar SDKs

The official OpenAI and Anthropic SDKs work without code changes.

📊 Transparent usage

Every request appears on your Usage page with its model, input / output tokens and cost.

Endpoints

RequestDescription
POST https://kmyai.cloud/api/v1/chat/completionsOpenAI-compatible; streaming and tool calling supported
POST https://kmyai.cloud/api/v1/messagesAnthropic-compatible (Messages API)
GET https://kmyai.cloud/api/v1/modelsModels available to your account

With the Anthropic SDKs set base_url to https://kmyai.cloud/api; the SDK appends /v1/messages itself.

Examples

  1. 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!"}]}'
  2. 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)
  3. 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)
  4. JavaScript / Node

    js
    // npm install openai
    import OpenAI from "openai";
    const client = new OpenAI({ baseURL: "https://kmyai.cloud/api/v1", apiKey: "YOUR_KMYAI_KEY" });
    const r = await client.chat.completions.create({ model: "claude-sonnet-5-5", messages: [{ role: "user", content: "Hello!" }] });
    console.log(r.choices[0].message.content);

Ways to lower your cost

You don't need the strongest model for every job: for classification, summarizing and simple transformations Haiku or DeepSeek is usually enough and has a much lower multiplier.

Keep long system prompts and fixed context at the start of the message and cap output length with max_tokens. The calculator on the pricing page shows current multipliers and cost per message.

Frequently asked questions

Is this the official Anthropic API?

No. KMYAI is an independent service that provides access to Claude models through Anthropic-compatible and OpenAI-compatible endpoints.

Which Claude models are available?

The enabled versions of the Opus, Sonnet and Haiku families. The current list and multipliers are on the Claude page and the pricing page.

Can I use it in production?

It suits personal projects, bots and internal tools. For critical systems that need an uptime commitment we recommend planning a fallback provider.

Can I send images?

On vision-capable models you can attach images to a message; the model list marks which models support it.

How do I pay?

Buy a token plan with your card in the app. Tokens are added to your balance instantly and never expire.

Related pages

Get started

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