How to Connect JuiceFactory as BYOK in Cursor AI (2026 Guide)

Setup time: 5 minutes

✓ Works with Claude, GPT-4, Gemini ✓ Your data stays in EU (GDPR-compliant) ✓ Zero markup fees


What is BYOK in Cursor AI?

If you've been using Cursor AI for a while, you've probably noticed that every time you hit Cmd+K or ask for code suggestions, your prompts are being sent somewhere. By default, that "somewhere" is Cursor's own infrastructure, which routes through US-based servers.

BYOK — Bring Your Own Key — changes that. It's a feature in Cursor that lets you keep all the editor's AI superpowers while routing requests through your own infrastructure. Think of it like switching from a shared company car to bringing your own vehicle: same destination, but you control the route and who's driving.

With JuiceFactory as your BYOK provider, your code and prompts never touch US soil. Everything stays in the EU, which means you're not just compliant with GDPR — you're actually living it. No more awkward conversations with your legal team about where that API call with client data really ended up.


Why JuiceFactory for BYOK?

JuiceFactory.ai is an EU-hosted, GDPR-compliant AI inference API that's 100% compatible with the OpenAI API format. That means it works seamlessly with Cursor, Continue.dev, and pretty much any tool that speaks OpenAI's language.

Here's what makes it different:

  • EU infrastructure only: Servers in Stockholm and Frankfurt, not Virginia or Oregon
  • Zero markup pricing: You pay exactly what the underlying model costs — no 2x or 3x multipliers
  • Multi-provider access: Claude, GPT-4, Gemini, Llama, Mistral — all through one API
  • GDPR-native: Built from day one with EU data protection in mind
  • No lock-in: Standard OpenAI format means you can switch anytime

If you're working at a law firm, healthcare startup, or anywhere that handles sensitive data, this isn't just nice to have. It's table stakes.


Cursor Default vs Direct OpenAI vs JuiceFactory BYOK

Let's break down what you're actually getting with each option:

FeatureCursor DefaultDirect OpenAI APIJuiceFactory BYOK
Data locationUS servers (Cursor + OpenAI)US servers (OpenAI)EU servers only
GDPR compliance❌ No DPA available❌ US-based processing✓ Full DPA, EU-only
Cost$20-40/month flatPay-per-token (~$6-120/mo)Pay-per-token (~$6-120/mo)
Model accessLimited to Cursor's selectionOpenAI models onlyClaude, GPT-4, Gemini, Llama
Rate limitsShared across all usersYour own limitsYour own limits
MarkupBuilt into subscriptionNoneNone
Data retention30 days (Cursor policy)30 days (OpenAI policy)0 days (deleted immediately)
Audit logs❌ Not availableBasic usage logsFull request/response logs
Team controlsLimited❌ Individual accountsCentralized team dashboard

The short version: If you're building a side project and don't care about data locality, Cursor's default is fine. If you need GDPR compliance or want to avoid US jurisdiction, JuiceFactory is your best bet.


Step-by-Step Setup

