API · Guides

Moving from OpenAI

If your code uses an OpenAI SDK, switching usually takes three changes: the base URL, the key and the model name. Here’s what carries over, what doesn’t, and which model to pick.

01What to change

Python (diff)
from openai import OpenAI

- client = OpenAI()                                    # api.openai.com, OPENAI_API_KEY
+ client = OpenAI(base_url="https://vantra.cloud/api/v1",
+                 api_key=os.environ["VANTRA_API_KEY"])

  reply = client.chat.completions.create(
-     model="gpt-4.1",
+     model="core-apex",
      messages=[{"role": "user", "content": "Review this function for bugs: ..."}],
  )
Terminal
# Many tools and SDKs read these, so this alone can be enough:
export OPENAI_BASE_URL=https://vantra.cloud/api/v1
export OPENAI_API_KEY=vk_your_key_here

Get a key on Your API (sign in with Whop; your first key comes with free credit). The same three changes work in the Vercel AI SDK, LangChain and LlamaIndex: see the framework guides.

02Which model to use

GPT-4.1, GPT-4o, o3 / o4-mini (coding, reasoning, agents)core-apexDeepSeek V4 Flash, 1M context. Set reasoning_effort to "low" or "high" for thinking. Text only.
GPT-4.1 mini / nano, GPT-4o mini (fast, cheap, pictures)core-swiftQwen3.5-9B, 256K context. Reads pictures.
text-embedding-3-small / -largecore-embedQwen3-Embedding-8B, 4,096 dimensions; ask for fewer with dimensions. Vectors aren’t compatible with OpenAI’s, so re-index.

A rough guide, not a benchmark: try your own prompts. Prices are on the API docs.

03What works

  • Chat completions, with streaming (including stream_options.include_usage)
  • Tool calling: tools, tool_choice, parallel_tool_calls, and tool results
  • JSON output: response_format json_object and json_schema
  • Pictures in user messages (core-swift), as https:// or data: URLs
  • The Responses API, without stored responses
  • Embeddings, with dimensions and base64 output
  • temperature, top_p, max_tokens (or max_completion_tokens), stop, seed, presence_penalty, frequency_penalty, and n (up to 4 answers, streamed or not)
  • GET /models and GET /models/{id} (models.retrieve)

04What isn’t supported

  • Stored responses: previous_response_id and conversations. VANTRA keeps nothing, so send the whole conversation each time.
  • Built-in tools in the Responses API (web search, file search, code interpreter, computer use)
  • Assistants, threads, files, vector stores, batch and fine-tuning endpoints
  • Audio (speech, transcription, realtime), image generation and moderation endpoints
  • logprobs and logit_bias (they’re ignored)
  • Pictures on core-apex (send them to core-swift)

05What’s different

Credit
Prepaid, from Your API ($5, $10 or $25 packs). When it runs out, requests return 402 insufficient_credit (OpenAI uses 429 insufficient_quota).
Limits
60 requests a minute per key. A busy model host returns 503 model_busy with retry-after; OpenAI SDKs retry it for you.
Keys
Optional per-key monthly spending limits, allowed models and expiry dates, set on Your API.
Data
Nothing you send is stored or used for training. Your API shows each request’s metadata for 7 days (result, tokens, cost, request ID), never its content.
Request IDs
Every response has an x-vantra-request-id header. Non-streamed answers also have x-vantra-cost-usd.