{"openapi":"3.0.0","info":{"description":"MiniMax AI platform with text generation, speech synthesis, video generation, and music generation capabilities","version":[{"name":"v1","value":"v1"}]},"servers":[{"description":"MiniMax AI platform with text generation, speech synthesis, video generation, and music generation capabilities","url":"https://api.apirails.com/minimax"}],"paths":{"/anthropic/v1/messages":{"post":{"tags":["Messages"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/text-anthropic-api","api_endpoint":"https://api.minimax.io/anthropic/v1/messages"},"summary":"Create Message","description":"Create a message using MiniMax models with Anthropic-compatible API","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"max_tokens":{"type":"number","description":"The maximum number of tokens to generate before stopping","required":true},"messages":{"type":"array","description":"The messages that make up the conversation so far","required":true,"items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the message sender","required":true,"enum":["user","assistant"]},"content":{"type":"string","description":"Content of the message","required":true}}}},"metadata":{"type":"object","description":"An object describing metadata about the request","properties":{"user_id":{"type":"string","description":"User identifier"}}},"model":{"type":"string","description":"The model that will complete your prompt","required":true},"stop_sequences":{"type":"array","description":"Custom text sequences that will cause the model to stop generating (ignored by Anthropic-compatible endpoint)","items":{"type":"string"}},"stream":{"type":"boolean","description":"Whether to incrementally stream the response using server-sent events","enum":[true,false]},"system":{"type":"string","description":"System prompt"},"temperature":{"type":"number","description":"Amount of randomness injected into the response. Range is (0.0, 1.0], recommended value: 1.0"},"tool_choice":{"type":"object","description":"Controls which tool the model can use","properties":{"type":{"type":"string","description":"Type of tool choice","required":true,"enum":["auto","any","tool"]},"name":{"type":"string","description":"Name of the specific tool to use (required when type is tool)"}}},"tools":{"type":"array","description":"Definitions of tools that the model may use","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tool","required":true},"description":{"type":"string","description":"Description of what the tool does","required":true},"input_schema":{"type":"object","description":"JSON schema defining the tool's input parameters"}}}},"top_k":{"type":"number","description":"Only sample from the top K options for each subsequent token"},"top_p":{"type":"number","description":"Use nucleus sampling"}}},"example":{"max_tokens":"","messages":[{"content":"Hello, how are you?","role":"user"}],"metadata":{},"model":"MiniMax-M3","stop_sequences":[],"stream":"","system":"","temperature":"","tool_choice":{},"tools":[],"top_k":"","top_p":""}}}}}},"/v1/chat/completions":{"post":{"tags":["Chat"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/text-openai-api","api_endpoint":"https://api.minimax.io/v1/chat/completions"},"summary":"Create Chat Completion","description":"Creates a completion for the chat message using MiniMax models with OpenAI-compatible API","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"max_tokens":{"type":"number","description":"The maximum number of tokens allowed for the generated answer"},"messages":{"type":"array","description":"The messages to generate chat completions for, in the chat format","required":true,"items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the message sender","required":true,"enum":["system","user","assistant","tool"]},"content":{"type":"string","description":"Content of the message","required":true}}}},"model":{"type":"string","description":"ID of the model to use","required":true},"n":{"type":"number","description":"How many chat completion choices to generate for each input message. Only supports value 1"},"stop":{"type":"array","description":"Up to 4 sequences where the API will stop generating further tokens","items":{"type":"string"}},"stream":{"type":"boolean","description":"If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message","enum":[true,false]},"temperature":{"type":"number","description":"What sampling temperature to use between 0 and 1. Range is (0.0, 1.0], recommended value: 1.0"},"tool_choice":{"type":"object","description":"Controls which tool is called by the model","properties":{"type":{"type":"string","description":"Type of tool choice","enum":["auto","none","required"]}}},"tools":{"type":"array","description":"A list of tools the model may call. Supports function type","items":{"type":"object","properties":{"type":{"type":"string","description":"Tool type","required":true,"enum":["function"]},"function":{"type":"object","description":"Function definition"}}}},"top_p":{"type":"number","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass"},"user":{"type":"string","description":"A unique identifier representing your end-user which can help MiniMax to monitor and detect abuse"}}},"example":{"max_tokens":"","messages":[{"content":"Hello, how are you?","role":"user"}],"model":"MiniMax-M3","n":"","stop":[],"stream":"","temperature":"","tool_choice":{},"tools":[],"top_p":"","user":""}}}}}},"/v1/t2a_v2":{"post":{"tags":["Speech"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/speech-t2a-http","api_endpoint":"https://api.minimax.io/v1/t2a_v2"},"summary":"Text to Speech","description":"Convert text to speech using MiniMax T2A models","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"text":{"type":"string","description":"The text to convert to speech","required":true},"model":{"type":"string","description":"The model to use for text-to-speech","required":true},"pitch":{"type":"number","description":"Pitch adjustment"},"speed":{"type":"number","description":"Speech speed (0.5 to 2.0)"},"voice_id":{"type":"string","description":"Voice ID to use for synthesis"},"vol":{"type":"number","description":"Volume level"}}},"example":{"text":"","model":"speech-02-turbo","pitch":"","speed":"","voice_id":"","vol":""}}}}}},"/v1/video_generation":{"post":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/video-generation-i2v","api_endpoint":"https://api.minimax.io/v1/video_generation"},"summary":"Create Image to Video","description":"Create an image-to-video generation task","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"aspect_ratio":{"type":"string","description":"Video aspect ratio"},"duration":{"type":"number","description":"Video duration in seconds"},"image_url":{"type":"string","description":"URL of the input image to convert to video","required":true},"model":{"type":"string","description":"The model to use for video generation","required":true},"resolution":{"type":"string","description":"Video resolution"}}},"example":{"aspect_ratio":"16:9|9:16|1:1","duration":"","image_url":"","model":"hailuo-2.3Fast","resolution":""}}}}}},"/v1/music_generation":{"post":{"tags":["Music"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/music-generation","api_endpoint":"https://api.minimax.io/v1/music_generation"},"summary":"Generate Music","description":"Generate a song from lyrics and a prompt","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"audio_setting":{"type":"object","description":"Audio output configuration (AudioSetting schema)","properties":{}},"lyrics":{"type":"string","description":"Lyrics of the song. Use \\n to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro]. Length: 10-3000 characters","required":true},"model":{"type":"string","description":"The model to use for music generation","required":true},"output_format":{"type":"string","description":"The output format of the audio. Options: url or hex","enum":["url","hex"]},"prompt":{"type":"string","description":"A description of the music, specifying style, mood, and scenario. Length: 10-2000 characters","required":true},"stream":{"type":"boolean","description":"Whether to use streaming output","enum":[true,false]}}},"example":{"audio_setting":{},"lyrics":"","model":"music-2.0","output_format":"","prompt":"","stream":""}}}}}},"/v1/video_generation/{task_id}":{"get":{"tags":["Video"],"parameters":[{"name":"task_id","in":"path","description":"The task ID returned from video generation request","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://platform.minimax.io/docs/api-reference/video-generation-t2v","api_endpoint":"https://api.minimax.io/v1/video_generation/{task_id}"},"summary":"Query Video Generation Task","description":"Query the status and result of a video generation task","security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}