MiniMax M3·续

</details>

<details>

<summary>Creative Writing — Higher temperature for creative output</summary>

const response = await env.AI.run(
  'minimax/m3',
  {
    max_tokens: 2048,
    messages: [{ content: 'Write a haiku about programming.', role: 'user' }],
    temperature: 0.9,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/m3",
  "max_tokens": 2048,
  "messages": [
    {
      "content": "Write a haiku about programming.",
      "role": "user"
    }
  ],
  "temperature": 0.9
}'
Fingers on the keys,
Building worlds from empty void—
Code becomes the light.
{
  "id": "066cf8be5675980f2ff647974879fb77",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Fingers on the keys,\nBuilding worlds from empty void—\nCode becomes the light.",
        "name": "MiniMax AI",
        "audio_content": "",
        "reasoning_content": "The user wants a haiku about programming. A haiku is a traditional Japanese poem with three lines following a 5-7-5 syllable pattern. I should create one that captures something meaningful about programming.\n\nLet me think of a few options:\n\n1. About debugging:\nLines (5-7-5):\n- \"Bugs hide in the code\" (4) - need 5\n- \"Silent errors whisper\" (6) - need 7\n- \"Find them, fix, deploy\" (5) ✓\n\nLet me recount:\n- \"Bugs hide in the code\" - Bugs(1) hide(2) in(3) the(4) code(5) = 5 ✓\n- \"Silent errors whisper\" - Si-lent(2) er-rors(4) whis-per(6) = 6, need 7\n- Try: \"Silent errors always whisper\" - 7 ✓\n- \"Find them, fix, deploy\" - Find(1) them(2) fix(3) de-ploy(5) = 5 ✓\n\n2. About code in general:\n- \"Logic flows like streams\" (5) - Lo-gic(2) flows(3) like(4) streams(5) = 5 ✓\n- \"Through brackets and curved braces\" (7) - Through(1) brack-ets(3) and(4) curved(5) bra-ces(7) = 7 ✓\n- \"Dreams made into life\" (5) - Dreams(1) made(2) in-to(4) life(5) = 5 ✓\n\n3. Another option:\n- \"Fingers on the keys\" (5) - Fin-gers(2) on(3) the(4) keys(5) = 5 ✓\n- \"Building worlds from nothing\" (7) - Build-ing(2) worlds(3) from(4) no-thing(6) = 6, need 7\n- Try: \"Building worlds from empty void\" - Build-ing(2) worlds(3) from(4) emp-ty(6) void(7) = 7 ✓\n- \"Code becomes the light\" (5) - Code(1) be-comes(3) the(4) light(5) = 5 ✓\n\nLet me go with option 2 or 3, both are nice. I'll provide one clean haiku and maybe offer an alternative.\n\nActually, let me just give one good one. Option 3 feels more poetic and evocative.\n\nLet me verify option 3 once more:\n- \"Fingers on the keys\" - Fin-gers(2) on(3) the(4) keys(5) = 5 ✓\n- \"Building worlds from empty void\" - Build-ing(2) worlds(3) from(4) emp-ty(6) void(7) = 7 ✓\n- \"Code becomes the light\" - Code(1) be-comes(3) the(4) light(5) = 5 ✓\n\nThat works well. I could also provide a simpler one focused on a different aspect of programming.\n\nI'll give a haiku with a clean delivery. Let me also think about a second option to make it more useful, or just stick with one well-crafted one.\n\nI'll provide one haiku and keep it concise.",
        "reasoning_details": [
          {
            "type": "reasoning.text",
            "id": "reasoning-text-1",
            "format": "MiniMax-response-v1",
            "index": 0,
            "text": "The user wants a haiku about programming. A haiku is a traditional Japanese poem with three lines following a 5-7-5 syllable pattern. I should create one that captures something meaningful about programming.\n\nLet me think of a few options:\n\n1. About debugging:\nLines (5-7-5):\n- \"Bugs hide in the code\" (4) - need 5\n- \"Silent errors whisper\" (6) - need 7\n- \"Find them, fix, deploy\" (5) ✓\n\nLet me recount:\n- \"Bugs hide in the code\" - Bugs(1) hide(2) in(3) the(4) code(5) = 5 ✓\n- \"Silent errors whisper\" - Si-lent(2) er-rors(4) whis-per(6) = 6, need 7\n- Try: \"Silent errors always whisper\" - 7 ✓\n- \"Find them, fix, deploy\" - Find(1) them(2) fix(3) de-ploy(5) = 5 ✓\n\n2. About code in general:\n- \"Logic flows like streams\" (5) - Lo-gic(2) flows(3) like(4) streams(5) = 5 ✓\n- \"Through brackets and curved braces\" (7) - Through(1) brack-ets(3) and(4) curved(5) bra-ces(7) = 7 ✓\n- \"Dreams made into life\" (5) - Dreams(1) made(2) in-to(4) life(5) = 5 ✓\n\n3. Another option:\n- \"Fingers on the keys\" (5) - Fin-gers(2) on(3) the(4) keys(5) = 5 ✓\n- \"Building worlds from nothing\" (7) - Build-ing(2) worlds(3) from(4) no-thing(6) = 6, need 7\n- Try: \"Building worlds from empty void\" - Build-ing(2) worlds(3) from(4) emp-ty(6) void(7) = 7 ✓\n- \"Code becomes the light\" (5) - Code(1) be-comes(3) the(4) light(5) = 5 ✓\n\nLet me go with option 2 or 3, both are nice. I'll provide one clean haiku and maybe offer an alternative.\n\nActually, let me just give one good one. Option 3 feels more poetic and evocative.\n\nLet me verify option 3 once more:\n- \"Fingers on the keys\" - Fin-gers(2) on(3) the(4) keys(5) = 5 ✓\n- \"Building worlds from empty void\" - Build-ing(2) worlds(3) from(4) emp-ty(6) void(7) = 7 ✓\n- \"Code becomes the light\" - Code(1) be-comes(3) the(4) light(5) = 5 ✓\n\nThat works well. I could also provide a simpler one focused on a different aspect of programming.\n\nI'll give a haiku with a clean delivery. Let me also think about a second option to make it more useful, or just stick with one well-crafted one.\n\nI'll provide one haiku and keep it concise."
          }
        ]
      },
      "finish_reason": "stop"
    }
  ],
  "created": 1780336062,
  "model": "MiniMax-M3",
  "object": "chat.completion",
  "usage": {
    "total_tokens": 912,
    "prompt_tokens": 183,
    "completion_tokens": 729,
    "total_characters": 0,
    "prompt_tokens_details": {
      "cached_tokens": 114
    }
  },
  "input_sensitive": false,
  "output_sensitive": false,
  "base_resp": {
    "status_code": 0,
    "status_msg": ""
  },
  "input_sensitive_type": 0,
  "output_sensitive_type": 0,
  "output_sensitive_int": 0,
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

