Custom api model

I have a key from the kimi k2 api

how can I use it inside cursor ai?

Hey, you need to add your API key in the Cursor settings, override the base URL, and add the model to the list of models.

https://platform.moonshot.ai/docs/guide/start-using-kimi-api

and if my key is located at https://kimi-k2.ai/api/v1?

Oh, if your API differs from the one I mentioned above, you can try entering this URL as the base URL, add your API key, and the model as specified on the website.

does the custom name of the AI model matter? or is it visually in the cursor

For the model to work with your API key, its name must exactly match the name as specified by the API provider.

for some reason it didn’t work

i entered all the parameters, but after clicking the “verify” button, it seems to be verifying for a few seconds, and then nothing happens

This API might be incompatible with Cursor. Also, can you check the DevTools panel for any errors?

how can i check DevTools panel?

Open the command palette and enter devtools.

Try removing the trailing slash from the URL https://kimi-k2.ai/api/v1, the URL should be like this, not like https://kimi-k2.ai/api/v1/.


same
but why https://kimi-k2.ai/api/v1/chat/completions if link is https://kimi-k2.ai/api/v1

Unfortunately, it seems this URL returns a 404 error. I recommend contacting the API provider directly, as this is not a Cursor issue.

I wrote a simple python script that accesses https://kimi-k2.ai/api/v1/
it correctly displays the response from the AI

I still recommend contacting the provider so they can try to fix it, as their API isn’t compatible with Cursor. Unfortunately, not every API provider can work with Cursor.

The officially supported ones are:

  • OpenRouter
  • OpenAI
  • Anthropic
  • Google
  • Azure
  • AWS Bedrock