Access Methods

API Keys

API keys are the default access method for account-based usage. They work with standard OpenAI-compatible clients and bill against your Rungate account credits.

#Overview

Create keys in your account settings and send them as standard bearer tokens. This is the simplest path for server applications, dashboards, and integrations that already know how to use OpenAI-style API keys.

  • Standard bearer authentication
  • Account-scoped usage tracking and credits
  • No payment challenge handling required

#Request format

Send your key in the normal Authorization header and target the Rungate base URL.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_RUNGATE_API_KEY",
    base_url="https://api.rungate.ai/v1",
)

response = client.chat.completions.create(
    model="deepseek/deepseek-v3.2",
    messages=[{"role": "user", "content": "Say hello."}],
)

#Billing behavior

API key requests bill against your account credits. If your account balance is depleted, Rungate rejects the request with 402 before it reaches the upstream provider.

API keys are the right choice when you want account identity, dashboards, usage history, and credit top-ups in one place.