HridaSpro Docs

Migrations

Migrate from Direct Providers

Move from calling OpenAI, Anthropic, or Google SDKs directly to routing through Spro.

If you call OpenAI, Anthropic, Google, or another provider directly, migrating to Spro is the same two-value change — and you can uninstall provider-specific SDKs afterward.

From the OpenAI SDK

# Before — OpenAI directclient = OpenAI(api_key="<openai-key>")
# After — Sproclient = OpenAI(    base_url="https://spro.hridaai.com/v1",    api_key="<spro-api-key>",)
response = client.chat.completions.create(    model="gpt-oss-20b",  # provider prefix on every model    messages=[{"role": "user", "content": "Hello!"}],)

The only difference is the provider prefix on model names — see Models.

From the Anthropic SDK

Two options — pick whichever means less change for you:

Keep your Anthropic code. The Messages API (/v1/messages) is Anthropic-compatible, so the usual base-URL change works. Spro accepts both the native x-api-key header and Authorization: Bearer:

# Before — Anthropic directclient = Anthropic(api_key="<anthropic-key>")
# After — Sproclient = Anthropic(    base_url="https://spro.hridaai.com/v1",    api_key="<spro-api-key>",)
message = client.messages.create(    model="anthropic/claude-sonnet-4",    max_tokens=1024,    messages=[{"role": "user", "content": "Hello!"}],)

See the Messages API reference.

Or standardize on the OpenAI SDK. Spro returns the normalized OpenAI shapes documented in the Chat Completions API:

import OpenAI from "openai";
const client = new OpenAI({  baseURL: "https://spro.hridaai.com/v1",  apiKey: "YOUR_SPRO_API_KEY",});
const response = await client.chat.completions.create({  model: "anthropic/claude-sonnet-4", // any provider through the same client  messages: [{ role: "user", content: "Hello!" }],});

One client now reaches every provider — no more maintaining separate SDKs, retry logic, and error handling per provider. Google and other native SDKs follow the same pattern: switch to the OpenAI SDK pointed at Spro (Google's Gemini models speak the OpenAI surface through Spro).

Images and embeddings

Image and embedding calls migrate the same way — point the OpenAI SDK at Spro and the images.generate / images.edit / embeddings.create calls work unchanged. See Images and Embeddings.

Keeping your provider keys?

With BYOK you can connect your own provider credentials and keep your existing pricing, quotas, and billing relationships while routing traffic through Spro. BYOK keys are used first automatically — managed access is the fallback.

Verify the migration

  1. Send a test request and confirm the response shape matches your expectations
  2. Check your dashboard — the request should appear with token counts and latency
  3. Swap a second provider's model ID into the same client and confirm it just works

What's Next