Browse these docs

Docs / Indicator Lab

Connect your AI

QuantLab's model versus your own, and how the key is stored.

The Lab works in one of two modes. Without a connection it uses QuantLab's own model, which writes Pine and checks that it compiles. With your own AI connected, the model also checks the script on TradingView and produces a second form of the build that runs on QuantLab bars.

QuantLab's modelYour connected AI
Writes Pine v6YesYes
Compile checkYesYes, verified on TradingView
Runs on QuantLab barsNo, Pine export onlyYes, when every line can be translated
CostNo key neededBilled by your provider

Connecting

Press Connect AI in the strip above the composer, or the Connect AI chip, to open the dialog. You have two routes.

  • Sign in with OpenRouter. This opens openrouter.ai in a popup. One OpenRouter key reaches Claude, GPT, DeepSeek, GLM and MiniMax models, billed to your own OpenRouter credits.
  • Paste an API key from a provider directly: Claude, an OpenAI API key, DeepSeek, GLM (Z.ai) or MiniMax. Each row links to the page where you create a key.

After you pick a provider you can edit the model name, test the connection and press Connect. The dialog header confirms the provider and model you are on.

Where the key lives

Your key stays in this browser. QuantLab never receives it. Tick Remember on this device to keep it between visits. Left unticked, the key is held in memory only and goes when you reload or close the tab. Press Disconnect in the dialog to clear it, and the Lab returns to QuantLab's model.