# Try Kimi K3.1 Pro, GPT-6.1 Terra, Hy4, and Gemma 4 in AI Gateway

> New models from Moonshot AI, OpenAI, MiniMax, Tencent, and Google run on your ngrok access key and credits, and switching between them changes one string.

- Date: 2026-11-09
- Shipped by: Mohamed, Brenden Ehlers, Nijiko Yonskai, and Alice Wasko
- Products: AI Gateway
- URL: https://ngrok.com/changelog/ai-gateway-kimi-terra-hy4

Say your on-call robot slept through a 3 a.m. page. We asked every model AI Gateway added last week to write its excuse in one sentence. GPT-6.1 Terra kept it short:

> "I was awake, but the page got routed to my dreams queue."

Hy4 blamed a coworker:

> "I routed the 3 a.m. page to my dream instance, which confidently marked it resolved and forgot to wake production me."

Every model below runs on your ngrok access key and credits. You don't need an account with Moonshot AI, OpenAI, MiniMax, Tencent, or Google, and each one accepts the same OpenAI chat completions request.

| Model                   | ID                                   | On ngrok credits through | Input / output per 1M tokens |
| ----------------------- | ------------------------------------ | ------------------------ | ---------------------------- |
| GPT-6.1 Terra           | `openai/gpt-6.1-terra`               | OpenAI                   | $1.00 / $5.00                |
| Kimi K3.1 Pro           | `moonshotai/kimi-k3.1-pro`           | Moonshot AI, QwenCloud   | $2.00 / $10.00               |
| Kimi K3.1 Pro HighSpeed | `moonshotai/kimi-k3.1-pro-highspeed` | Moonshot AI              | $4.00 / $20.00               |
| MiniMax M3.1 Flash      | `minimax/minimax-m3.1-flash`         | MiniMax                  | $0.15 / $0.60                |
| Hy4                     | `tencent/hy4`                        | TokenHub                 | $0.834 / $2.501              |
| Gemma 4 31B             | `google/gemma-4-31b-it`              | Google, LLM API          | $0.14 / $0.40 on LLM API     |
| Gemma 4 26B A4B         | `google/gemma-4-26b-a4b-it`          | Google, LLM API          | $0.13 / $0.40 on LLM API     |

![AI Gateway Models page in dark mode, filtered to k3.1-pro OR 6.1-terra OR m3.1-flash OR hy4, showing MiniMax M3.1 Flash, Kimi K3.1 Pro, Kimi K3.1 Pro HighSpeed, GPT-6.1 Terra, Hy4, and the older Hy4 preview with their 1M context windows and token prices.](https://ngrok.com/blog-assets/images/2026-11-09-ai-gateway-kimi-terra-hy4/new-models-dark.png)

The prices on the label aren't the whole story. The same one-sentence excuse cost $0.00012 on GPT-6.1 Terra and $0.00516 on Kimi K3.1 Pro, more than 40 times as much. Kimi always thinks before it answers, and it billed 598 tokens to write one sentence. Some details to check before you pick:

- **GPT-6.1 Terra** costs half as much as GPT-6.1 Sol and has a 1.05M-token context window. Prompts over 272K input tokens cost $2.00 input and $7.50 output per 1M tokens.
- **Kimi K3.1 Pro** can't turn thinking off. Set `reasoning_effort` to `low`, `high`, or `max` to control how long it thinks. **HighSpeed** is the same model at two to three times the speed and twice the price.
- **MiniMax M3.1 Flash** has a 1M-token context window for $0.15 per 1M input tokens. Set `reasoning_effort` to trade depth for speed.
- **Hy4** is Tencent's new 1M-context model with image input. AI Gateway bills TokenHub's list price, not its launch promotion.
- **Gemma 4** takes text input. Google hasn't published paid Gemma 4 pricing, so check [**Models**](https://app.ngrok.ai/models) for the current Google price before you build on it. Through Google, chat completions return Gemma's thinking inside `<thought>` tags in the message. Strip the tags, or pin the request to LLM API with `llmapi:google/gemma-4-31b-it` to get the answer alone.

A bare model ID goes to the model's author first and falls back to other providers that serve it. To choose the provider yourself, prefix its ID, such as `qwencloud:moonshotai/kimi-k3.1-pro`. The [model selection guide](https://ngrok.com/docs/ai-gateway/guides/model-selection-strategies) has the details.

## Get started

[Create an ngrok account or sign in](https://app.ngrok.ai/). Create an [**access key**](https://app.ngrok.ai/keys) that allows your chosen provider and model, and confirm your account has credits. Every model here accepts OpenAI chat completions requests.

Optionally, give the robot's excuse prompt to a few models in the [playground](https://app.ngrok.ai/playground) first.

Follow the [**setup guide**](https://app.ngrok.ai/getting-started) and select **OpenAI** and **TypeScript**.

Install the OpenAI SDK and TypeScript runner:

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

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

```dotenv
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`:

```typescript
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: "moonshotai/kimi-k3.1-pro",
	messages: [
		{
			role: "user",
			content: "Our on-call robot slept through a 3 a.m. page. Write its excuse in one sentence.",
		},
	],
});

console.log(response.choices[0]?.message.content);
```

Run the example from your project directory:

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

It prints one excuse. Ours was "I was optimizing uptime by dreaming about it, and apparently my sleep process had higher priority than your 3 a.m. page." Yours will be different.

To audition the other models, change `model` to any ID in the table, such as `"openai/gpt-6.1-terra"` or `"tencent/hy4"`.

Open [**Activity**](https://app.ngrok.ai/activity), find each excuse request, and compare its model, provider, status, token usage, and cost. The thinking models show the gap between the price per token and the price per answer.