</details>

Parameters

Schema variant

Chat CompletionsMessages

▶messages[]

arrayrequired

temperature

numberminimum: 0maximum: 1

max_tokens

numberexclusiveMinimum: 0

max_completion_tokens

numberexclusiveMinimum: 0

top_p

numberminimum: 0maximum: 1

stream

boolean

▶stream_options{}

object

▶tools[]

array

tool_choice

stringenum: none, auto

▶response_format{}

object

mask_sensitive_info

boolean

▶messages[]

arrayrequired

max_tokens

numberrequiredexclusiveMinimum: 0

system

string

temperature

numberminimum: 0maximum: 1

top_p

numberminimum: 0maximum: 1

top_k

numberexclusiveMinimum: 0

stream

boolean

▶metadata{}

object

id

string

▶choices[]

array

created

number

model

string

object

stringenum: chat.completion, chat.completion.chunk

▶usage{}

object

input_sensitive

boolean

output_sensitive

boolean

▶base_resp{}

object

id

string

type

stringconst: message

role

stringconst: assistant

▶content[]

array

model

string

stop_reason

string

▶usage{}

object

API Schemas (Raw)

Input Open Download

Output Open Download

Was this helpful?

YesNo

On this page

MiniMax M3·续 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/minimax/m3/#page","headline":"MiniMax M3","description":"MiniMax's M3 language model with frontier coding and agentic capabilities, a 1M token context window, and multilingual support.","url":"https://developers.cloudflare.com/ai/models/minimax/m3/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: MiniMax's music generation model that creates full-length songs with vocals from text prompts and lyrics, or instrumental tracks. Supports BPM/key control and auto-generated lyrics. title: MiniMax Music 2.6 image: https://developers.cloudflare.com/og-docs.png


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/llms.txt
Use this file to discover all available pages before exploring further.

MiniMax logo