Knit
LLM provider

Connect OpenAI (and OpenAI-compatible APIs) to Knit

Knit supports OpenAI directly, and the same provider doubles as the adapter for any OpenAI-compatible API. Use the official OpenAI endpoint with just your key, or set a custom base URL to reach a compatible gateway (Azure OpenAI, OpenRouter, vLLM, LiteLLM, and similar). Bring-your-own keys consume zero Knit credits.

Before you start

  • An OpenAI account, or access to an OpenAI-compatible API gateway.
  • An API key for that service.
  • For compatible gateways: the public base URL of the endpoint.
  • A Knit account, signed in.

Steps

  1. 1

    Get your API key

    Create an API key in the OpenAI platform (platform.openai.com) or in your OpenAI-compatible provider’s dashboard. Copy it.

  2. 2

    Open Knit settings → API Keys

    In Knit, open /app, click the settings gear, and select the "API Keys (BYO)" tab.

  3. 3

    Add the key

    Click add, label it, and choose OpenAI as the provider. Paste your API key. For the official OpenAI API, leave the base URL empty. For an OpenAI-compatible gateway, enter its public base URL in the base URL field. Save.

  4. 4

    Select a model

    Open a project and pick your OpenAI connection. The default model is gpt-4.1; the model selector lists the models your key can access.

  5. 5

    Generate a schematic

    Describe your circuit in chat. Knit asks the model to write SkiDL (Python), runs it in a sandbox, and returns the schematic preview and KiCad export — with no Knit credits consumed.

Frequently asked questions

How do I use an OpenAI-compatible API (Azure, OpenRouter, vLLM, etc.)?
Choose OpenAI as the provider and set the base URL field to your gateway’s public endpoint. Knit’s OpenAI adapter honors a custom base URL, so there is no separate "OpenAI-compatible" provider to pick.
Do I need a base URL for the official OpenAI API?
No. Leave the base URL empty to use OpenAI’s default endpoint. Only set it when targeting an OpenAI-compatible gateway.
Must the base URL be public?
Yes. Like all user-supplied endpoints in Knit, the base URL must be a public http(s) URL; localhost and private IPs are blocked for security.
Which OpenAI model is used by default?
The default OpenAI model is gpt-4.1. You can switch to any other model your key has access to from the model selector.
Ready to build?
Add your connection in Settings → API Keys inside the app, then describe a circuit in chat. Open the app →

Related guides