Skip to main content
Keep the official OpenAI client and Chat Completions request format. Change the client’s base URL and API key, then choose a model from the Token Factory catalog. Model IDs and feature support differ from OpenAI’s hosted models.

Prerequisites

  • A Token Factory API key. See Authentication.
  • Python with the openai package, or Node.js with the openai package.
  • A model ID from the live catalog.
Set the key in your shell:

Configure the client

The highlighted constructor fields route the client to Token Factory. Requests use the standard Bearer header generated by the OpenAI SDK.

Run the repository examples

A non-2xx response raises the SDK’s API error type with the structured Token Factory error body. Configure timeouts and retries through the SDK as you would for any remote inference service.

Model IDs

Token Factory model IDs use namespace/model format. List the public catalog before hard-coding an ID:
Do not add a corvex/ prefix. The model catalog documents input types, context windows, capabilities, and rates.
  • Quickstart — test the endpoint with curl.
  • Errors — handle authentication, validation, rate-limit, and server failures.
  • API reference — review the supported OpenAI-compatible request and response fields.
Last modified on September 15, 2026