Migrate to UltraGPT · UltraGPT API

Migrate to UltraGPT

Coming from OpenAI, OpenRouter or Anthropic, you change the base URL and the key - nothing else. The lines marked + and - below are the whole migration.

from openai import OpenAI

client = OpenAI(
-    api_key=os.environ["OPENAI_API_KEY"],
+    base_url="https://api.ultragpt.pro/v1",
+    api_key=os.environ["ULTRAGPT_API_KEY"],
)
# Everything else stays: chat.completions, responses, embeddings,
# images, audio, files, batches. Pick any model from /v1/models:
response = client.chat.completions.create(model="grok-4.7", messages=messages)
  • Model ids: list them with GET /v1/models or browse the Models page; ids from other providers are not aliased.
  • Billing is prepaid: top up credits first. Spend limits can be set per key and per day.
  • Unsupported parameters are dropped and listed in the x-ultragpt-ignored-params header instead of failing.
  • Generated clients: use the OpenAPI spec (/openapi.json) or import the Postman collection. Postman / Bruno / Insomnia