Skip to main content

GPT-6.1 Sol is now available in AI Gateway

AI Gateway now supports GPT-6.1 Sol from OpenAI.

Call it as openai/gpt-6.1-sol. It’s a built-in model with a 1M token context window, so your ngrok access key and credits cover inference and you don’t need your own OpenAI key. Input tokens cost $2.00 per million and output tokens cost $10.00 per million.

Point an OpenAI SDK client at AI Gateway to try the model in your application and inspect its requests in one place.

Check Models to confirm current prices and supported request formats. Costs depend on the tokens your application sends and receives.

Get started

Create an ngrok account or sign in. Create an access key that allows OpenAI and GPT-6.1 Sol, and confirm your account has credits.

Optionally, try GPT-6.1 Sol in the playground.

Follow the setup guide and select OpenAI and TypeScript.

Install the OpenAI SDK and TypeScript runner:

npm install openai && npm install --save-dev tsx

Save your ngrok access key in .env.local. Keep this file out of version control:

AI_GATEWAY_API_KEY=your_access_key_here

Use an ES module project ("type": "module" in package.json) for top-level await. Save this example as index.ts:

import OpenAI from "openai"; const client = new OpenAI({	baseURL: "https://gateway.ngrok.ai/v1",	apiKey: process.env.AI_GATEWAY_API_KEY,}); const response = await client.chat.completions.create({	model: "openai/gpt-6.1-sol",	messages: [{ role: "user", content: "Explain HTTP retries in two sentences." }],}); console.log(response.choices[0]?.message.content);

Run the example from your project directory to print the response:

node --env-file=.env.local --import tsx index.ts

Open Logs, find the request you just sent, and inspect its model, provider, status, token usage, and cost.