Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
This repository was archived by the owner on Sep 23, 2026. It is now read-only.

Please make your kimi code api work as OpenAI-compatible API #2208

Open

Description

@janeza2

What feature would you like to see?

I love your kimi k2.6 so much i hope it can directly use in cursor with OpenAI-compatible base url
thanks

Additional information

No response

Activity

  1. haocn-ops commented on May 12, 2026

    @haocn-ops

    Supporting an OpenAI-compatible /v1 endpoint would make this much easier to use from Cursor and other coding tools, because users could configure it with the same base_url + API key shape they already use elsewhere.

    A common config shape is:

    OPENAI_BASE_URL=https://example.com/v1
    OPENAI_API_KEY=...
    OPENAI_MODEL=kimi-k2.6

    Then Cursor / SDK clients can keep one OpenAI-compatible integration path instead of a provider-specific plugin.

    I have a small examples repo that shows the base_url pattern for Cursor, Claude Code, Codex, SDKs, and curl; it may be useful as a reference for the docs if Kimi exposes an OpenAI-compatible endpoint:

    https://github.com/apinode-pro/openai-compatible-ai-gateway-examples

  2. janeza2 commented on May 12, 2026

    @janeza2
    Author

    here's what i found when i trying to use in cursor

    Image

    then i tried it on postman so i got this

    Image
  3. haocn-ops commented on May 26, 2026

    @haocn-ops

    From the screenshots, the request is reaching Kimi but is being rejected by that specific endpoint.

    Cursor is configured with:

    https://api.kimi.com/coding/v1
    

    and the Postman request goes to:

    https://api.kimi.com/coding/v1/chat/completions
    

    The response is 403 Forbidden with:

    {
      "error": {
        "message": "Kimi For Coding is currently only available for Coding Agents such as Kimi CLI, Claude Code, Roo Code, Kilo Code, etc.",
        "type": "access_terminated_error"
      }
    }

    So this does not look like a JSON/body-format problem. It looks like /coding/v1 is an access-restricted product endpoint, not a general OpenAI-compatible endpoint for arbitrary clients.

    For Cursor/OpenAI-compatible usage, the docs probably need to clarify one of these paths:

    1. If Kimi exposes a general OpenAI-compatible API, document that separate base URL, supported model names, and whether Cursor is allowed.
    2. If https://api.kimi.com/coding/v1 is intentionally limited to Kimi CLI / Claude Code / Roo Code / Kilo Code, document that it is not expected to work from Cursor’s generic OpenAI override.
    3. If Cursor should be supported, the server-side allowlist/client detection is probably what needs changing, because the request shape already reaches /chat/completions and fails at access control.
  4. janeza2 commented on May 31, 2026

    @janeza2
    Author

    the reason that i show you Postman request: https://api.kimi.com/coding/v1/chat/completions
    because I want to prove that kimi code doesn't support OpenAI-compatible right now

    this open issue is basically feature request to kimi team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions