Inference
Configure an OpenAI-compatible client, discover models, and make a first request.
OpenPond Chat exposes hosted catalog models at /opchat/v1. Use a normal
OpenAI-compatible client with an OpenPond API key and an explicit model ID.
Open Ponder → Inference in the Console. Use Overview for hosted and personalized usage, Models for the callable catalog, Deployments for your trained models, and API for setup. Hosted models use OpenPond Chat; your trained deployments use Your models.
Request flow
Hosted models
Hosted catalog models are discovered at /opchat/v1/models and invoked through
/opchat/v1/chat/completions. They use the opchat:model:read and
opchat:chat:create scopes.
First request
Create an API key with opchat:model:read and opchat:chat:create. Set OPENPOND_API_KEY in server-side environment management. Use a model ID returned by the catalog and review its rates before sending a request.
Install openai with npm install openai for JavaScript or pip install openai for Python.
import OpenAI from "openai";
const apiKey = process.env.OPENPOND_API_KEY?.trim();
if (!apiKey) throw new Error("OPENPOND_API_KEY is required");
const openai = new OpenAI({
apiKey,
baseURL: "https://api.openpond.ai/opchat/v1",
});
const models = await openai.models.list();
const model = models.data[0]?.id;
if (!model) throw new Error("No hosted OpenPond models are available");
const completion = await openai.chat.completions.create({
model,
messages: [{ role: "user", content: "Write one sentence about clean APIs." }],
});
console.log(completion.choices[0]?.message.content);Keep credentials on your server and out of browser bundles, repositories, recordings, and notebook output.
OpenAI-compatible API
OpenPond's hosted catalog uses the OpenAI-compatible base URL:
https://api.openpond.ai/opchat/v1Authenticate with an OpenPond API key that has opchat:model:read to list
models and opchat:chat:create to create completions.
Core endpoints
| Endpoint | Purpose |
|---|---|
GET /models | List public hosted catalog models. |
GET /models/{model} | Read one public hosted model. |
POST /chat/completions | Create a regular or streaming completion. |
Compatibility boundary
Use standard chat-completions request and streaming shapes. Always validate the exact feature you need—such as tools, streaming, cancellation, or structured errors—against the selected model and the current API response.
Continue with Streaming, Tool calling, or the Model catalog.
Example result
The first-request examples print the assistant's response. An illustrative answer to the example prompt is:
A clean API makes its inputs, outputs and errors predictable.Actual wording varies by model. Inspect the response's usage and finish reason as well as the text; a partial or rejected request is not a complete answer.
For a complete application path, follow the first model request tutorial.
Sources
- OpenAI JavaScript SDK and Python SDK: compatible client interfaces.
- API keys and Model catalog: OpenPond authorization and current model discovery.