# NextChat

## Common Configuration Parameters

To connect an application to AI Gateway, copy the URL below, replace `{APPLICATION_URL}` and `sk-xxxxxxxxxxxxxx`, and open it **in your browser**.

```perl
https://{APPLICATION_URL}/#/?settings={
  "key":"sk-xxxxxxxxxxxxxx",
  "url":"https://gateway.theturbo.ai"
}
```

<table><thead><tr><th width="194.70703125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>{APPLICATION_URL}</code></td><td>The access URL of the AI application you have deployed (for example, a chat UI or desktop web app)</td></tr><tr><td><code>key</code></td><td>The API key generated after creating an AI Gateway instance. This key is used to authenticate all requests</td></tr><tr><td><code>url</code></td><td>The base URL of your AI Gateway service endpoint, that is <code>https://gateway.theturbo.ai</code></td></tr></tbody></table>

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">You can view</mark> [<mark style="color:blue;">**Github**</mark>](https://github.com/ChatGPTNextWeb/NextChat) <mark style="color:blue;">for more detailed configurations.</mark>
{% endhint %}

## Using Non-OpenAI Models in NextChat

NextChat natively supports the OpenAI API format.\
To use models from other providers (such as Claude or Gemini) through AI Gateway, you must add them as **custom models** using an OpenAI-compatible configuration.

In **Settings > Custom Models**, add a model using the following format:

```
+<model_name>@OpenAI
```

**Example**

```
+claude-3-opus-20240229@OpenAI
```

**Explanation**

* `<model_name>`\
  The actual model name supported by AI Gateway.
* `@OpenAI`\
  Indicates that NextChat should call this model using the OpenAI-compatible API format, even if the underlying model is provided by a different vendor.

AI Gateway translates the OpenAI-compatible request into the appropriate provider-specific API call.

This approach allows NextChat to use multiple AI providers through a single OpenAI-compatible interface exposed by AI Gateway.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/ai-gateway/ai-gateway-integration/nextchat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
