shibz
October 25, 2024, 4:39pm
1
How can I use a custom model with my own API?
Xai API was released, and their model is grok-beta.
How can I use this?
Cursor does not have a spot to add my API key for my custom model.
See picture.
here are Xai docs for integration: Welcome to the xAI documentation
1 Like
Hi @shibz
You can use this model via OpenRouter:
Grok isn’t currently available native to Cursor but you can use the OpenRouter connector by supplying the OpenRouter URL as the “Custom OpenAI URL” in Cursor’s settings. You can then add Grok as a LLM option in Cursor.
Note that this will bypass Cursor’s subscription entirely, and your queries will be billing via OpenRouter at their rate.
2 Likes
You can try adding your API key too. Just change the base URL to https://api.x.ai/v1
, add your API key, and add the grok-beta
model to the model list.
1 Like
shibz
October 28, 2024, 8:18pm
4
I hoped this would work, but unfortunately not. I tried to add a custom js file and have the model use it, but that does not work either.
Thanks for the other tip via, but not interested in the OpenRouter if it bypasses Cursor’s subscription entirely.
Verifying cuustom URL API keys would always fail for me with even with Open Router until I disabled the cursor-small model. I think this could be handled better by Cursor.
I was able to get my xAI key to verify by disabling every model except for:
grok-beta
FYI: Use this model name if you want it to work with Open Router.
x-ai/grok-beta
4 Likes