Prices and model details on this page may have changed. For current rates, see the OpenLux pricing page.

Home / grok-4.5

grok-4.5 Request Fails? Remove stop, presence_penalty and frequency_penalty First

If you switched existing code to grok-4.5 and the request fails right away, check whether it still sends stop, presence_penalty or frequency_penalty. xAI's reasoning guide states that these parameters cannot be used with reasoning models and that requests including them return an error. grok-4.5 is a reasoning model and reasoning cannot be disabled. This page is based on xAI's reasoning guide, the grok-4.5 model page and the Chat Completions and Responses API references, and covers which parameters to remove, which reasoning_effort values to use and how to confirm the fix.

Why does grok-4.5 reject stop, presence_penalty and frequency_penalty?

xAI's reasoning guide lists grok-4.7, grok-4.6 and grok-4.5 as models that support the reasoning_effort parameter, and states that presencePenalty, frequencyPenalty and stop cannot be used with reasoning models: requests that include them return an error. The guide does not publish an exact status code or error message, so rely on the error text in your own response body.

The Chat Completions reference (POST /v1/chat/completions) says the same thing field by field: stop is marked "Not supported by reasoning models", frequency_penalty is marked "Not supported by reasoning models", and presence_penalty is marked "Not supported by grok-3 and reasoning models".

The grok-4.5 model page marks Reasoning as Yes, and the reasoning guide states that reasoning cannot be disabled. There is no switch that turns grok-4.5 into a non-reasoning model so that stop keeps working; the only fix is to remove these parameters from the request.

The guide uses camelCase names (presencePenalty, frequencyPenalty) while the API references use snake_case (presence_penalty, frequency_penalty). Check both spellings in your code, framework settings and client configuration. The Responses API reference also marks presence_penalty and frequency_penalty as not supported in the Responses API.

Official sources: reasoning guide https://docs.x.ai/developers/model-capabilities/text/reasoning , grok-4.5 model page https://docs.x.ai/developers/models/grok-4.5 , Chat Completions reference https://docs.x.ai/developers/rest-api-reference/inference/chat-completions .

Which reasoning_effort values does grok-4.5 accept?

According to the reasoning guide, reasoning_effort defaults to high when it is not specified, and reasoning cannot be turned off. In the guide's model table, grok-4.5 accepts low, medium and high, with high as the default. Effort controls reasoning depth: higher effort spends more reasoning tokens.

xAI's documentation is not consistent about xhigh. The reasoning guide says xhigh is available on grok-4.6 and later, and that on models that do not support it, such as grok-4.5, requests with xhigh are treated as high. The grok-4.5 model page, however, lists low, medium, high and xhigh as supported values. Until the two pages agree, use high on grok-4.5 if you want predictable behavior rather than relying on xhigh.

xAI's July release note for Grok 4.5 also describes configurable reasoning effort of low, medium or high, with high as the default. Release notes: https://docs.x.ai/developers/release-notes .

How do you set effort in Chat Completions and Responses requests?

Chat Completions: the reference lists reasoning_effort as a top-level request field and describes it as constraining how hard a reasoning model thinks before responding; the allowed values and default vary by model. For grok-4.5, put "reasoning_effort": "high" (or low, medium) next to model and messages in the JSON body.

Responses API: the reasoning guide's examples (written for grok-4.7; use the grok-4.5 values from the previous section) pass reasoning={"effort": "high"} to client.responses.create in the OpenAI Python SDK, or send "reasoning": {"effort": "high"} in the JSON body of a curl request to https://api.x.ai/v1/responses. With the xAI Python SDK the guide passes reasoning_effort="high" to client.chat.create, and with the Vercel AI SDK it sets reasoningEffort under providerOptions.xai.

The Responses API reference describes reasoning_effort as a non-standard alternative to reasoning.effort that accepts the same values and is only consulted when reasoning is not set. Do not send both in the same Responses request with different values: once reasoning is set, reasoning_effort is not consulted, and it will look as if reasoning_effort was ignored.

While editing the request, also check output length settings. The Chat Completions reference marks max_tokens as deprecated and replaced by max_completion_tokens, which only applies to visible output tokens; reasoning tokens and function-call tokens do not count toward it. In the Responses API the equivalent field is max_output_tokens, with the same rule.

Step-by-step: how to find and fix the failing parameter

Step 1: save the full request body and response body of one failing call. Confirm the model is grok-4.5 (the model page also lists the aliases grok-4.5-latest and grok-build-latest) and note any parameter name mentioned in the error message.

Step 2: search the request body for stop, presence_penalty, frequency_penalty and their camelCase forms, and remove all of them. If your own code does not set them but the error persists, check whether the default parameter templates or settings of the SDK, framework or client you use set these fields.

Step 3: check the effort field. In Chat Completions use reasoning_effort; in Responses use reasoning.effort, or reasoning_effort only when reasoning is not set. Use low, medium or high.

Step 4: if you relied on stop to cut the output at a marker, the reasoning guide does not offer a replacement parameter. If the goal is a fixed output format, consider structured outputs, which the grok-4.5 model page marks as supported. Otherwise, receive the full output and trim it in your own code.

Step 5: after removing the parameters, send a minimal request with a short prompt, confirm it succeeds, then restore your normal production request.

How do you confirm the request works and the effort setting is applied?

Check 1: the minimal request returns a normal answer and no parameter-related error.

Check 2: read the usage object. The reasoning guide states that usage metrics expose reasoning_tokens and that reasoning tokens are billed as part of total consumption. In Chat Completions the field is usage.completion_tokens_details.reasoning_tokens; in Responses it is usage.output_tokens_details.reasoning_tokens. Send the same prompt once with low and once with high and compare reasoning_tokens to confirm that your effort setting is being read.

Check 3: if you need to carry reasoning context into later turns, the reasoning guide says the Responses API returns encrypted reasoning content when you pass include: ["reasoning.encrypted_content"], and you can send it back unchanged in the next request's input. Chat Completions has no field for this ciphertext.

Check 4: before rolling the change out, make sure every call path, including retry logic and fallback-model logic, no longer sends the unsupported parameters. Otherwise only some requests fail and the problem is harder to trace.

Will you still see this error when calling grok-4.5 through an API relay?

The parameter limits above come from xAI's own API. When you call grok-4.5 through a relay, whether the request is forwarded to xAI as-is, whether these parameters are passed through or dropped, and whether reasoning_effort takes effect all depend on how the platform forwards requests. This page has not tested that, so it cannot promise the same behavior as a direct xAI connection.

The safe approach is to leave out stop, presence_penalty and frequency_penalty in requests to the relay as well, and use low, medium or high for effort. If the request still fails after the fixes above, send the full response body and request time to the platform for checking. Reasoning tokens count toward usage; for prices, refer to the official pricing page and what the platform shows.

Still stuck? Full documentation and support are at learn more.

More on this site

Get started

Confirm the group multiplier, access endpoint, and grok-4.5 availability in the panel before running a minimal request test

Create an account and generate a key

Official site: OpenLux official site

Last updated 2026-10-30 | Written and maintained by OpenLux.
Latency and pricing figures come from our own measurements. Where they differ from the vendor's site, the vendor's live page wins.