<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SuJin AI</title>
    <description>The latest articles on DEV Community by SuJin AI (@sujinai).</description>
    <link>https://dev.to/sujinai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4275600%2F2ebf3913-186b-4652-adef-13801047f66c.png</url>
      <title>DEV Community: SuJin AI</title>
      <link>https://dev.to/sujinai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sujinai"/>
    <language>en</language>
    <item>
      <title>One API Key for GPT and Claude in Cursor, Cline, and Cherry Studio</title>
      <dc:creator>SuJin AI</dc:creator>
      <pubDate>Tue, 01 Dec 2026 06:07:33 +0000</pubDate>
      <link>https://dev.to/sujinai/one-api-key-for-gpt-and-claude-in-cursor-cline-and-cherry-studio-503b</link>
      <guid>https://dev.to/sujinai/one-api-key-for-gpt-and-claude-in-cursor-cline-and-cherry-studio-503b</guid>
      <description>&lt;h1&gt;
  
  
  One API Key for GPT and Claude in Cursor, Cline, and Cherry Studio
&lt;/h1&gt;

&lt;p&gt;If you already use an OpenAI-compatible, pay-as-you-go API key, you do not need a different key for every desktop client. Cursor, Cline, and Cherry Studio can all point at the same base URL, the same key, and the same model IDs. The work is in entering those three values correctly — and in not accidentally pasting the Anthropic-protocol URL into a client that expects &lt;code&gt;/v1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This walkthrough uses &lt;strong&gt;SuJin AI (素槿)&lt;/strong&gt; as a concrete example, because its public docs spell out both URLs and the current calling IDs. Official client notes: &lt;a href="https://sujinai.com/en/cursor-api/" rel="noopener noreferrer"&gt;Connect Cursor to SuJin AI&lt;/a&gt; and the broader &lt;a href="https://sujinai.com/en/guides/" rel="noopener noreferrer"&gt;Guides&lt;/a&gt; page. Matching snippets are in &lt;a href="https://github.com/SuJinAI/quickstart" rel="noopener noreferrer"&gt;SuJinAI/quickstart&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The connection is still not the official OpenAI or Anthropic console. You are sending the client's custom-model traffic to a compatible gateway over ordinary HTTPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one rule that applies to all three clients
&lt;/h2&gt;

&lt;p&gt;SuJin AI publishes two base URLs. For this article you almost always want the first:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Client / protocol&lt;/th&gt;
&lt;th&gt;Base URL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Cursor, Cline, Cherry Studio&lt;/strong&gt;, OpenAI SDK, &lt;code&gt;curl /chat/completions&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://sujinai.com/v1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic SDK and Claude Code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;https://sujinai.com&lt;/code&gt; (no &lt;code&gt;/v1&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Cursor, Cline, and Cherry Studio, the OpenAI-compatible address must be exactly &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;. Keep the &lt;code&gt;/v1&lt;/code&gt; suffix. Add nothing after it — not &lt;code&gt;/chat&lt;/code&gt;, not &lt;code&gt;/chat/completions&lt;/code&gt;, not &lt;code&gt;/models&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The same SuJin API key goes in every client. You do not mint one key per app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live model IDs to add
&lt;/h2&gt;

&lt;p&gt;The homepage and guides use these calling examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPT: &lt;code&gt;gpt-6.2-sol&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Claude: &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The current catalog (GPT and Claude only) also lists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPT: &lt;code&gt;gpt-6.2-astra&lt;/code&gt;, &lt;code&gt;gpt-6.2-sol&lt;/code&gt;, &lt;code&gt;gpt-6.1-terra&lt;/code&gt;, &lt;code&gt;gpt-6-luna&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Claude card names: &lt;code&gt;fable-5-2&lt;/code&gt;, &lt;code&gt;opus-5-5&lt;/code&gt;, &lt;code&gt;sonnet-5-5&lt;/code&gt;, &lt;code&gt;haiku-5-5&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The everyday Claude calling example is &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;, while the card for that model is labeled &lt;code&gt;sonnet-5-5&lt;/code&gt;. When a client asks for a model ID, start with the documented calling strings (&lt;code&gt;gpt-6.2-sol&lt;/code&gt;, &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;). Do not prefix them with &lt;code&gt;openai/&lt;/code&gt; or &lt;code&gt;anthropic/&lt;/code&gt; — those vendor prefixes belong to other routers and will not match this catalog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor
&lt;/h2&gt;