Step 1: Create Your JuiceFactory Account

  1. Head to portal.juicefactory.ai
  2. Sign up with your work email (or personal, if you're freelancing)
  3. Check your inbox and verify your email address

You'll land on the dashboard. First thing you'll notice: no credit card required. We give you 10,000 free tokens to test things out — that's roughly 30-50 code generation requests, depending on how verbose you get.

Step 2: Generate Your API Key

  1. In the portal, click Settings (top-right corner)
  2. Go to API Keys in the sidebar
  3. Click Generate New Key
  4. Give it a name like "Cursor - MacBook Pro" so you remember what it's for
  5. Copy the key — it starts with jf_ and looks like jf_1a2b3c4d5e6f7g8h9i0j

⚠️ Critical: This key won't be shown again. If you lose it, you'll have to generate a new one and update Cursor. Save it in your password manager right now.

Step 3: Configure Cursor AI

Now for the fun part. Open Cursor and let's point it at JuiceFactory:

  1. Open Cursor AI
  2. Hit Cmd+, (Mac) or Ctrl+, (Windows) to open settings
  3. Navigate to Features → Language Models
  4. Toggle on BYOK (Bring Your Own Key)
  5. You'll see two fields:
    • API Base URL: https://api.juicefactory.ai/v1
    • API Key: Paste your JuiceFactory key here (jf_xxxxx)
  6. Click Save

Your config should look like this:

API Base URL: https://api.juicefactory.ai/v1
API Key: jf_1a2b3c4d5e6f7g8h9i0j
Model: claude-3-5-sonnet-20241022

Note on model names: JuiceFactory uses the exact same model identifiers as the providers. So it's claude-3-5-sonnet-20241022 for Claude, gpt-4-turbo for GPT-4, etc. More on this in the next section.

Step 4: Verify the Connection

Time to make sure everything's wired up correctly:

  1. Open any code file (doesn't matter which language)
  2. Press Cmd+K (Mac) or Ctrl+K (Windows) to open the inline assistant
  3. Type something simple like: "Write a hello world function in Python"
  4. Hit Enter

If you see code appear within a few seconds, congrats — you're now running through JuiceFactory's EU infrastructure.

Troubleshooting: If nothing happens or you get an error, jump to the Troubleshooting section below. Common issues: wrong API key format, typo in the base URL, or firewall blocking HTTPS to api.juicefactory.ai.

Success! Your requests are now EU-bound.


Model Selection Guide: Which Model for Which Task?

Cursor uses AI in three main ways: Tab completion, Chat, and Composer (multi-file edits). Each has different performance needs, and choosing the right model for each can save you serious money and time.

Claude 3.5 Sonnet (claude-3-5-sonnet-20241022)

Best for: Chat, Composer, complex refactoring

This is the workhorse. Anthropic's Sonnet is excellent at understanding code context and writing non-trivial logic. Use it for:

  • Multi-file refactors ("update all these components to use the new API")
  • Architectural questions ("how should I structure this feature?")
  • Code reviews (paste a PR diff and ask for feedback)

Cost: ~$3 per million input tokens, ~$15 per million output tokens. For most developers, that's $10-30/month of actual usage.

Speed: ~2-4 seconds for typical chat responses. Fast enough that you don't feel like you're waiting.

GPT-4 Turbo (gpt-4-turbo)

Best for: When you need maximum accuracy or are working with GPT-specific features

GPT-4 is still excellent for general-purpose coding, and if you've got a bunch of GPT-4-tuned prompts or .cursorrules files, it'll feel familiar. Slightly faster than Claude in some cases.

Cost: ~$10 per million input tokens, ~$30 per million output tokens. A bit pricier than Claude.

Speed: ~1-3 seconds for typical responses.

Claude 3 Haiku (claude-3-haiku-20240307)

Best for: Tab completion, quick one-liners, autocomplete

Haiku is Anthropic's lightweight model. It's not going to write you a whole microservice, but for tab completion? Perfect. Super fast, super cheap.

Cost: ~$0.25 per million input tokens, ~$1.25 per million output tokens.

Speed: ~200-500ms. Almost instant.

Gemini Pro (gemini-1.5-pro)

Best for: Long context windows (up to 1M tokens)

If you're working in a massive codebase and need to ask questions about 50 files at once, Gemini's huge context window is unbeatable. It's also competitive on price with Claude.

Cost: ~$1.25 per million input tokens, ~$5 per million output tokens.

Speed: ~3-6 seconds for typical responses (longer for huge context).

Recommended Setup

Here's what works well in practice:

  • Chat: claude-3-5-sonnet-20241022 (best reasoning)
  • Composer: claude-3-5-sonnet-20241022 (same model for consistency)
  • Tab completion: claude-3-haiku-20240307 (fast and cheap)

You can configure these separately in Cursor's settings under Language Models → Advanced.


Advanced Configuration

Using Different Models for Tab/Chat/Composer

Cursor lets you specify different models for different features. This is huge for cost optimization.

  1. Open Cursor settings (Cmd+,)
  2. Go to Features → Language Models → Advanced
  3. Set:
    • Chat model: claude-3-5-sonnet-20241022
    • Composer model: claude-3-5-sonnet-20241022
    • Tab completion model: claude-3-haiku-20240307

This way, you're using the expensive model only when you need it (complex questions), and the cheap model for rapid-fire autocomplete. This can cut monthly costs by 60-70% for heavy users.

Integrating with .cursorrules

If you're using .cursorrules files to customize how Cursor behaves (e.g., "always use TypeScript strict mode" or "prefer functional components in React"), those still work perfectly with JuiceFactory BYOK.

Example .cursorrules file:

# Project: E-commerce API
# Model: claude-3-5-sonnet-20241022

## Code style
- Use TypeScript strict mode
- Prefer async/await over .then()
- Add JSDoc comments to all exported functions

## Architecture
- Follow hexagonal architecture (ports/adapters)
- Keep business logic in domain layer
- No database calls in controllers

## Testing
- Write tests in Vitest
- Aim for 80% coverage minimum
- Mock external APIs

Just drop this in your project root. Cursor (and JuiceFactory) will use it as context for every request.

Environment Variables for CI/CD

If you're running Cursor as part of a CI/CD pipeline (yes, some teams do this for automated code reviews), you can set the API key via environment variable instead of hardcoding it:

export CURSOR_API_KEY="jf_your_key_here"
export CURSOR_API_BASE="https://api.juicefactory.ai/v1"

Then in your CI config (GitHub Actions example):

- name: Run Cursor AI code review
  env:
    CURSOR_API_KEY: ${{ secrets.JUICEFACTORY_API_KEY }}
    CURSOR_API_BASE: https://api.juicefactory.ai/v1
  run: |
    cursor --review --model claude-3-5-sonnet-20241022

This keeps your API key out of version control.


Security Deep-Dive: What Data Does Cursor Send?

Let's talk about the elephant in the room: what exactly is leaving your machine when you use Cursor with JuiceFactory?

What Cursor Sends to the API

When you use Cursor's AI features, here's what gets transmitted:

  1. Your prompt (e.g., "refactor this function to use async/await")
  2. Surrounding code context (Cursor automatically grabs nearby lines to help the AI understand your code)
  3. File metadata (file name, language, sometimes repository name)

What Cursor does NOT send:

  • Your entire codebase (only the files you're actively working on)
  • Git history or commit messages
  • Environment variables or .env files
  • Anything outside the specific files Cursor thinks are relevant

Data Flow

┌─────────────────┐
│   Your Machine  │
│   (Cursor IDE)  │
└────────┬────────┘
         │ HTTPS (TLS 1.3 encrypted)
         ▼
┌─────────────────┐
│  JuiceFactory   │
│  EU Servers     │
│  (Stockholm/FRA)│
└────────┬────────┘
         │ HTTPS (encrypted)
         ▼
┌─────────────────┐
│  AI Provider    │
│  (Anthropic EU, │
│   OpenAI EU,    │
│   Google EU)    │
└────────┬────────┘
         │ Response returned
         ▼
┌─────────────────┐
│  JuiceFactory   │
│  (no logs kept) │
└────────┬────────┘
         │ HTTPS (encrypted)
         ▼
┌─────────────────┐
│   Your Machine  │
│   (Cursor IDE)  │
└─────────────────┘

Key point: Your data never touches US servers. The entire round trip stays within EU jurisdiction.

What JuiceFactory Sees (and Doesn't Store)

When a request hits JuiceFactory's API:

  1. We see: The prompt and code you sent, the model you're using, your API key (to authenticate)
  2. We log: Request timestamp, token count, model used, response time (for billing and debugging)
  3. We do NOT log: The actual prompt text, code snippets, or AI responses
  4. Retention: Metadata logs are kept for 30 days (for billing disputes), then automatically deleted

You can verify this in the portal under Settings → Privacy → Data Retention Policy.

SSL/TLS and Encryption

All traffic between Cursor, JuiceFactory, and AI providers uses TLS 1.3 with modern ciphers (ECDHE+AESGCM). That means:

  • Nobody can intercept your prompts in transit
  • Your ISP sees "HTTPS traffic to api.juicefactory.ai" but not the content
  • Even if someone compromised our load balancers, they'd only see encrypted blobs

We also support client certificate authentication for enterprise customers. Contact support@juicefactory.ai for details.


Troubleshooting Common Issues

Issue 1: "Connection timeout" or "Request failed"

Symptoms: Cursor hangs for 30+ seconds, then shows an error.

Causes:

  • Your firewall is blocking api.juicefactory.ai
  • You're behind a corporate proxy
  • Your ISP/VPN is having issues

Fix:

  1. Check if you can reach the API manually:

    curl -I https://api.juicefactory.ai/v1/models
    

    If this times out, it's a network issue, not a Cursor issue.

  2. If you're on a corporate network, ask IT to whitelist *.juicefactory.ai (port 443).

  3. Try switching to a different network (mobile hotspot) to isolate the issue.

Issue 2: "Model not found" or "Invalid model"

Symptoms: Error message like Model 'claude-sonnet' not found

Fix: Check the exact model name in the JuiceFactory portal. Common mistakes:

  • claude-sonnet → ✓ claude-3-5-sonnet-20241022
  • gpt4 → ✓ gpt-4-turbo
  • gemini-pro → ✓ gemini-1.5-pro

Model names are case-sensitive and version-specific.

Issue 3: "Rate limit exceeded"

Symptoms: Error message like 429 Too Many Requests

Fix:

  1. Check your current limits in the portal: Settings → API Keys → Rate Limits
  2. If you need higher limits, click Request Increase (usually approved within 1 hour)
  3. For teams: create separate API keys for each developer instead of sharing one

Issue 4: "SSL certificate verification failed"

Fix:

  1. Check your system clock: date (should be accurate to within ~1 minute)
  2. Update Cursor to the latest version
  3. If you're behind a corporate proxy, you might need to install their root CA certificate. Ask your IT team for the "SSL inspection certificate."

Issue 5: "API key invalid or expired"

Symptoms: 401 Unauthorized error

Fix:

  1. Re-copy the API key from the portal (don't retype it)
  2. In Cursor settings, make sure there are no spaces before/after the key
  3. Check the portal: Settings → API Keys — is the key shown as "Active"?

Issue 6: "Slow responses" (10+ seconds)

Fix:

  1. Check your ping to the API:

    ping api.juicefactory.ai
    

    If you're seeing 200+ ms, you might be far from our EU servers.

  2. Switch to a faster model for time-sensitive tasks:

    • claude-3-opus-20240229 (slow but smart)
    • claude-3-5-sonnet-20241022 (fast and smart)
    • claude-3-haiku-20240307 (very fast, good enough for most tasks)
  3. Check the JuiceFactory status page for any ongoing incidents.


GDPR Compliance Explained (For Non-Lawyers)

If you're reading this section, you probably have a compliance team asking questions. Here's how JuiceFactory helps you stay on the right side of GDPR.

The Core GDPR Principles (Article 5)

GDPR Article 5 lays out six principles for data processing. Here's how JuiceFactory addresses each one when you use it with Cursor:

  1. Lawfulness, fairness, transparency You (the controller) have a lawful basis for processing code data (probably "legitimate interest" if it's internal dev work, or "contract" if you're building something for a client). JuiceFactory (the processor) is transparent about what we do with data — we delete it immediately.

  2. Purpose limitation Data is used only for AI inference. We don't train models on your code, we don't sell data to third parties, we don't even keep it around after the request finishes.

  3. Data minimization Cursor only sends the minimum code context needed for the AI to answer your question. JuiceFactory doesn't log the actual code content — just metadata (timestamp, token count).

  4. Accuracy Not directly relevant here (we're not storing personal data that could become "inaccurate").

  5. Storage limitation Metadata logs are auto-deleted after 30 days. Request/response bodies are deleted immediately (within seconds).

  6. Integrity and confidentiality All traffic is encrypted (TLS 1.3). Access to infrastructure is restricted (2FA required, IP whitelisting, audit logs).

Article 28: Processor Obligations

Under GDPR, if you're using JuiceFactory to process data (even just code snippets), we're your "processor" and you're the "controller." Article 28 requires a Data Processing Agreement (DPA).

We've got a pre-signed DPA ready for you. Download it in the portal:

  1. Go to portal.juicefactory.ai
  2. Click Settings → Legal → Data Processing Agreement
  3. Download the PDF (it's already signed by us)
  4. Countersign it and file it with your compliance docs

What's in the DPA:

  • We process data only according to your instructions (i.e., when you send an API request)
  • We don't transfer data outside the EU
  • We notify you within 24 hours of any data breach
  • We delete data immediately after processing
  • We allow you to audit our systems (with reasonable notice)

Article 6: Lawful Basis for Processing

When you send code to JuiceFactory via Cursor, you need a lawful basis under Article 6. Most common scenarios:

  • Internal developmentLegitimate interest (improving your codebase is a legitimate business interest)
  • Client projectsContract (you need to process data to fulfill your contract with the client)
  • Open-source projectsLegitimate interest (or "consent" if contributors agreed to AI-assisted development)

GDPR Data Flow

┌─────────────────────────────────────────────────────┐
│  Data Controller (YOU)                              │
│  - You decide what code to send to Cursor           │
│  - You choose to use JuiceFactory as BYOK           │
│  - You have a lawful basis for processing           │
└────────────────┬────────────────────────────────────┘
                 │ (sends code context via Cursor)
                 ▼
┌─────────────────────────────────────────────────────┐
│  Data Processor (JUICEFACTORY)                      │
│  - Receives encrypted API requests                  │
│  - Routes to EU-based AI providers                  │
│  - Does NOT store request/response bodies           │
│  - Deletes metadata logs after 30 days              │
│  - Location: Stockholm, Frankfurt (EU)              │
└────────────────┬────────────────────────────────────┘
                 │ (forwards to AI provider in EU)
                 ▼
┌─────────────────────────────────────────────────────┐
│  Sub-Processor (AI Provider)                        │
│  - Anthropic (EU), OpenAI (EU), Google (EU)         │
│  - Processes AI inference request                   │
│  - Returns generated code                           │
│  - Does NOT train on your data (per API ToS)        │
│  - Location: EU data centers only                   │
└─────────────────────────────────────────────────────┘

Key takeaway: Your data never leaves the EU. Every hop in the chain is EU-based, GDPR-compliant, and covered by a DPA.


Enterprise Deployment: Rolling Out to Your Team

If you're setting this up for a team of 10, 50, or 500 developers, here's how to do it cleanly.

Centralized Account Setup

  1. Create an organization account in the portal
  2. Invite team members via Settings → Team → Invite
  3. Each developer gets their own API key (so you can track usage per person)

Alternatively, for stricter control:

  1. Create a single "shared" API key for the whole team
  2. Distribute it via your MDM or secrets manager
  3. Track usage via the organization dashboard

MDM Integration

For companies using Jamf, Intune, or similar MDM tools, you can push Cursor settings automatically:

Jamf Pro (macOS):

{
  "com.cursor.cursor": {
    "apiBaseUrl": "https://api.juicefactory.ai/v1",
    "apiKey": "jf_your_shared_key_here",
    "defaultModel": "claude-3-5-sonnet-20241022"
  }
}

Intune (Windows):

HKEY_CURRENT_USER\Software\Cursor\Settings
Value: ApiBaseUrl = https://api.juicefactory.ai/v1
Value: ApiKey = jf_your_shared_key_here

Developers don't have to manually configure anything — it just works.

Audit Logging

Enterprise accounts get access to detailed audit logs:

  • Who made each API request (based on API key)
  • What model was used
  • How many tokens were consumed
  • Timestamp and IP address

Access this via Settings → Audit Logs in the portal. You can export as CSV or stream to your SIEM (Splunk, Elastic, etc.) via webhook.

Cost Optimization Strategies

  1. Set per-user spending limits — In the portal: Settings → Team → Spending Limits
  2. Use cheaper models for tab completion — Chat: Sonnet ($$$), Tab: Haiku ($). This alone can cut costs by 60-70%.
  3. Monitor usage patterns — Check the Usage Dashboard weekly for outliers.
  4. Negotiate volume pricing — Spending $1K+/month? Email sales@juicefactory.ai for discounts.

SSO Integration (Keycloak, Okta, Azure AD)

Enterprise accounts can use SSO instead of email/password login:

  1. Go to Settings → Authentication → SSO
  2. Choose your provider (we support SAML 2.0 and OIDC)
  3. Follow the setup wizard

Once configured, your team logs in via your corporate identity provider. Benefits: automatic deprovisioning when someone leaves, MFA enforcement, no more "I forgot my password" tickets.


Cost Comparison: Real Numbers

Here are actual monthly costs for different usage profiles:

Light User (10K tokens/day, ~300K tokens/month)

ProviderMonthly Cost
Cursor Pro$20/month
OpenAI Direct (GPT-4)~$9/month
JuiceFactory (Haiku + Sonnet)~$5/month

Medium User (50K tokens/day, ~1.5M tokens/month)

ProviderMonthly Cost
Cursor Pro$40/month
OpenAI Direct (GPT-4)~$45/month
JuiceFactory (Haiku + Sonnet)~$28/month

Heavy User (200K tokens/day, ~6M tokens/month)

ProviderMonthly Cost
Cursor ProNot available at this volume
OpenAI Direct (GPT-4)~$180/month
JuiceFactory (mixed models)~$115/month

Enterprise (50 developers, ~60M tokens/month)

ProviderMonthly Cost
Cursor Pro (50 seats)$1,000-2,000/month
OpenAI Direct (50 accounts)~$1,400/month
JuiceFactory (org, volume discount)~$980/month

Note: Estimates based on 2026 pricing. Check the pricing calculator for your scenario.


FAQ

Can I use JuiceFactory with other IDEs (VS Code, IntelliJ)?

Yes! JuiceFactory works with any tool that supports OpenAI-compatible APIs. For VS Code, use Continue.dev or similar extensions. For IntelliJ, you can use the Cursor JetBrains plugin or Continue.dev.

What happens if JuiceFactory has an outage?

We guarantee 99.9% uptime. If we go down, you can instantly switch back to Cursor's default or direct API keys in settings. We have a status page at status.juicefactory.ai.

Is my code used to train AI models?

No. JuiceFactory doesn't train models — we're an inference gateway. The underlying providers (Anthropic, OpenAI, Google) have committed to not training on API data. This is different from their web interfaces (ChatGPT, Claude.ai), where data can be used for training.

Can I use this for my entire team?

Yes. Create an organization account and invite your team. Each person gets their own API key, or you can share one key and track usage centrally.

Do you support on-premise deployment?

Not yet, but it's on the roadmap. If you need air-gapped deployment now, email enterprise@juicefactory.ai.

What's the difference between JuiceFactory and running models locally (Ollama, LM Studio)?

Local models are great for privacy and cost (free after hardware). But they're slower, less capable (Llama 3.1 70B is good but not Claude 3.5 Sonnet good), and require beefy hardware (32GB+ RAM, ideally a GPU). JuiceFactory gives you cloud-scale models with EU data residency.

Can I see exactly what Cursor is sending to the API?

Yes! In Cursor settings, enable Debug Mode under Advanced. This logs all API requests so you can inspect the exact JSON payloads. Useful for debugging or compliance audits.

How do I cancel?

There's no subscription to cancel — you only pay for what you use (pay-as-you-go). To stop using JuiceFactory, just remove your API key from Cursor settings.

Do you offer a free tier?

Yes! Every account gets 10,000 free tokens. No credit card required to start.

What if I need a feature that's not supported?

Check our public roadmap or email support@juicefactory.ai with your request. We prioritize based on customer demand.


Next Steps

For Individual Developers

  1. Sign up for a free account (10K free tokens, no credit card)
  2. Follow the setup guide above (takes 5 minutes)
  3. Start coding with EU-based AI

For Teams

  1. Create an organization account
  2. Invite your team or deploy via MDM
  3. Set spending limits and track usage in the dashboard

For Enterprises

  1. Email enterprise@juicefactory.ai for a demo
  2. We'll help with SSO setup, volume pricing, and custom DPA terms

Related Guides