AI PLATE/ DocsBack to AI Plate
Documentation / AI providers
YOUR AI PLATE HANDBOOK

OpenAI

Configure OpenAI in AI Plate and verify a request from Node.js.

Desktop source reviewed October 5, 2026

1. Configure your credentials

Create an API key in your OpenAI account. In AI Plate, open Settings → System Configuration → .env (API Keys & Secrets). Add the key locally, save, then select the provider and model in Models. Use the displayed resolved path when editing files outside the app.

.env — desktop app only
OPENAI_API_KEY=YOUR_API_KEY
MODEL=YOUR_MODEL_ID
dotenv

2. Select the provider and model

Merge into config.yaml
provider:
  active: "openai"
  models:
    openai: "YOUR_MODEL_ID"
yaml

Replace YOUR_MODEL_ID with a model available to your account. For OpenRouter use the complete provider/model slug. Model catalogs and tool support change; these docs do not guarantee that the app’s bundled model list remains available.

The app uses the OpenAI-compatible driver at https://api.openai.com/v1. A MODEL environment variable overrides the YAML default model. Clear it if you want YAML to control the model. Restart the app after external file edits if the selection has not refreshed.

Implementation sources

Paths in your AI Plate source checkout:

  • core/config.ts
  • providers/provider-registry.ts
  • providers/openai-provider.ts

3. Verify a request from Node.js

Run this separately from the desktop app. Use a new Node.js project and a local .env with the same credential plus MODEL. The request may incur provider usage charges. No credentials or live requests are required for this verification.

Terminal
npm init -y
npm install openai
node --env-file=.env check-provider.mjs
shell
check-provider.mjs
import OpenAI from 'openai';

if (!process.env.OPENAI_API_KEY || !process.env.MODEL) {
  throw new Error('Set OPENAI_API_KEY and MODEL');
}
const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: 'https://api.openai.com/v1',
});
const result = await client.chat.completions.create({
  model: process.env.MODEL,
  messages: [{ role: 'user', content: 'Reply with: connection ready' }],
});
console.log(result.choices[0]?.message?.content);
javascript

The Chat Completions example matches the protocol used by AI Plate’s current OpenAI-compatible driver.

4. Verify tools and embeddings

  • Send a short message in the desktop app and confirm the selected provider/model.
  • Enable Hello Tools and ask it to greet Ada. The selected model must support tool calling.
  • Configure embedding.provider and embedding.model separately before using document search. A successful chat request does not verify embeddings.
  • For authentication failures check the key and account access; for 429 responses inspect the provider’s quota, billing, and limits. Never include credentials in bug reports.
Implementation sources

Paths in your AI Plate source checkout:

  • providers/provider-factory.ts
  • core/embedder.ts
AI Plate product & developer documentation · Static reference, no API keys collected.