Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Using Oxlo with OpenAI SDK for LLM

说明与用途

Oxlo.ai 允许使用 45+ LLM、视觉和音频模型,无需更改代码,只需更改基础 URL 和 API 密钥。

问题

Inference providers often require rewriting client code or managing fragmented SDKs when switching backends.

结果

By switching to Oxlo.ai, teams can access 45+ models across seven categories with zero code changes, preserving existing logic and reducing engineering effort.

工作流

  • 1. Sign up at Oxlo.ai and obtain an API key.
  • 2. Install the official OpenAI SDK (pip install openai or npm install openai).
  • 3. Set the environment variable OXLO_API_KEY with your key.
  • 4. Instantiate the OpenAI client with base_url="https://api.oxlo.ai/v1" and the API key.
  • 5. Call any supported model (e.g., llama-3.3-70b) using the same chat.completions API.
  • 6. For streaming, set stream=True and iterate over chunks.
  • 7. For function calling or tool use, define tools in the request and let the model invoke them.
  • 8. For vision or multimodal inputs, include image URLs or base64 strings in the message content array.
  • 9. Deploy the updated client in production without changing retry logic, token counting, or streaming parsers.

证据

Oxlo.ai removes that friction. Because the platform is fully OpenAI SDK compatible, you can point your existing Python or Node.js client to Oxlo.ai and immediately access 45+ models across seven categories, from reasoning LLMs to vision and audio, without changing your application logic.

来源

The platform exposes chat/completions, embeddings, images/generations, audio/transcriptions, and audio/speech endpoints that follow the OpenAI schema exactly.

来源

  • 记录日期: 2026-09-15T22:30:23.434Z