co/core
Developer docsDocs
Jump to
Getting started

Quickstart

Create an API key, then point your OpenAI client at co/core.

Authentication

Every request needs a co/core API key in the Authorization header, using the same Bearer format as OpenAI. Keys are shown once when you create them — store yours somewhere safe.

Authorization: Bearer cocore-...

Invalid or missing keys return 401 authentication_error. See HTTP errors for the full envelope.

Make a request

Point your client at https://console.cocore.dev/api/v1 and pass your API key. Pick a model from the directory below, or use stub while testing.

Model

Loading the live model directory…

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://console.cocore.dev/api/v1",
  apiKey: "cocore-...",
});

const stream = await client.chat.completions.create({
  model: "stub",
  messages: [{ role: "user", content: "Hello" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}