&lt;p&gt;Custom models in Cursor are configured under &lt;strong&gt;Settings → Models&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create an API key in the SuJin console (a request will fail if the account has no credit).&lt;/li&gt;
&lt;li&gt;Open Cursor &lt;strong&gt;Settings → Models&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Paste the key into &lt;strong&gt;OpenAI API Key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Turn on &lt;strong&gt;Override OpenAI Base URL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;. The address &lt;em&gt;without&lt;/em&gt; &lt;code&gt;/v1&lt;/code&gt; is the Anthropic base URL used by Claude Code; it does not belong in this field.&lt;/li&gt;
&lt;li&gt;Add a model ID from the catalog, for example &lt;code&gt;gpt-6.2-sol&lt;/code&gt; and, if you also want Claude in the picker, &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OpenAI API Key: YOUR_API_KEY
Override OpenAI Base URL: https://sujinai.com/v1
Model (GPT): gpt-6.2-sol
Model (Claude): claude-sonnet-5-5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify the request actually leaves Cursor
&lt;/h3&gt;

&lt;p&gt;Open &lt;strong&gt;Cursor Chat&lt;/strong&gt;, select the model you just added — not Auto, and not a built-in Cursor model with a similar name — and send a short message such as &lt;code&gt;Reply with the single word pong.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That chat uses the base URL you set. Two limitations are easy to misread as a broken gateway:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tab completion&lt;/strong&gt; still uses Cursor's own models. A custom OpenAI-compatible endpoint does not take over inline completions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom models require a paid Cursor plan.&lt;/strong&gt; If the UI refuses to add or use the model, check the Cursor plan first, before blaming the base URL.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If chat returns an error, check three things: the URL ends in &lt;code&gt;/v1&lt;/code&gt; with nothing after it, the key is complete, and the model ID matches the catalog exactly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cline
&lt;/h2&gt;

&lt;p&gt;Cline talks to the same OpenAI-compatible URL and the same key.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Cline extension settings in VS Code or Cursor.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;API Provider&lt;/strong&gt; to &lt;strong&gt;OpenAI Compatible&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Base URL&lt;/strong&gt; to &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paste the same SuJin key into the API key field.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Model&lt;/strong&gt; to a catalog ID, for example &lt;code&gt;gpt-6.2-sol&lt;/code&gt; or &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cline is stricter than some GUIs about the model string: a typo or a leftover &lt;code&gt;anthropic/&lt;/code&gt; prefix usually fails immediately. After saving, start a new Cline task and send a one-line prompt. If the request errors, copy the error text (never the key) and compare the Base URL character-for-character with &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cherry Studio
&lt;/h2&gt;

&lt;p&gt;Cherry Studio also uses an OpenAI-compatible provider.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Settings → Model Services&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add a provider of type &lt;strong&gt;OpenAI&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the API address to &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paste the same API key.&lt;/li&gt;
&lt;li&gt;Add the model IDs you want, such as &lt;code&gt;gpt-6.2-sol&lt;/code&gt; and &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Turn on the &lt;strong&gt;enable&lt;/strong&gt; switch at the &lt;strong&gt;top right&lt;/strong&gt; of that provider. This last step is easy to skip: the models appear in the list, but requests never leave the app until the provider itself is enabled.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start a new chat, pick one of the models you added, and send a short prompt. If nothing happens, go back and confirm the top-right enable switch is on.&lt;/p&gt;

&lt;h2&gt;
  
  
  An independent smoke test with the same key
