Skip to content

MaaS_Cl_opus_4.5/4.6/4.7

1. Effort

Use the effort parameter to control how many tokens Claude uses when responding, striking a balance between response completeness and token efficiency.

The effort parameter allows you to control how aggressively Claude spends tokens when responding to requests. This enables you to trade off between response completeness and token efficiency, all with a single model.

  1. The effort parameter is now officially available on all supported models, no beta header required

  2. Currently supported models: the effort parameter is supported by Claude Opus 4.6 and Claude Opus 4.5

  3. The max parameter is only supported by the model Claude Opus 4.6

  4. New effort level: Claude Opus 4.7 supports xhigh and is set to high by default

Level Description Typical Use Case
high Maximum Integrity —— Claude uses as many tokens as possible. Equivalent to not setting this parameter. Complex analysis, detailed explanation, educational content
medium Balanced approach, with moderate token savings. Most production use cases, cost-conscious applications
low Most efficient token response. High-capacity automation, simple queries, when responses are programmatically processed
max Absolute maximum capacity, with no limit on token consumption. Only available for Opus 4.6; requests using max on other models will return an error. Tasks that require the deepest reasoning and the most comprehensive analysis
xhigh Ultra High Integrity Mode —— Provides output depth and detail close to the max level while maintaining reasonable cost and latency. Uses more tokens than High mode, but does not reach an unrestricted level. Deep research, long report generation, complex code writing, and extreme tasks that require high detail but not absolute, unlimited scope

Native Interface (/v1/messages)

curl --location --request POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: effort-2025-11-24' \
--header 'Content-Type: application/json' \
--data-raw '{
        "model": "claude-opus-4-5-20251101",
        "max_tokens": 4096,
        "messages": [{
            "role": "user",
            "content": "What comes next: 2, 6, 12, 20, 30, ?"
        }],
        "output_config": {
            "effort": "high"
        }
    }'

Native Interface (/v2)

curl --location --request POST 'https://genaiapi.cloudsway.net/v2/ai/xxxxx/claude/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: effort-2025-11-24' \
--header 'Content-Type: application/json' \
--data-raw '{
        "model": "claude-opus-4-5-20251101",
        "max_tokens": 4096,
        "messages": [{
            "role": "user",
            "content": "What comes next: 2, 6, 12, 20, 30, ?"
        }],
        "output_config": {
            "effort": "high"
        }
    }'

OpenAI-compatible API (chat/completion)

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: effort-2025-11-24' \
--header 'Content-Type: application/json' \
--data-raw '{
        "model": "claude-opus-4-5-20251101",
        "max_tokens": 4096,
        "messages": [{
            "role": "user",
            "content": "What comes next: 2, 6, 12, 20, 30, ?"
        }],
        "output_config": {
            "effort": "high"
        }
    }'

2. output_format

The output_format parameter for structured output has been moved to output_config.format.

Native Interface (/v1/messages)

curl --location --request POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Extract the key information from this email: John Smith (john@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
    }
  ],
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "plan_interest": {
            "type": "string"
          },
          "demo_requested": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "email",
          "plan_interest",
          "demo_requested"
        ],
        "additionalProperties": false
      }
    }
  }
}'

Native Interface (/v2)

curl --location --request POST 'https://genaiapi.cloudsway.net/v2/ai/{endpoint}/claude/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Extract the key information from this email: John Smith (john@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
    }
  ],
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "plan_interest": {
            "type": "string"
          },
          "demo_requested": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "email",
          "plan_interest",
          "demo_requested"
        ],
        "additionalProperties": false
      }
    }
  }
}'

OpenAI-compatible API (chat/completion)

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "messages": [
        {
            "role": "user",
            "content": "Extract the key information from this email: John Smith (john@example.com) is interested in our Enterprise plan and wants to schedule a demo for next Tuesday at 2pm."
        }
    ],
    "stream": false,
    "stream_options": {
        "include_usage": true
    },
    "response_format": {
        "type": "json_schema",
        "json_schema": {
            "name": "calculus_solution",
            "schema": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "plan_interest": {
                        "type": "string"
                    },
                    "demo_requested": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "email",
                    "plan_interest",
                    "demo_requested"
                ],
                "additionalProperties": false
            },
            "strict": true
        }
    }
}'

