Skip to main content
If your app already calls the OpenAI API, switching to Deepshi is a two-line change. Deepshi speaks the same protocol, so your prompts, SDKs, and most tooling keep working.

The two changes

1

Change the base URL

Point your client at https://api.deepshi.ai/v1 instead of OpenAI’s base URL.
2

Use your Deepshi key

Replace your OpenAI key with your Deepshi key (sk-bf-...). See Authentication.
  from openai import OpenAI

  client = OpenAI(
-     base_url="https://api.openai.com/v1",
-     api_key=OPENAI_API_KEY,
+     base_url="https://api.deepshi.ai/v1",
+     api_key=DEEPSHI_API_KEY,
  )

Update model names

Set the model field to a Deepshi catalog id such as deepshi-2.0 or deepshi-3.0. You can also reference frontier models that Deepshi exposes; check the models catalog for available ids.
-  model="gpt-4o",
+  model="deepshi-3.0",

What carries over

  • Chat completions request/response shapes.
  • Streaming (stream: true) and the SSE format.
  • Tool / function calling.
  • Most libraries and agent frameworks built on the OpenAI API, as long as you override the base URL and key.

Things to check

  • Pricing and credits work differently. Deepshi uses prepaid, USD-denominated credits. See Pricing & credits.
  • Error codes mostly match OpenAI, with 402 specifically meaning you’re out of credits. See Errors.
  • Parameters a given model doesn’t support are ignored rather than rejected.