DEV Community

Cover image for How to Set Up Your OneHop API Key in Cursor and Cline
Haider Hanif
Haider Hanif

Posted on

How to Set Up Your OneHop API Key in Cursor and Cline

How to Set Up Your OneHop API Key in Cursor and Cline: A Step-by-Step Guide

If you're using modern AI development tools like Cursor, Cline, Claude Code, or Cherry Studio, managing multiple API keys across different providers (OpenAI, Anthropic, DeepSeek, Google, etc.) can quickly become messy and expensive.

OneHop acts as a unified AI Gateway, letting you access hundreds of AI models through a single API key and an OpenAI-compatible Base URL (https://api.onehop.ai/v1).

In this short guide, we’ll walk through how to generate your OneHop API key and configure it in Cursor and Cline (VS Code extension) in under 3 minutes.


1. Get Your OneHop API Key

Before configuring your tools, you need to retrieve your credentials from OneHop:

  1. Log in to your OneHop Dashboard.
  2. Navigate to the API Keys section.
  3. Click Create New Key.
  4. Copy your generated key (it usually starts with oh_...). Save it securely, as you won't be able to see it again.

2. Setting Up OneHop in Cursor

Cursor is an AI-first code editor built on VS Code. Because OneHop is fully OpenAI API-compatible, setting it up in Cursor is simple.

Steps:

  1. Open Cursor.
  2. Go to Settings (Click the gear icon in the top right or press Ctrl + , / Cmd + ,).
  3. Select Cursor Settings -> Models.
  4. Scroll down to the OpenAI API Key section:

    • Override OpenAI Base URL: Toggle this on and set it to:
     [https://api.onehop.ai/v1](https://api.onehop.ai/v1)
    
  • OpenAI API Key: Paste your OneHop key (oh_...).
    1. Under Model Names, enable or add the models you wish to route through OneHop, such as:
  • openai/gpt-5.6-sol
  • anthropic/claude-opus-5
  • anthropic/claude-sonnet-5
    1. Save your settings and run a test query in the Cursor AI Chat sidebar to confirm everything is working!

3. Setting Up OneHop in Cline (VS Code Extension)

Cline is an autonomous coding assistant in VS Code that supports custom OpenAI-compatible endpoints.

Steps:

  1. Open VS Code and open the Cline panel.
  2. Click the Settings Gear icon inside the Cline extension panel.
  3. In the API Provider dropdown, select OpenAI Compatible.
  4. Fill in the following details:
    • Base URL: https://api.onehop.ai/v1
    • API Key: Paste your OneHop key (oh_...).
    • Model ID: Enter the model string you want to use (e.g., openai/gpt-5.6-sol, anthropic/claude-opus-5, or anthropic/claude-sonnet-5).
  5. Click Done / Save.
  6. Submit a quick prompt in Cline to verify that responses are streaming correctly.

Conclusion

Using OneHop as your central AI gateway simplifies model management and keeps your workflow clean across all your favorite IDEs and coding agents—whether you're using Cursor, Cline, Claude Code, Cherry Studio, or Hermes.

Happy coding!

Top comments (0)