Native provider API setup

Start Using SHIM

Connect OpenAI, Anthropic, or Google, call its native API through SHIM, and put governance on the request path.

The Gist

1Add a provider key to SHIM
2Get your SHIM API key
3Call the matching native endpoint
Step 1

Create Your Free Account

Sign up for free. No credit card required. You'll get instant access to your dashboard.

Create Free Account
Step 2

Add Your Provider API Key

Go to your Dashboard and add an OpenAI, Anthropic, or Google key. SHIM uses the credential that matches the native API route you call.

1Open Dashboard → Gateway → Provider credentials
2Choose OpenAI, Anthropic, or Google
3Paste the provider's API key
4Click "Save"

Your API key is encrypted and stored securely. We never expose it in logs or responses.

Step 3

Generate Your SHIM API Key

Now create a SHIM API key. It authenticates your request to SHIM; your provider credential remains stored separately.

1Go to Dashboard → Gateway → Gateway keys
2Click "Create gateway key"
3Copy your new SHIM key (starts with sk-shim-)
Step 4

Call Your Provider's Native API

Keep the provider's native route and payload. The OpenAI and Anthropic SDK examples below change their base URL and API key; Gemini generateContent keeps its own route without translation or automatic failover.

Tested with openai==2.53.0 and anthropic==0.121.0. Compatibility covers the documented endpoints, not every SDK resource.

OpenAI SDK example

Before:api_key = "sk-your-openai-key"
After:api_key = "sk-shim-your-key"

+ Add base_url="https://api.getshim.tech/v1"

🐍 Python
# Tested with openai==2.53.0
from openai import OpenAI

client = OpenAI(
    api_key="sk-shim-your-key",        # ← Your SHIM key
    base_url="https://api.getshim.tech/v1"  # ← Add this line
)

response = client.responses.create(
    model="gpt-5.6-luna",
    input="Hello!",
    max_output_tokens=128
)
chat = client.chat.completions.create(
    model="gpt-5.6-luna",
    messages=[{"role": "user", "content": "Hello!"}]
)
models = client.models.list()
🐍 Anthropic Python
# Tested with anthropic==0.121.0
from anthropic import Anthropic

client = Anthropic(
    api_key="sk-shim-your-key",
    base_url="https://api.getshim.tech"
)

message = client.messages.create(
    model="claude-haiku-4-5",
    max_tokens=128,
    messages=[{"role": "user", "content": "Hello!"}]
)
beta_message = client.beta.messages.create(
    model="claude-haiku-4-5",
    max_tokens=128,
    messages=[{"role": "user", "content": "Hello!"}]
)
models = client.models.list()
⚡ JavaScript / TypeScript
import OpenAI from 'openai';

const client = new OpenAI({
    apiKey: 'sk-shim-your-key',         // ← Your SHIM key
    baseURL: 'https://api.getshim.tech/v1', // ← Add this line
});

const response = await client.chat.completions.create({
    model: 'gpt-5.6-luna',
    messages: [{ role: 'user', content: 'Hello!' }],
    max_completion_tokens: 128
});
🖥️ cURL
curl https://api.getshim.tech/v1/responses \
  -H "Authorization: Bearer sk-shim-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-luna",
    "input": "Hello!",
    "max_output_tokens": 128
  }'

Anthropic Messages

POST /v1/messages

The SDK supports regular/beta Messages and provider-aware Models. Its x-api-key authenticates SHIM; one-request Anthropic BYOK uses x-provider-key.

Gemini Developer API

POST /v1beta/models/{model}:generateContent

Send the native Gemini payload. For streaming, call :streamGenerateContent?alt=sse.

For the full provider-native examples and invocation-scoped credential headers, see the API documentation.

Step 5

Test It!

Run a request through each supported API shape and confirm the policy behavior you configured:

Test PII Redaction

With the relevant PII rule enabled, send "My email is john@example.com" and confirm SHIM restores the value only in the client-facing response.

Test Model Admission

Send an approved model, then try an unapproved model and confirm it is rejected before the selected provider is called.

Step 6

Monitor Usage and Budgets

Head back to your dashboard to inspect tenant-scoped request, usage, cost, budget, and governance records.

In Your Dashboard You'll See:

Daily requests, tokens, and settled cost
PII policy and redaction activity
Request lifecycle and status activity
Budgets, alerts, audit, and compliance evidence
Go to Dashboard

That's It! You're Done 🎉

Your AI provider traffic now passes through SHIM's validation, admission, privacy, accounting, and audit path.

3 Providers
OpenAI, Anthropic, Google
Native APIs
No protocol translation
Per Request
Policy + Accounting

Ready to Get Started?

Join developers who trust SHIM to secure their AI infrastructure. Start free, scale as you grow.