OpenAI
OpenAI connects through the generic openai-compatible provider. There is no separate OpenAI adapter. The full
rules are on Connect OpenAI-compatible providers and in the
reference page.
Tested status
Section titled “Tested status”Not tested against the live service. No request was ever sent to OpenAI by a test or for this page.
What was checked:
- The adapter has one test against a local mock server shaped like OpenAI: the request path (
/v1/chat/completions), a model name of this service’s form (gpt-4o-mini), the answer text and the token counts it reports. The mock server runs on the loopback address; it is not OpenAI. - The
connectcommand below was run for this page with an obviously fake key file. It makes no network call, and its output is shown. - The
priceandtestcommands below are checked only to be valid command lines. They were not run for OpenAI:priceneeds a catalog entry first, andtestneeds the network.
Nothing here promises OpenAI’s live behaviour: certificates, rate limits, error bodies, usage fields or model names.
What works
Section titled “What works”- Plain text chat completions:
POST https://api.openai.com/v1/chat/completions. - The key goes only to
api.openai.com:443, the host the operator binds it to. - Not in this version: streaming, tool calls and JSON mode, embeddings, image input and
/responses.
1. Bind the key (operator)
Section titled “1. Bind the key (operator)”The key is never typed into a command. The operator writes it to a file and names it in a binding file. The value below is obviously fake.
mkdir -p keysprintf 'obviously-fake-test-key-not-a-secret' > keys/openai.keychmod 600 keys/openai.keyprintf '{"keys":{"openai":{"file":"%s/keys/openai.key","hosts":["api.openai.com:443"]}}}' "$PWD" > keys/bindings.jsonchmod 600 keys/bindings.jsonexport NURAMESH_OPENAI_COMPATIBLE_KEYS="$PWD/keys/bindings.json"2. Connect
Section titled “2. Connect”--key is the name from the binding file, never the key.
nuramesh init my-teamnuramesh models connect openai-compatible --team my-team --human human:you \ --endpoint-id openai --endpoint https://api.openai.com/v1 \ --auth key --key openai --yesOutput from a real run with the fake key file above:
connection for openai-compatible/openai created; ledger entry 13. Add the model and set its price
Section titled “3. Add the model and set its price”A model is written openai-compatible/openai/<model>. The model name gpt-4o-mini below is an example of the form; check
the service’s own list. Add the model to the approved catalog on the Models page of the app (Catalog tab) or
through the API (POST /v1/models/catalog/*); the command line cannot create a catalog entry for a hosted
service. Without the entry, the price command answers that the model is not in the model catalog and exits 3.
Then set the price. Prices are per million tokens in US dollars; the numbers below are placeholders, not
OpenAI’s prices. --reason is required.
nuramesh models price openai-compatible/openai/gpt-4o-mini --team my-team --human human:you \ --input-price 0.5 --output-price 1.5 \ --effective-from 2026-11-20T00:00:00Z --source "vendor price list" \ --reason "price from the vendor's list" --yesA missing price blocks the call and records the block.
4. Test the connection
Section titled “4. Test the connection”nuramesh models test openai-compatible --team my-team --human human:you --endpoint-id openainuramesh models check --team my-team --data syntheticmodels test is one metadata request: no prompt and no spend. models check says whether a run would start.
Good to know
Section titled “Good to know”- Synthetic data only. A real run needs
--data syntheticand--confirm-cap USD, and spends real money. See Model connections and spend caps. - Retries: a 429 is retried up to 3 attempts (a
Retry-Afterof up to 30 seconds is honoured); a 503 only when it carries a validRetry-After; a 500 or another 4xx is not retried. - If the service answers without usage numbers, the cost is recorded as unknown.
Was this page helpful?