&lt;/h2&gt;

&lt;p&gt;When a desktop client fails, it helps to prove the key and the URL work outside the app. This is the official OpenAI-compatible example from the SuJin guides (the key is the same one you pasted into Cursor):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://sujinai.com/v1/chat/completions \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Bearer YOUR_API_KEY"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "model": "gpt-6.2-sol",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A normal JSON completion means the gateway accepted the key, the &lt;code&gt;/v1&lt;/code&gt; URL, and &lt;code&gt;gpt-6.2-sol&lt;/code&gt;. If this works but Cursor fails, the problem is almost certainly in the client's fields (wrong URL, model not selected in the chat picker, custom models locked to a paid Cursor plan, or Cherry Studio's provider left disabled). If this curl fails, fix the key / URL / model ID before touching the apps again.&lt;/p&gt;

&lt;p&gt;Python equivalent, also from the official guides:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gpt-6.2-sol"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Missing or doubled &lt;code&gt;/v1&lt;/code&gt;.&lt;/strong&gt; Cursor, Cline, and Cherry Studio need &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;. &lt;code&gt;https://sujinai.com&lt;/code&gt; is the Anthropic URL for Claude Code. &lt;code&gt;https://sujinai.com/v1/chat/completions&lt;/code&gt; is a request path, not a base URL — if you put that in the override field, the client will append its own path on top and the call will 404.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key pasted with whitespace, or only part of the key.&lt;/strong&gt; Re-copy it from the console in one motion. Do not wrap it in quotes inside a GUI field unless the field's docs say so.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model ID from another router.&lt;/strong&gt; &lt;code&gt;anthropic/claude-sonnet-5-5&lt;/code&gt; or &lt;code&gt;openai/gpt-4o&lt;/code&gt; will not match this catalog. Use &lt;code&gt;claude-sonnet-5-5&lt;/code&gt; and &lt;code&gt;gpt-6.2-sol&lt;/code&gt; as documented, or another ID from the list above.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chat uses a different model than the one you added.&lt;/strong&gt; In Cursor, open the chat model picker and select the custom ID explicitly. Auto or a built-in model will not exercise the override URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tab completion "isn't using my key."&lt;/strong&gt; That is expected. Tab stays on Cursor's own models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom model option is missing or greyed out.&lt;/strong&gt; Custom models require a paid Cursor plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cline provider is not "OpenAI Compatible."&lt;/strong&gt; If the provider is still set to OpenAI, Anthropic, or another built-in vendor, the base URL field may be ignored or validated against the wrong host.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cherry Studio provider added but not enabled.&lt;/strong&gt; Turn on the switch at the top right after you add models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code settings copied into Cursor.&lt;/strong&gt; If you already followed a Claude Code guide, you might have &lt;code&gt;https://sujinai.com&lt;/code&gt; in your clipboard. That value is correct for &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; and wrong for Cursor's Override OpenAI Base URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Base URL (all three clients):  https://sujinai.com/v1
API key:                       the same console key in each app
GPT example ID:                gpt-6.2-sol
Claude example ID:             claude-sonnet-5-5
Cursor:                        Settings → Models, override enabled, chat picker set
Cline:                         Provider = OpenAI Compatible
Cherry Studio:                 OpenAI provider added, enable switch on
Do not use:                    https://sujinai.com   (that one is for Claude Code)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cursor, Cline, and Cherry Studio field-by-field: &lt;a href="https://sujinai.com/en/cursor-api/" rel="noopener noreferrer"&gt;https://sujinai.com/en/cursor-api/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Quick start plus Python / Node / cURL examples: &lt;a href="https://sujinai.com/en/guides/" rel="noopener noreferrer"&gt;https://sujinai.com/en/guides/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The same examples in a public repo: &lt;a href="https://github.com/SuJinAI/quickstart" rel="noopener noreferrer"&gt;https://github.com/SuJinAI/quickstart&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a client still errors after the checks above, send the error text without the key to &lt;code&gt;support@sujinai.com&lt;/code&gt; or Telegram &lt;a href="https://t.me/sujinai_bot" rel="noopener noreferrer"&gt;@sujinai_bot&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>api</category>
      <category>programming</category>
    </item>
    <item>
      <title>Point Claude Code at a Custom Anthropic-Compatible Endpoint (and Fix the Usual 401/404 Errors)</title>
      <dc:creator>SuJin AI</dc:creator>
      <pubDate>Tue, 01 Dec 2026 06:07:14 +0000</pubDate>
      <link>https://dev.to/sujinai/point-claude-code-at-a-custom-anthropic-compatible-endpoint-and-fix-the-usual-401404-errors-11lg</link>
      <guid>https://dev.to/sujinai/point-claude-code-at-a-custom-anthropic-compatible-endpoint-and-fix-the-usual-401404-errors-11lg</guid>
      <description>&lt;h1&gt;
  
  
  Point Claude Code at a Custom Anthropic-Compatible Endpoint (and Fix the Usual 401/404 Errors)
