Safa API · aisafa.xyz

SillyTavern Custom API Setup: Claude, GPT & Gemini Without Credit Card

发布于 2026-08-21 · Safa API

SillyTavern is a powerful AI chat interface that supports multiple LLM backends. However, setting it up with official APIs often requires international credit cards and can be blocked in certain regions. This guide shows you how to configure SillyTavern with a custom API relay that supports Claude, GPT, and Gemini through a single endpoint—with no credit card required.

Why Use a Custom API for SillyTavern?

Official API access from Anthropic, OpenAI, and Google presents several challenges:

A unified API relay solves these issues by providing one endpoint for all models, accepting local payment methods, and ensuring stable connectivity.

Prerequisites

Before you start, make sure you have:

Step-by-Step Setup Guide

1. Launch SillyTavern

Navigate to your SillyTavern directory and start the server:

cd SillyTavern
node server.js

Open your browser and go to http://localhost:8000

2. Configure API Connection

Click the API Connections icon (plug icon) in the top menu. Select Chat Completion as the API type, then choose your provider:

For Claude (Anthropic)

FieldValue
API TypeChat Completion (OpenAI-compatible)
API URLhttps://api.aisafa.xyz/v1
API KeyYour relay API key
Modelclaude-sonnet-5 or claude-opus-48

For GPT Models

FieldValue
API URLhttps://api.aisafa.xyz/v1
Modelgpt-56, gpt-4o, or gpt-55

For Gemini

FieldValue
API URLhttps://api.aisafa.xyz/v1
Modelgemini-pro, gemini-ultra, or gemini-omni

3. Test the Connection

Click Test Connection to verify your setup. If successful, you'll see a green checkmark and available models listed.

4. Advanced Settings (Optional)

Under Advanced Settings, you can configure:

Obtaining an API Key Without Credit Card

If you don't have an API key yet, relay services like Safa API offer a straightforward solution. Here's what makes them practical:

To get started, visit aisafa.xyz/register, create an account, top up your balance with local payment, and generate an API key from the dashboard. Copy the key into SillyTavern's API Key field.

Troubleshooting Common Issues

Connection Failed Error

If you see "Connection failed" when testing:

Model Not Found

If a specific model isn't available:

Slow Response Times

For laggy responses:

Cost Optimization Tips

Keep your SillyTavern API costs under control:

  1. Use prompt caching: For character cards and long system prompts, caching can cut costs by 90%
  2. Choose the right model: Use claude-sonnet-5 for general chat, reserve opus for complex tasks
  3. Limit context length: Set a reasonable conversation history limit (20-30 messages)
  4. Monitor usage: Check your relay dashboard regularly to track spending

Security Considerations

When using custom APIs with SillyTavern:

Reputable relay services don't log conversation content and only store metadata for billing purposes. Always read the privacy policy before committing sensitive conversations.

Frequently Asked Questions

Can I use the same API key for Claude, GPT, and Gemini?

Yes, with a unified API relay like Safa API, one key works for all supported models. Just change the model name in SillyTavern's settings to switch between providers.

Is there a free tier or trial available?

Most relay services offer new user credits (typically $1-5 equivalent) to test the service. This is usually enough for 50-200 messages depending on the model.

What happens if I run out of balance mid-conversation?

You'll receive an error message indicating insufficient balance. Simply top up your account and resume—your conversation history in SillyTavern remains intact.

立即开始使用 Safa API API 中转

官方直连 · 一个接口接入 Claude / GPT / Gemini · 7×24 稳定

免费注册试用 →