Questa guida è stata aggiornata ed è per ora disponibile solo in inglese.

Use JuiceFactory in Cursor with your own API key

Cursor lets you add your own API key and send OpenAI-compatible requests to another endpoint. This guide connects Cursor to JuiceFactory so that Ask and Plan mode run on qwen3.8-27b, an open-weight Qwen model on JuiceFactory's own hardware in Sweden. It also covers what the setup does not change: Cursor still routes every request through its own servers, and Agent mode and Tab completion keep using Cursor's own models.

What you need

  • A JuiceFactory account. New verified accounts get starter credit for up to 100 standard API requests; no payment card is needed for that test.
  • An API key from the portal. Keys look like pk_live_….
  • Cursor, with access to Cursor Settings → Models.

Step 1: check that your key works

curl https://api.juicefactory.ai/v1/chat/completions \
  -H "Authorization: Bearer $JUICEFACTORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3.8-27b", "messages": [{"role": "user", "content": "Say OK."}]}'

A JSON response with a choices array means the key and the model work.

Step 2: connect Cursor

  1. Open Cursor Settings → Models and go to API Keys.
  2. Paste your JuiceFactory key into the OpenAI API Key field.
  3. Turn on Override OpenAI Base URL and enter https://api.juicefactory.ai/v1.
  4. Add a custom model named qwen3.8-27b and choose it in the chat.

Cursor moves settings between versions. If a field is not where this guide says, look for the OpenAI API key and base URL settings under Models.

What works and what does not

Cursor featureWith your JuiceFactory key
Ask and Plan mode (chat)Runs on qwen3.8-27b
Agent modeUses Cursor's own models
Tab completionUses Cursor's own models

Cursor's documentation states that custom API keys only work with chat models and that Tab completion keeps using Cursor's built-in models. While the base URL override is on, Cursor can also send requests for its own models to that URL; turn the override off if Cursor's built-in models start returning errors.

Where your code goes

Cursor's documentation states that every request, also with your own key, is routed through Cursor's servers for final prompt building before it reaches the model provider. With this setup your prompts and code therefore pass Cursor's infrastructure on the way to JuiceFactory. JuiceFactory processes them in Sweden and does not store them or train on them, but the path as a whole is not EU-only.

If your code must not leave the EU, use an editor extension that lets you set an OpenAI-compatible base URL and sends requests from your machine directly to https://api.juicefactory.ai/v1.

Cost

qwen3.8-27b costs €1.00 per million input tokens and €2.50 per million output tokens, excluding VAT, drawn from prepaid credits. A chat question with 2,000 tokens of code as context and a 500-token answer costs about €0.003. The current list is at GET /v1/models.

Troubleshooting

  • 401 Invalid API key: the key is wrong or revoked. Create a new one in the portal.
  • 404 Model not found: the model name must be exactly qwen3.8-27b. The error lists the available models. The older names qwen3.5-27b and qwen3-27b still reach the same model.
  • 402: the account is out of credit. Add credits in the portal.
  • Cursor's built-in models fail: turn off Override OpenAI Base URL while you use them.

Questions about data processing or larger volumes: legal@juicefactory.ai.

Frequently asked questions

Does Agent mode use my JuiceFactory key?

No. Cursor uses custom API keys for chat (Ask and Plan mode). Agent mode and Tab completion use Cursor's own models.

Do my prompts stay in the EU when I use Cursor?

Not entirely. Cursor routes every request through its own servers before it reaches JuiceFactory. JuiceFactory processes the request in Sweden and does not store it, but for an EU-only path use an editor extension that calls the API directly from your machine.

What does it cost?

qwen3.8-27b costs €1.00 per million input tokens and €2.50 per million output tokens, excluding VAT. A typical chat question with 2,000 tokens of context and a 500-token answer costs about €0.003.

Can I get a data processing agreement?

Yes. The DPA is issued on request as a signable PDF: legal@juicefactory.ai.

Try it on the API.

Create an account, add credits and point your client at api.juicefactory.ai/v1.