&lt;/h1&gt;

&lt;p&gt;Claude Code talks to models over the &lt;strong&gt;Anthropic protocol&lt;/strong&gt;, not over the OpenAI-compatible &lt;code&gt;/v1&lt;/code&gt; API. That distinction is easy to miss until the first request comes back as 404, or a key you just pasted produces 401 in a &lt;em&gt;different&lt;/em&gt; terminal than the one where you exported it.&lt;/p&gt;

&lt;p&gt;This guide covers the full working loop: which environment variables Claude Code actually reads, how &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; differs from &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;, how to persist the values in zsh and bash, how to smoke-test a short prompt without printing the key, and how to read the usual 401 / 404 / trailing-&lt;code&gt;/v1&lt;/code&gt; failures.&lt;/p&gt;

&lt;p&gt;I will use &lt;strong&gt;SuJin AI (素槿)&lt;/strong&gt; as a concrete, public example. Its docs publish both an Anthropic base URL and a separate OpenAI-compatible URL, which makes the most common mistake easy to demonstrate. The same procedure applies to any Anthropic-compatible endpoint; only the hostname and the key source change. Official walkthrough: &lt;a href="https://sujinai.com/en/claude-code/" rel="noopener noreferrer"&gt;Connect Claude Code to SuJin AI&lt;/a&gt;. Runnable snippets also live in the &lt;a href="https://github.com/SuJinAI/quickstart" rel="noopener noreferrer"&gt;SuJinAI/quickstart&lt;/a&gt; repository.&lt;/p&gt;

&lt;p&gt;This setup does &lt;strong&gt;not&lt;/strong&gt; turn your terminal into the official Anthropic console. You are pointing the official Claude Code client at a compatible gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two base URLs, one easy way to break the client
&lt;/h2&gt;

&lt;p&gt;A pay-as-you-go gateway that speaks both protocols will usually publish &lt;strong&gt;two&lt;/strong&gt; addresses. On SuJin AI they are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Client / protocol&lt;/th&gt;
&lt;th&gt;Base URL&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;/v1&lt;/code&gt; suffix?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI SDK, Cursor, Cline, Cherry Studio, &lt;code&gt;curl&lt;/code&gt; to &lt;code&gt;/chat/completions&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://sujinai.com/v1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Required&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic SDK and &lt;strong&gt;Claude Code&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://sujinai.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Must be absent&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For Claude Code, &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; must be exactly &lt;code&gt;https://sujinai.com&lt;/code&gt;. Do not append &lt;code&gt;/v1&lt;/code&gt;, &lt;code&gt;/v1/messages&lt;/code&gt;, or a trailing slash-plus-path. Do not paste the OpenAI-compatible URL into this variable. Claude Code will build the Anthropic request path itself.&lt;/p&gt;

&lt;p&gt;If you later configure Cursor or Cline, those clients use the &lt;em&gt;other&lt;/em&gt; URL. Mixing them is the single most common setup error I see.&lt;/p&gt;

