AI on demand: MiniMaxAI/MiniMax-M2.5: Difference between revisions

From MediaWiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


# Set the desired model:
# Set the desired model:
MODEL_ID=MiniMaxAI/MiniMax-M2.5
MODEL=MiniMaxAI/MiniMax-M2.5


# Set your prompt:
# Set your prompt:
Line 13: Line 13:
MAX_TOKENS=100
MAX_TOKENS=100


curl -s https://llm.stoney-cloud.com/v1/chat/completions \
curl https://llm.stoney-cloud.com/v1/chat/completions \
  -H "Authorization: Bearer $STONEY_KEY" \
        --silent --fail --show-error \
  -H "Content-Type: application/json"   \
        --header "Authorization: Bearer $STONEY_KEY" \
  -d '{
        --header 'Content-Type: application/json'   \
    "model": "'"$MODEL_ID"'",
        --data '{
    "messages": [
                "model": "'"$MODEL"'",
      {"role": "user", "content": "'"$PROMPT"'"}
                "messages": [
    ],
                        {"role": "user", "content": "'"$PROMPT"'"}
    "max_tokens": '"$MAX_TOKENS"'
                ],
  }' \
                "max_tokens": '"$MAX_TOKENS"'
  | jq .
        }' \
        | jq
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 13:52, 7 May 2026

Calling the model

# Set your personal key:
STONEY_KEY=sk-...

# Set the desired model:
MODEL=MiniMaxAI/MiniMax-M2.5

# Set your prompt:
PROMPT='Hello.'

# Set maximum amount of tokens:
MAX_TOKENS=100

curl https://llm.stoney-cloud.com/v1/chat/completions \
        --silent --fail --show-error \
        --header "Authorization: Bearer $STONEY_KEY" \
        --header 'Content-Type: application/json'   \
        --data '{
                "model": "'"$MODEL"'",
                "messages": [
                        {"role": "user", "content": "'"$PROMPT"'"}
                ],
                "max_tokens": '"$MAX_TOKENS"'
        }' \
        | jq

Example output:

{
  "id": "chatcmpl-9f55d44ee87ed4e7",
  "object": "chat.completion",
  "created": 1775141698,
  "model": "MiniMaxAI/MiniMax-M2.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "<think>The user has simply greeted me with \"Hello.\" This is a simple greeting, so I should respond in a friendly and welcoming manner.\n</think>\n\nHello! How can I help you today?",
        "refusal": null,
        "annotations": null,
        "audio": null,
        "function_call": null,
        "tool_calls": [],
        "reasoning": null
      },
      "logprobs": null,
      "finish_reason": "stop",
      "stop_reason": null,
      "token_ids": null
    }
  ],
  "service_tier": null,
  "system_fingerprint": null,
  "usage": {
    "prompt_tokens": 41,
    "total_tokens": 80,
    "completion_tokens": 39,
    "prompt_tokens_details": null
  },
  "prompt_logprobs": null,
  "prompt_token_ids": null,
  "kv_transfer_params": null
}