GET STARTED
Quickstart
Make your first request with an OpenAI SDK.
Before you start
Create an account, set up your organization, add credit, and generate an API key. Registration is open to everyone. New organizations start with zero credit.
- Create an account using Google or verify your email with a one-time code.
- Create your own organization, or accept a team invitation to join an existing one.
- Open Billing and add credit, or follow your account’s funding instructions.
- Open API keys, create a key, and copy the secret. It is shown once.
1. Install the SDK
Use the official OpenAI SDK in your server-side application. No additional SDK is required.
npm install openaiStore your key in your environment or secret manager:
export CHEAPINFERENCE_API_KEY="rl_live_YOUR_ORGANIZATION_KEY"Never put the key in a NEXT_PUBLIC_ variable, client-side JavaScript, a mobile binary, or a public repository.
2. Make your first request
Set the base URL below and use your organization API key. Model names do not need a provider prefix.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://www.cheapinference.dev/v1",
apiKey: process.env.CHEAPINFERENCE_API_KEY,
});
const response = await client.responses.create({
model: "gpt-5.4-mini",
input: "Build something great.",
max_output_tokens: 1024,
store: false,
});
console.log(response.output_text);3. See what it used
The response includes provider-reported token usage. The Usage page records the model, token counts, usage value, status, and latency. We do not save the prompt or response content.
{
"input_tokens": 24,
"output_tokens": 18,
"total_tokens": 42
}This is an illustrative response shape, not a guaranteed token count. Streaming usage appears in a terminal event.
Where to go next
- Stream output as it is generated.
- Use function tools in your application.
- Understand credit and usage accounting.
- Troubleshoot errors and unsupported parameters.