### OpenAI Node SDK Integration Source: https://platform.cheaperinference.com/docs/integrations Example of how to initialize the OpenAI Node SDK to communicate with the Cheaper Inference API. ```APIDOC ## OpenAI Node SDK Integration ### Description This example demonstrates how to configure the OpenAI Node.js SDK to point to the Cheaper Inference API base URL and perform a chat completion request. ### Implementation ```typescript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.CHEAPER_INFERENCE_API_KEY, baseURL: "https://api.cheaperinference.com/v1", }); const response = await client.chat.completions.create({ model: "gpt-5.4", messages: [{ role: "user", content: "Hello" }], }); ``` ``` -------------------------------- ### OpenAI Node SDK Integration Source: https://platform.cheaperinference.com/docs/integrations Example configuration for the OpenAI Node SDK using the Cheaper Inference base URL and an API key from environment variables. ```typescript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.CHEAPER_INFERENCE_API_KEY, baseURL: "https://api.cheaperinference.com/v1", }); const response = await client.chat.completions.create({ model: "gpt-5.4", messages: [{ role: "user", content: "Hello" }], }); ``` -------------------------------- ### Cheaper Inference Base URL Source: https://platform.cheaperinference.com/docs/integrations The base URL required for configuring OpenAI-compatible, Codex, and Anthropic-compatible integrations. ```text https://api.cheaperinference.com/v1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.