Universal Chat Interface
List of mainstream AI models supported by APIPod, compatible with OpenAI standard API.
- Unified chat API interface supporting all text generation models
- Select different AI models via the
modelparameter; seamlessly switch between GPT-5, Claude 3.5, Gemini 1.5, and dozens of other top-tier models just by changing themodelparameter - Compatible with OpenAI Chat Completions API format
Interface Definition
POST
https://api.apipod.ai/v1/chat/completions
curl --request POST \
--url https://api.apipod.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'import requests
url = "https://api.apipod.ai/v1/chat/completions"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
data = {
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())const url = "https://api.apipod.ai/v1/chat/completions";
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
const body = JSON.stringify({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello!" }]
});
fetch(url, { method: "POST", headers, body })
.then(res => res.json())
.then(console.log);package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apipod.ai/v1/chat/completions"
payload := map[string]interface{}{
"model": "gpt-4o", // Can be replaced with any supported model ID
"messages": []map[string]string{
{
"role": "system",
"content": "You are a professional AI assistant.",
},
{
"role": "user",
"content": "Introduce the history of artificial intelligence.",
},
},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/chat/completions";
// Can be replaced with any supported model ID
String payload = """
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a professional AI assistant."
},
{
"role": "user",
"content": "Introduce the history of artificial intelligence."
}
]
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Authentication
All API calls require a Bearer Token in the Header.
Security Tip
Do not expose your API Key directly in browser frontend code. It is recommended to use it only on the server side.
Authorization: Bearer sk-xxxxxxxxxxxxxxxxRequest Parameters
Core Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | ✅ | gpt-5 | Model ID, e.g., gpt-4o, claude-4-5-sonnet, etc. |
messages | array | ✅ | - | List of conversation messages, containing context information. |
stream | boolean | - | false | Whether to enable streaming (SSE). |
Advanced Control
Messages Structure Detail
Each object in the messages array represents a conversation record.
Role
Specifies the sender of the message:
system: System prompt, used to set the AI's persona.user: Message sent by the user.assistant: Message returned by the AI (used for multi-turn conversation context).
Content
Specific text content. For models supporting vision (like GPT-4V), this can include image URLs.
Example Payload:
{
"model": "gpt-4o",
"messages": [
{ "role": "system", "content": "You are an AI assistant provided by APIPod." },
{ "role": "user", "content": "Hello, how is the weather today?" }
]
}Response Structure
The API returns a standard JSON object.
| Field | Type | Description |
|---|---|---|
id | string | Unique request ID. |
object | string | Fixed as chat.completion. |
created | integer | Unix timestamp. |
choices | array | List of generated results. |
usage | object | Token usage statistics. |
Supported Models
APIPod supports all mainstream models, specified via the model parameter.
OpenAI
gpt-5gpt-5.1-codexgpt-5.1
Anthropic
claude-4-5-sonnetclaude-4-5-opusclaude-4-5-haiku
Google
gemini-2.5-progemini-3-pro-preview
Other
deepseek-v3.2doubao-pro...
More Models
Please visit the Model List to view more supported models; we are continuously adding more.