{"id":399,"date":"2026-10-27T18:28:50","date_gmt":"2026-10-27T10:28:50","guid":{"rendered":"https:\/\/qoraapi.com\/blog\/?p=399"},"modified":"2026-10-27T18:28:50","modified_gmt":"2026-10-27T10:28:50","slug":"gpt-5-in-cursor-custom-endpoint","status":"publish","type":"post","link":"https:\/\/qoraapi.com\/blog\/gpt-5-in-cursor-custom-endpoint\/","title":{"rendered":"How to Use GPT-5 in Cursor with a Custom API Endpoint (Step by Step)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Cursor is one of the fastest ways to write code with AI. It usually works with its own built-in models. But you can also point Cursor at a custom API endpoint, and use a model of your choice, including GPT-5, through a single API key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide shows you how to do that with Qora API, step by step, with a test to confirm it works, and fixes for the two errors you are most likely to hit: 401 and 429.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A note before you start. The exact GPT-5 model name to use is the one shown on the Qora Model Square. Model names change as new versions are released, and this article does not invent a model name. If the name in this guide does not work, check the Model Square list first and use the GPT-5 name shown there. GPT-5 on Qora costs $0.45 per 1M input tokens and $3.60 per 1M output tokens, as shown on the Model Square (checked 2026-10-27). Prices can change, so check the Model Square for the current price before you use GPT-5 heavily.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What You Need Before You Start<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You need three things:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Cursor, installed and updated.<\/li>\n\n\n\n<li>A Qora API account and API key. Sign up at <a href=\"https:\/\/qoraapi.com\/\">https:\/\/qoraapi.com\/<\/a>, create a key in the Console, and copy it. Keep the key secret.<\/li>\n\n\n\n<li>Enough balance on your Qora account to run a few test requests. Get $5 free trial credit on request \u2014 contact us at support@qoraapi.com and we&#8217;ll add $5 to your account. Trial credit is not automatic, so email first if you want to try before topping up.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Setup<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Get Your Qora API Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open <a href=\"https:\/\/qoraapi.com\/\">https:\/\/qoraapi.com\/<\/a> in your browser and sign in. Go to the Console and find the API Keys section. Create a new key, give it a name you will recognise, such as <code>cursor-gpt5<\/code>, and copy the key value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the key once and store it somewhere safe, such as a password manager. Many key screens only show the full key once. If you lose it, you can create a new key and delete the old one, but you cannot recover the old key value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not use a key from another service here. The key must be a Qora API key, because Cursor will send it to Qora&#8217;s endpoint. A key from OpenAI, Anthropic, or another gateway will not work with Qora&#8217;s endpoint, and will return a 401 error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Open Cursor Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open Cursor. Go to Settings. You can usually get there from the gear icon, or from the Cursor menu, depending on your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Settings, find the Models section. This is where Cursor lists the models it can use, and where you add a custom model.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add GPT-5 as a Custom Model<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Models section, look for an option to add a custom model, or to use a custom API endpoint. The label is often something like &#8220;Add Model&#8221;, &#8220;Custom Model&#8221;, or &#8220;Override OpenAI Base URL&#8221;. If you cannot find it, search the Settings page for &#8220;API key&#8221; or &#8220;base URL&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter these three values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Base URL:<\/strong> <code>https:\/\/qoraapi.com\/v1<\/code><\/li>\n\n\n\n<li><strong>API key:<\/strong> your Qora API key, pasted from Step 1<\/li>\n\n\n\n<li><strong>Model name:<\/strong> the GPT-5 model name exactly as shown on the Qora Model Square<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The base URL must be exactly <code>https:\/\/qoraapi.com\/v1<\/code>, with no trailing path such as <code>\/chat\/completions<\/code>, and no trailing slash. Cursor adds the rest of the path itself. If you add <code>\/chat\/completions<\/code> to the base URL, Cursor will build a wrong URL and the request will fail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The model name matters more than it looks. Cursor sends the model name to Qora, and Qora uses it to pick the model. If the name is wrong, Qora will reject the request. Use the GPT-5 name exactly as it appears on the Model Square, including any version suffix. Do not guess a name, and do not use a name from a different provider&#8217;s list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Save the settings. Cursor may test the connection when you save. If it shows a success message, go to the next step. If it shows an error, do not move on. Go to the troubleshooting section at the end of this guide first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a general guide to the same pattern in other tools, see <a href=\"https:\/\/qoraapi.com\/blog\/connect-cursor-cline-continue-custom-api-endpoint\/\">How to Connect Cursor, Cline and Continue to a Custom AI API Endpoint<\/a>. That article covers the general setup. This article is specifically about GPT-5 in Cursor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Test GPT-5 in the Chat<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open a new chat in Cursor. Select the GPT-5 model you just added from the model picker. If you cannot see it in the picker, go back to Settings and check that the custom model is enabled, not just added. Some Cursor versions require you to enable a model before it appears in the picker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Type a short test prompt, such as:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Write a Python function that reverses a string, and add a one-line comment explaining it.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Send the message and wait for the reply. A short reply that arrives in a few seconds means the setup works. The model, the key, and the base URL are all correct.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now try a coding task in your own project. Open a file, select a piece of code, and ask Cursor to explain it or to refactor it. This is the real test. A chat test proves the connection works. A code test proves the model is useful for your work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Use GPT-5 for Real Work, and Watch the Cost<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the test works, you can use GPT-5 in Cursor the same way you would use any other model: chat, inline edits, and agent mode. Keep your requests focused. Select the code you want the model to change, and ask for one thing at a time. A vague request such as &#8220;improve this file&#8221; will generate a long answer and a large bill. A focused request such as &#8220;fix the off-by-one error in this loop&#8221; will generate a short answer and a small bill.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check your Qora usage regularly. The Console shows your usage and your balance. If the balance drops faster than you expect, check which model you are using and how long your answers are. The cost of a coding assistant is mostly output tokens, and long answers are expensive on any model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a broader cost guide, see <a href=\"https:\/\/qoraapi.com\/blog\/reduce-ai-api-costs\/\">How to Reduce AI API Costs: A Practical Guide for Developers<\/a>. The same ideas apply to Cursor: smaller context, shorter output, and the right model for the job.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Same Setup Works for Cline and Continue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The setup in this guide is not specific to Cursor. Cline and Continue use the same OpenAI-compatible pattern: a base URL, an API key, and a model name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use GPT-5 in Cline or Continue, use the same three values: base URL <code>https:\/\/qoraapi.com\/v1<\/code>, your Qora API key, and the GPT-5 model name exactly as shown on the Model Square. The menus are different, but the values are the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting: 401, 429, and Other Errors<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">401 Unauthorized<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A 401 error means the API key was rejected. The most common causes are a key pasted with a space at the start or end, a key from a different service, a key that was deleted in the Qora Console, or an account with no balance. Check the key in Cursor settings, make sure it is a Qora API key, and check your balance in the Qora Console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the key is correct and the balance is positive, try the same key with a direct cURL call to check whether the problem is in Cursor or in the key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/qoraapi.com\/v1\/chat\/completions \\\n  -H \"Content-Type: application\/json\" \\\n  -H \"Authorization: Bearer $QORA_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-5\",\n    \"messages\": &#91;{\"role\": \"user\", \"content\": \"Say hello.\"}],\n    \"max_tokens\": 50\n  }'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, <code>gpt-5<\/code> is the GPT-5 model name as shown on the Model Square. If the name shown there changes, use the current name instead. If this call works and Cursor does not, the problem is in Cursor&#8217;s settings. If this call also returns 401, the problem is the key or the balance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a deeper guide to 401 errors and other API errors, see <a href=\"https:\/\/qoraapi.com\/blog\/ai-api-security\/\">AI API Security: Protecting Keys and Preventing Abuse<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">429 Too Many Requests<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A 429 error means you have hit a rate limit. You sent too many requests too quickly, or too many tokens in a short time. Wait a few seconds and try again. If you are running an agent loop, add a short delay between requests, or reduce the number of requests by batching your work. Do not fix a 429 by creating a new key or a new account. The limit is on usage, not on the key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a full guide to rate limits, see <a href=\"https:\/\/qoraapi.com\/blog\/ai-api-rate-limits-429-errors\/\">How to Handle AI API Rate Limits and 429 Errors<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Model Not Found<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If Cursor says the model was not found, the model name is wrong. Go to the Qora Model Square and copy the GPT-5 model name exactly as it appears there. Paste it into Cursor, save, and try again. Do not guess a model name. The Model Square is the source of truth.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Empty or Truncated Replies<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If replies are empty or cut off, check the <code>max_tokens<\/code> setting. A very low limit will cut off the answer. Raise the limit a little and try again.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use GPT-5 in Cursor without paying OpenAI directly?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. With Qora API, you use GPT-5 through Qora&#8217;s OpenAI-compatible endpoint at <code>https:\/\/qoraapi.com\/v1<\/code>. You pay Qora, not OpenAI directly. You need a Qora API key and enough balance on your Qora account. GPT-5 costs $0.45 per 1M input tokens and $3.60 per 1M output tokens on Qora, as shown on the Model Square (checked 2026-10-27). Prices can change, so check the Model Square for the current price.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What base URL should I use for GPT-5 in Cursor?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>https:\/\/qoraapi.com\/v1<\/code> exactly, with no trailing path and no trailing slash. Cursor adds the rest of the path itself. If you add <code>\/chat\/completions<\/code> to the base URL, the request will fail.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the GPT-5 model name in Cursor?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the GPT-5 model name exactly as shown on the Qora Model Square. Model names change as new versions are released, and this article does not invent a model name. If the name in a guide does not work, check the Model Square and copy the name from there.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why do I get a 401 error in Cursor?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A 401 error usually means the API key is wrong, is from a different service, was deleted, or has no balance. Check the key in Cursor settings, make sure it is a Qora API key, and check your balance in the Qora Console. Test the same key with a direct cURL call to see whether the problem is in Cursor or in the key.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does the same setup work in Cline and Continue?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Cline and Continue use the same OpenAI-compatible pattern: base URL <code>https:\/\/qoraapi.com\/v1<\/code>, your Qora API key, and the GPT-5 model name from the Model Square. The menus are different, but the values are the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try It<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Get $5 free trial credit on request \u2014 contact us at support@qoraapi.com and we&#8217;ll add $5 to your account. Sign up at <a href=\"https:\/\/qoraapi.com\/\">https:\/\/qoraapi.com\/<\/a>, create one API key, and follow the steps above to use GPT-5 in Cursor. Start with a short test prompt, confirm it works, and then try it on your own code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cursor is one of the fastest ways to write code with AI. It usually works with its own built-in models. But you can also point Cursor at a custom API endpoint, and use a model of your choice, including GPT-5, through a single API key. This guide shows you how to do that with Qora [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-399","post","type-post","status-publish","format-standard","hentry","category-ai-api"],"_links":{"self":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/comments?post=399"}],"version-history":[{"count":3,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":407,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts\/399\/revisions\/407"}],"wp:attachment":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/media?parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/categories?post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/tags?post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}