&lt;h2&gt;
  
  
  The environment variables Claude Code actually reads
&lt;/h2&gt;

&lt;p&gt;You need two pieces of information in the &lt;strong&gt;same&lt;/strong&gt; shell that launches &lt;code&gt;claude&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; — the Anthropic-protocol host, with no &lt;code&gt;/v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The API key, in &lt;strong&gt;either&lt;/strong&gt; &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; &lt;strong&gt;or&lt;/strong&gt; &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One key variable is enough. The value is the same key (for SuJin AI, the key you create in the console). The official homepage snippet uses &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;; the Claude Code guide documents both spellings because the client accepts either.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option A: &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_AUTH_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option B: &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Practical rules that save a lot of time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefer &lt;strong&gt;one&lt;/strong&gt; of the two key variables. If both are set to &lt;em&gt;different&lt;/em&gt; values, the client can authenticate with the wrong one and return 401.&lt;/li&gt;
&lt;li&gt;If you previously exported the other variable in the same shell, unset it: &lt;code&gt;unset ANTHROPIC_AUTH_TOKEN&lt;/code&gt; or &lt;code&gt;unset ANTHROPIC_API_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Copy the key again from the console if you suspect a leading/trailing space or a truncated paste.&lt;/li&gt;
&lt;li&gt;Do not &lt;code&gt;echo&lt;/code&gt; the key to the terminal, and do not paste it into a screenshot or a support ticket.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These &lt;code&gt;export&lt;/code&gt; commands last only for the current session. A new tab, a new window, or a GUI-launched process will not see them unless you persist them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Persist the variables in zsh or bash
&lt;/h2&gt;

&lt;p&gt;First confirm which shell you are actually running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$SHELL"&lt;/span&gt;
&lt;span class="c"&gt;# and, in case the login shell differs from this session:&lt;/span&gt;
ps -p &lt;span class="nv"&gt;$$&lt;/span&gt; -o &lt;span class="nv"&gt;comm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  zsh (the default on current macOS)
&lt;/h3&gt;

&lt;p&gt;Put the exports in &lt;code&gt;~/.zshrc&lt;/code&gt; if you always start Claude Code from Terminal, iTerm, or VS Code / Cursor's integrated terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.zshrc&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reload the file in every open terminal that should pick up the change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A slightly cleaner pattern is to keep the secret out of a file you might casually copy or commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.zshrc&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -f &lt;span class="s2"&gt;"$HOME/.config/claude-code-endpoint.env"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="nb"&gt;set&lt;/span&gt; -a
  &lt;span class="c"&gt;# shellcheck disable=SC1090&lt;/span&gt;
  . &lt;span class="s2"&gt;"$HOME/.config/claude-code-endpoint.env"&lt;/span&gt;
  &lt;span class="nb"&gt;set&lt;/span&gt; +a
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.config/claude-code-endpoint.env&lt;/span&gt;
&lt;span class="c"&gt;# chmod 600 this file&lt;/span&gt;
&lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;
&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -p ~/.config
chmod 600 ~/.config/claude-code-endpoint.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  bash
&lt;/h3&gt;

&lt;p&gt;On most Linux desktop setups, interactive shells read &lt;code&gt;~/.bashrc&lt;/code&gt;. On macOS bash, login shells often read &lt;code&gt;~/.bash_profile&lt;/code&gt; instead and may never touch &lt;code&gt;~/.bashrc&lt;/code&gt; unless you source it yourself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.bashrc  (Linux)  or  ~/.bash_profile (macOS bash login shells)&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc        &lt;span class="c"&gt;# Linux interactive bash&lt;/span&gt;
&lt;span class="c"&gt;# or&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bash_profile  &lt;span class="c"&gt;# macOS bash login shell&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you use bash on macOS and are not sure which file is loaded, add this line to &lt;code&gt;~/.bash_profile&lt;/code&gt; so a login shell also reads your interactive config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.bash_profile&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt; -f ~/.bashrc &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; . ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  A gotcha: launching &lt;code&gt;claude&lt;/code&gt; outside that shell
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;~/.zshrc&lt;/code&gt; and &lt;code&gt;~/.bashrc&lt;/code&gt; apply to &lt;strong&gt;interactive shells&lt;/strong&gt;. If you start Claude Code from a desktop shortcut, Spotlight, or another GUI entry point, that process often does not source those files, and you will think the variables "did not stick." In that case, start &lt;code&gt;claude&lt;/code&gt; from a terminal you have already verified, or persist the variables in a file that your launch path actually reads.&lt;/p&gt;

