MaxAPI Docs
  1. Chat
MaxAPI Docs
  • Quick Start
  • OpenAI API
    • About OpenAI Compatible API
    • Chat
      • Chat Completion
        POST
    • Images
      • Create Image
    • Audio
      • Text To Speech API
  • Midjourney Open API
    • About Midjourney and Prices
    • Submit Imagine Task
      POST
    • Submit Action Task(All associated button actions UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      POST
    • Submit Blend Task
      POST
    • Submit Modal Task
      POST
    • Submit Describe Task
      POST
    • Submit Shorten Task
      POST
    • Submit FaceSwap Task
      POST
    • Upload Files to Discord
      POST
    • Specify ID Query Task
      GET
    • Specify ID Query Task (fetch)
      GET
    • Specify the ID List Query Task
      GET
    • Obtain the seed of the Task Image
      GET
  • Luma video
    • Luma Task Creation
      POST
    • Luma Expand Video
      POST
    • Luma Query Task
      GET
    • Luma Download video
      GET
  • Suno Music
    • Generate music
      POST
    • Query task
      GET
  • Anthropic Claude
    • Claude Chat Completion
  • Flux API
    • Create Image
  1. Chat

Chat Completion

Main URLs
https://api.maxapi.ai
Main URLs
https://api.maxapi.ai
POST
https://api.maxapi.ai
/v1/chat/completions
OpenAI's ChatCompletion interface
Supports all OpenAI Chat models, including the latest 1106 batch.
For more information about the parameters of this interface, you can refer to the official OpenAI documentation at https://platform.openai.com/docs/api-reference/chat/create.
You can also use this interface to call the following non-OpenAI models in the same format as the OpenAI ChatCompletion API:

Anthropic Serises:#

claude-2
claude-instant-1.

Google AI Series:#

gemini-pro
gemini-pro-vision
palm-2-chat-bison
palm-2-chat-bison-32k
You only need to specify these models in the model parameter.

Google AI Series Notes#

0. Due to the poor API interface developed by Google VertexAI, we won't provide the native API, only offering the standard OpenAI Chat/Completions API.
1. Although the Gemini Pro series does not support non-streaming requests, we have implemented a wrapper for both streaming and non-streaming responses according to the OpenAI standard. Applications native to GPT can easily integrate by changing the model name.
2. Google AI's Gemini Pro and PaLM series models are currently in a preview stage with low concurrent quota, but our site is providing these model inference services for free. You can evaluate their capabilities or integrate them into your application in advance.
3. Gemini Pro Vision is a multimodal large model, similar to GPT4Vision, supporting mixed inference based on text and input images. Its usage is consistent with GPT4v.
4. As Google AI models are billed based on the number of characters, the Tokens in the bill will directly reflect the length of the input and output strings, not the actual Token length.
5. Regarding the capability level of the Gemini Pro series models: They are approximately at the level of 3.5, but the Vision version supports multimodality with moderately satisfactory results (meaning generally pleasing), and can be used as a smaller version of GPT4V.

About How to Use Gemini Pro Vision#

You can fully refer to OpenAI's Vision instructions: https://platform.openai.com/docs/guides/vision

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
model
string 
required
messages
array [object {2}] 
required
role
string 
required
content
string 
required
stream
boolean 
required
Example
{
    "model": "gpt-3.5-turbo",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Say test"
        }
    ],
    "stream": false
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.maxapi.ai/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-3.5-turbo",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Say test"
        }
    ],
    "stream": false
}'

Responses

🟢200OK
application/json
Body
object {0}
Examples
{
    "id": "chatcmpl-8Je5EIkoizgX7HIZHCfak05B9YmYx",
    "object": "chat.completion",
    "created": 1699693004,
    "model": "gpt-3.5-turbo-1106",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Test"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 19,
        "completion_tokens": 1,
        "total_tokens": 20
    },
    "system_fingerprint": "fp_eeff13170a"
}
Modified at 2024-07-26 15:38:44
Previous
About OpenAI Compatible API
Next
Create Image
Built with