FrogDino

OpenAI SDK and Anthropic SDK with FrogDino: set base_url in code

In your own code, the official SDKs let you change the request address: the OpenAI SDK takes base_url or the OPENAI_BASE_URL environment variable, and the Anthropic SDK takes base_url or ANTHROPIC_BASE_URL.

Before you start: sign up and create a key

  1. Open the sign-up page and register with your email.
  2. Sign in and top up under Recharge. You pay for what you use; there is no monthly fee. Payment is by Alipay or WeChat Pay.
  3. Go to API Keys, click Create key and choose the GPT or Claude (whichever models you want) group. The full key is shown once, so save it right away.

After creating a key, click "Use key" in the console. It generates a complete config with your key filled in. This page explains the same settings.

OpenAI Python SDK (GPT models)

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://frogdino.com/v1",  # or set OPENAI_BASE_URL
    api_key=os.environ["FROGDINO_API_KEY"],
)

resp = client.chat.completions.create(
    model="gpt-6.1-sol",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Anthropic Python SDK (Claude models)

import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://frogdino.com",  # or set ANTHROPIC_BASE_URL
    auth_token=os.environ["FROGDINO_CLAUDE_KEY"],
)

msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)

Plain curl

Anthropic protocol:

curl -sS -X POST "https://frogdino.com/v1/messages" \
  -H "Authorization: Bearer $FROGDINO_CLAUDE_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 64, "messages": [{"role": "user", "content": "Hello"}]}'

OpenAI protocol:

curl -sS -X POST "https://frogdino.com/v1/chat/completions" \
  -H "Authorization: Bearer $FROGDINO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "gpt-6.1-sol", "messages": [{"role": "user", "content": "Hello"}]}'

Keep keys out of source code and repositories; read them from environment variables.

FAQ

Can I use environment variables only, with no code change?

Yes. The OpenAI SDK reads OPENAI_BASE_URL and OPENAI_API_KEY; the Anthropic SDK reads ANTHROPIC_BASE_URL plus ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN.

What about Node.js and other languages?

The official SDKs work the same way: pass the base URL and the key when constructing the client.

Can one key be used for both Claude and GPT?

No. FrogDino keys belong to a group: a Claude-group key speaks the Anthropic protocol (base URL https://frogdino.com) and a GPT-group key speaks the OpenAI protocol (base URL https://frogdino.com/v1).

What if I get an invalid key or 401 error?

Check that the key was copied in full, that its group matches the protocol you selected, and that your balance is above zero.

Official documentation

Sign up and create a keyModels & pricing

Got an error? Look it up in the error code reference.