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 model parameter; seamlessly switch between GPT-5, Claude 3.5, Gemini 1.5, and dozens of other top-tier models just by changing the model parameter
  • 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-xxxxxxxxxxxxxxxx

Request Parameters

Core Parameters

ParameterTypeRequiredDefaultDescription
modelstringgpt-5Model ID, e.g., gpt-4o, claude-4-5-sonnet, etc.
messagesarray-List of conversation messages, containing context information.
streamboolean-falseWhether 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.

FieldTypeDescription
idstringUnique request ID.
objectstringFixed as chat.completion.
createdintegerUnix timestamp.
choicesarrayList of generated results.
usageobjectToken usage statistics.

Supported Models

APIPod supports all mainstream models, specified via the model parameter.

OpenAI
  • gpt-5
  • gpt-5.1-codex
  • gpt-5.1
Anthropic
  • claude-4-5-sonnet
  • claude-4-5-opus
  • claude-4-5-haiku
Google
  • gemini-2.5-pro
  • gemini-3-pro-preview
Other
  • deepseek-v3.2
  • doubao-pro
  • ...

More Models

Please visit the Model List to view more supported models; we are continuously adding more.

On this page

Universal Chat Interface | APIPod Docs