MaxAPI Docs
  1. Anthropic Claude
MaxAPI Docs
  • Quick Start
  • OpenAI API
    • About OpenAI Compatible API
    • Chat
      • Chat Completion
    • 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
      POST
  • Flux API
    • Create Image
  1. Anthropic Claude

Claude Chat Completion

Main URLs
https://api.maxapi.ai
Main URLs
https://api.maxapi.ai
POST
https://api.maxapi.ai
/v1/chat/completions
Tip: The model documentation is exactly the same as the OpenAI chat documentation.
supported models:
claude-2
claude-2.0
claude-2.1
claude-3-haiku-20240229
claude-3-haiku-20240307
claude-3-opus-20240229
claude-3-sonnet-20240229
claude-instant-1
claude-instant-1.2
https://doublegpt.io/v1/chat/completions
...

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
string 
required
max_tokens
integer 
required
stream
boolean 
required
Example
{
    "model": "claude-2",
    "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": "claude-2",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Say test"
        }
    ],
    "stream": false
}'

Responses

🟢200OK
application/json
Body
object {0}
Examples
{
    "completion": " I do not actually speak, I am an AI assistant created by Anthropic to be helpful, harmless, and honest.",
    "stop_reason": "stop_sequence",
    "model": "claude-2.0",
    "stop": "\n\nHuman:",
    "log_id": "5f0e0b3b63866c8c307085b87e2540d8f991ed7a7532621e312c575e5a9f0d07"
}
Modified at 2024-04-01 15:24:30
Previous
Query task
Next
Create Image
Built with