&lt;p&gt;After reloading, open a &lt;strong&gt;new&lt;/strong&gt; terminal and confirm the values were inherited before you debug the API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Smoke-test without leaking the key
&lt;/h2&gt;

&lt;p&gt;Get an API key first (for SuJin AI, create one in the console; a call will fail if the account has no credit). Then, in the same terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="s2"&gt;"$ANTHROPIC_BASE_URL"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"base url ok"&lt;/span&gt;
&lt;span class="nb"&gt;test&lt;/span&gt; -n &lt;span class="s2"&gt;"$ANTHROPIC_AUTH_TOKEN"&lt;/span&gt; -o -n &lt;span class="s2"&gt;"$ANTHROPIC_API_KEY"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"key is set"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second check only confirms that &lt;em&gt;a&lt;/em&gt; key variable is non-empty. It does not print the secret, and it does not prove the key is valid. Next:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Send a very short prompt, for example: &lt;code&gt;Reply with the single word pong.&lt;/code&gt; If you get a normal completion back, the base URL, the key, and the default model path are all working.&lt;/p&gt;

&lt;p&gt;If the client returns an authentication error, switch to the other key variable, &lt;strong&gt;unset&lt;/strong&gt; the first one, and retry in that same terminal — not in a new window that might still have the old exports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model IDs: use the catalog string, not a vendor prefix
&lt;/h2&gt;

&lt;p&gt;Claude Code will request a model ID. On SuJin AI, the documented calling example is &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;. The pricing catalog card for the same everyday model is labeled &lt;code&gt;sonnet-5-5&lt;/code&gt;. Other Claude cards currently listed are &lt;code&gt;fable-5-2&lt;/code&gt;, &lt;code&gt;opus-5-5&lt;/code&gt;, and &lt;code&gt;haiku-5-5&lt;/code&gt;. The catalog is &lt;strong&gt;GPT and Claude only&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Two pitfalls show up constantly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leaving an OpenRouter-style vendor prefix on the ID, such as &lt;code&gt;anthropic/claude-sonnet-5-5&lt;/code&gt;. Drop the &lt;code&gt;anthropic/&lt;/code&gt; prefix.&lt;/li&gt;
&lt;li&gt;Pasting a name that is not on the gateway's catalog. Use the ID from the provider you are actually calling, not a remembered string from another dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When in doubt, start with the documented example &lt;code&gt;claude-sonnet-5-5&lt;/code&gt; and change IDs only after a smoke test succeeds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading 401, 404, and the trailing-&lt;code&gt;/v1&lt;/code&gt; mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  401 (authentication)
&lt;/h3&gt;

&lt;p&gt;Work through these in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Confirm you are still in the shell where the variables were set or sourced.&lt;/li&gt;
&lt;li&gt;Re-run the &lt;code&gt;test -n ...&lt;/code&gt; check. If it does not print &lt;code&gt;key is set&lt;/code&gt;, the client has nothing to send.&lt;/li&gt;
&lt;li&gt;Re-copy the key. A leading space, a trailing newline that turned into a character, or a truncated paste is enough to 401.&lt;/li&gt;
&lt;li&gt;If both &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; and &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; are set, unset one of them. Keep a single variable, set to the same SuJin key.&lt;/li&gt;
&lt;li&gt;Try the other variable name in that same terminal. Some setups and wrappers historically favored one spelling; the official SuJin guide says either works, and switching is a cheap test.&lt;/li&gt;
&lt;li&gt;Confirm the key itself is the gateway key, not an official Anthropic console key (and not an OpenAI key). The base URL and the key have to belong to the same service.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  404 (or a "route not found" / unexpected path)
&lt;/h3&gt;

