API ReferenceCore API
Chat Completions Endpoint Reference
Complete specification for the /v1/chat/completions endpoint, request schema, parameter defaults, and response format.
The /v1/chat/completions endpoint conforms 100% to the OpenAI Chat Completions specification.
Supported parameters include:
• model (string, required): Model ID (e.g. claude-3-5-sonnet, gpt-4o, deepseek-r1).
• messages (array, required): Conversational message objects with role and content.
• stream (boolean, optional): Stream tokens as Server-Sent Events (SSE). Default is false.
• temperature (float, optional): Sampling temperature between 0 and 2. Default is 0.7.
• max_tokens (integer, optional): Maximum tokens to generate.
TypeScript / Node.jstypescript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.apihundred.com/v1",
apiKey: process.env.API100_API_KEY,
});
const completion = await client.chat.completions.create({
model: "deepseek-r1",
messages: [
{ role: "system", content: "You are a quantitative researcher." },
{ role: "user", content: "Derive the Black-Scholes formula." }
],
temperature: 0.2,
});
console.log(completion.choices[0].message.content);
