DocsAPI reference
Responses
The OpenAI Responses shape, which the newer OpenAI SDKs use by default. Same key, same billing, same base URL.
POST/v1/responses
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://velaron.ai/v1", apiKey: process.env.KREDIT_KEY });
const response = await client.responses.create({
model: "openai/gpt-4o",
instructions: "Answer in one sentence.",
input: "What does a Velaron.AI credit buy?",
});
console.log(response.output_text);Request#
- model
A chat model id from
GET /v1/models.- input
A string or an array of input items, exactly as the OpenAI API defines them.
- instructions
Counted toward the input estimate for the balance check, then forwarded as is.
- max_output_tokens
Lowered by Velaron.AI when your balance cannot cover it, so an answer is never cut off by an empty balance halfway through.
- stream
Server-sent events. Usage is read from the
response.completedevent.
Response#
The provider's JSON plus the two billing headers on non-streamed answers. Cached input tokens reported in input_tokens_details.cached_tokens are billed at the model's cache price.
Errors come back in the OpenAI shape. A body without model and input answers 400 invalid_body with Send a JSON body with `model` and `input` (a string or an array of items).