3. Adaptive thinking

Model Opus 4.5 Opus 4.6 Sonnet 4.5 Sonnet 4.6 Opus 4.7
Switch Thinking + budget_tokens Deprecated, to be removed later
Can the thinking content be output? Deprecated, to be removed later
Does it support Adaptive thinking? × ×
Supported thinking level effort high、medium、low max、high、medium、low high、medium、low high、medium、low xhigh、max、high、medium、low
Forced Control × × ×
  1. Self-Adaptation thinking will also automatically enable interleaved thinking.

  2. thinking: {type: "enabled"} and budget_tokens are deprecated on Opus 4.6. They can still be used, but will be removed in future model versions. Please use Self-Adaptation Thinking and Effort Parameter instead to control the depth of thinking.

  3. Parameter Usage of Self-Adaptation Thinking

In Claude Opus 4.7, Self-Adaptation thinking is turned off by default. Requests that do not include the thinking field will run without thinking. To enable this feature, please explicitly set thinking: { type: "Self-Adaptation" }.

    "thinking": {
        "type": "adaptive"
    },
    "output_config":{
        "effort": "max"
        "format": {}    //structured output
    }

Old thinking level control method

    "thinking": {
        "type": "enabled",
        "budget_tokens": 10000
    }

4. Tool search tool

  1. Need to add header: tool-search-tool-2025-10-19

  2. type is: tool_search_tool_regex, type tool_search_tool_bm25_20251119 is not supported

  3. openai format is not currently supported

Request Example

curl --location --request POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: effort-2025-11-24,tool-search-tool-2025-10-19' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "claude-opus-4-5-20251101",
    "max_tokens": 4096,
    "messages": [
        {
            "role": "user",
            "content": "What is the weather in San Francisco?"
        }
    ],
    "output_config": {
        "effort": "medium"
    },
    "tools": [
        {
            "type": "tool_search_tool_regex",
            "name": "tool_search_tool_regex"
        },
        {
            "name": "get_weather",
            "description": "Get the weather at a specific location",
            "input_schema": {
                "type": "object",
                "properties": {
                    "location": {
                        "type": "string"
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "celsius",
                            "fahrenheit"
                        ]
                    }
                },
                "required": [
                    "location"
                ]
            },
            "defer_loading": true
        },
        {
            "name": "search_files",
            "description": "Search through files in the workspace",
            "input_schema": {
                "type": "object",
                "properties": {
                    "query": {
                        "type": "string"
                    },
                    "file_types": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "query"
                ]
            },
            "defer_loading": true
        }
    ]
}'

5. Supports 1M context

Specification Claude Opus 4.5 Claude Opus 4.6 Claude Opus 4.7
Context Window 200K tokens 200K tokens (1M tokens is Beta) 1M tokens
Maximum output token 64K tokens 128K tokens 128K tokens

Native Interface (/v1/messages)

curl --location --request POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: context-1m-2025-08-07' \
--header 'Content-Type: application/json' \
--data-raw '{
  "max_tokens": 1024,
  "messages": [
        {
            "role": "user",
            "content": "long text-------"
        }
    ]
}'

Native Interface (/v2)

curl --location --request POST 'https://genaiapi.cloudsway.net/v2/ai/{endpoint}/claude/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: context-1m-2025-08-07' \
--header 'Content-Type: application/json' \
--data-raw '{
  "max_tokens": 1024,
  "messages": [
        {
            "role": "user",
            "content": "long text-------"
        }
    ]
}'

OpenAI-compatible interface (chat/completion)

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'anthropic-beta: context-1m-2025-08-07' \
--header 'Content-Type: application/json' \
--data-raw '{
  "max_tokens": 1024,
  "messages": [
        {
            "role": "user",
            "content": "long text-------"
        }
    ]
}'

Currently not supported