&lt;p&gt;This is almost always the base URL, not the model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; was set to &lt;code&gt;https://sujinai.com/v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It was set to &lt;code&gt;https://sujinai.com/v1/messages&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A trailing path or typo turned the host into something the gateway does not serve for the Anthropic protocol.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fix it by setting the variable back to exactly &lt;code&gt;https://sujinai.com&lt;/code&gt;, opening a new shell or re-sourcing the rc file, and re-running the &lt;code&gt;test "$ANTHROPIC_BASE_URL" = "https://sujinai.com"&lt;/code&gt; check. The OpenAI-compatible URL &lt;code&gt;https://sujinai.com/v1&lt;/code&gt; is correct for Cursor and friends, and wrong here.&lt;/p&gt;

&lt;h3&gt;
  
  
  The request runs but the model is rejected
&lt;/h3&gt;

&lt;p&gt;If authentication succeeds and the error mentions the model ID, compare the string to the catalog. Remove any &lt;code&gt;anthropic/&lt;/code&gt; or similar prefix. Do not assume that a card label and the calling ID are always identical — for Sonnet, the documented call uses &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;, while the card name is &lt;code&gt;sonnet-5-5&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The variables look right, but &lt;code&gt;claude&lt;/code&gt; in another window fails
&lt;/h3&gt;

&lt;p&gt;Exports are per process tree. Setting them in one terminal and launching &lt;code&gt;claude&lt;/code&gt; from another window (or from a GUI) is a classic false negative. Repeat the checks in the &lt;em&gt;same&lt;/em&gt; terminal that starts the client.&lt;/p&gt;

&lt;h2&gt;
  
  
  A compact checklist
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Base URL has no /v1&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt;

&lt;span class="c"&gt;# 2. One key variable, same value you copied from the console&lt;/span&gt;
&lt;span class="kd"&gt;unset&lt;/span&gt; ANTHROPIC_AUTH_TOKEN
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_API_KEY"&lt;/span&gt;

&lt;span class="c"&gt;# 3. Confirm without printing the secret&lt;/span&gt;
&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="s2"&gt;"$ANTHROPIC_BASE_URL"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://sujinai.com"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"base url ok"&lt;/span&gt;
&lt;span class="nb"&gt;test&lt;/span&gt; -n &lt;span class="s2"&gt;"$ANTHROPIC_API_KEY"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"key is set"&lt;/span&gt;

&lt;span class="c"&gt;# 4. Smoke test&lt;/span&gt;
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want the same values in every new terminal, persist them in &lt;code&gt;~/.zshrc&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt; as shown above, then &lt;code&gt;source&lt;/code&gt; the file once and verify in a fresh tab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Official step-by-step, including the same variable pairs and the common-mistake list: &lt;a href="https://sujinai.com/en/claude-code/" rel="noopener noreferrer"&gt;https://sujinai.com/en/claude-code/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Copy-paste examples for Claude Code, Cursor, Python, Node, and cURL: &lt;a href="https://github.com/SuJinAI/quickstart" rel="noopener noreferrer"&gt;https://github.com/SuJinAI/quickstart&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a request still fails after the checks above, send the error text &lt;strong&gt;without the key&lt;/strong&gt; to &lt;code&gt;support@sujinai.com&lt;/code&gt; or Telegram &lt;a href="https://t.me/sujinai_bot" rel="noopener noreferrer"&gt;@sujinai_bot&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devtools</category>
      <category>claudecode</category>
      <category>ai</category>
      <category>api</category>
    </item>
  </channel>
</rss>
