SpyBara
Go Premium

Documentation 2026-10-30 23:58 UTC to 2026-10-31 23:59 UTC

3 files changed +139 −3. View all changes and history on the product overview
2026
Sat 31 23:59 Fri 30 23:58 Thu 29 23:01 Wed 28 23:01 Tue 27 23:58 Mon 26 22:57 Sun 25 22:58 Sat 24 23:59 Fri 23 23:57 Thu 22 23:59 Wed 21 23:02 Tue 20 23:01 Mon 19 23:59 Sun 18 23:57 Sat 17 23:58 Fri 16 22:57 Thu 15 23:58 Wed 14 23:01 Tue 13 23:59 Mon 12 23:02 Sun 11 23:58 Sat 10 23:59 Fri 9 23:59 Thu 8 23:58 Wed 7 23:59 Tue 6 22:57 Mon 5 22:59 Sun 4 23:58 Sat 3 23:58 Fri 2 23:57 Thu 1 23:57
Details

2 2 

3# mTLS Authentication3# mTLS Authentication

4 4 

5Mutual TLS (mTLS) lets you lock down API access so that only machines presenting a valid client certificate can make requests on behalf of your team. This is ideal for enterprise environments where API traffic flows through your own gateways and you need cryptographic proof that each request originates from an authorized system.5Mutual TLS (mTLS) lets you lock down API access so that only machines presenting a valid client certificate can make requests on behalf of your team. This is well suited to enterprise environments where API traffic flows through your own gateways and you need cryptographic proof that each request originates from an authorized system.

6 6 

7> [!TIP]7> [!TIP]

8>8>

Details

1#### Advanced API Usage

2 

3# Output Watermarking

4 

5Text responses from supported Grok models include an invisible watermark. The watermark lets SpaceXSI later recognize text as model-generated, and it requires no change to your requests: there is no parameter to send, and your integration works the same way with or without it.

6 

7SpaceXSI watermarks text model output to comply with the EU AI Act. The watermark is enabled on every SpaceXSI API endpoint, including the global endpoint, `https://api.x.ai`, and any [regional endpoint](/developers/advanced-api-usage/regions).

8 

9Watermarking is controlled per model for your whole team. Team admins can opt out in the SpaceXSI Console; see [Opting out](#opting-out).

10 

11## Which outputs are watermarked

12 

13Watermarking applies to text output from text generation requests, for each model that has watermarking turned on for your team.

14 

15Starting November 7, 2026, responses from these models include a watermark. It's on by default, and you can [opt out per model](#opting-out).

16 

17* grok-4.7

18* grok-4.6

19* grok-4.5

20* grok-4.3

21* grok-4.20-reasoning

22* grok-4.20-non-reasoning

23* grok-4.20-multi-agent

24 

25Watermarking applies to outputs from every text generation API, including the Responses API and the Chat Completions API. It covers the generated text you receive in the response: ordinary text responses, [structured outputs](/developers/model-capabilities/text/structured-outputs), and [tool call](/developers/tools/function-calling) arguments.

26 

27### Checking whether a response was watermarked

28 

29To check whether a response was watermarked, read the `x-watermark` header on the Responses API or Chat Completions API response. `x-watermark: true` means the output for that request was generated with the watermark. Any other value, or no header at all, means it was not.

30 

31```javascript customLanguage="javascriptAISDK"

32import { xai } from '@ai-sdk/xai';

33import { generateText } from 'ai';

34 

35const { text, response } = await generateText({

36 model: xai.responses('grok-4.7'),

37 prompt: 'Write a haiku about the ocean.',

38});

39 

40console.log(response.headers?.['x-watermark']);

41console.log(text);

42```

43 

44```python customLanguage="pythonOpenAISDK"

45import os

46from openai import OpenAI

47 

48client = OpenAI(

49 api_key=os.getenv("XAI_API_KEY"),

50 base_url="https://api.x.ai/v1",

51)

52 

53raw = client.responses.with_raw_response.create(

54 model="grok-4.7",

55 input="Write a haiku about the ocean.",

56)

57response = raw.parse()

58 

59print(raw.headers.get("x-watermark"))

60print(response.output_text)

61```

62 

63```javascript customLanguage="javascriptOpenAISDK"

64import OpenAI from 'openai';

65 

66const client = new OpenAI({

67 apiKey: process.env.XAI_API_KEY,

68 baseURL: 'https://api.x.ai/v1',

69});

70 

71const { data: response, response: raw } = await client.responses

72 .create({

73 model: 'grok-4.7',

74 input: 'Write a haiku about the ocean.',

75 })

76 .withResponse();

77 

78console.log(raw.headers.get('x-watermark'));

79console.log(response.output_text);

80```

81 

82```bash customLanguage="bash"

83curl -i https://api.x.ai/v1/responses \

84 -H "Authorization: Bearer $XAI_API_KEY" \

85 -H "Content-Type: application/json" \

86 -d '{

87 "model": "grok-4.7",

88 "input": "Write a haiku about the ocean."

89 }'

90```

91 

92## How it works

93 

94The watermark is not visible. It is applied while the model generates text: it slightly shapes which tokens the model picks, so it adds no characters, markup, or hidden text to the response.

95 

96Detection is statistical. SpaceXSI scores a piece of text against the watermark and reports whether it is watermarked, not watermarked, or uncertain. Longer text gives a stronger signal.

97 

98> [!WARNING]

99>

100> Access to watermark detection is granted by application. You can submit a request for the detection API through [this form](https://docs.google.com/forms/d/e/1FAIpQLSc6zpONhSgvde0GbNmfGajT6QoyO0T-fX8UBMhmd14h-UtabQ/viewform).

101 

102## Opting out

103 

104Team admins can turn watermarking off for some or all models in the SpaceXSI Console. The setting applies to every API key on the team.

105 

1061. Open the [Team settings page](https://console.x.ai/team/default/settings/team?utm_source=docs\&utm_medium=referral\&utm_campaign=developers-watermarking\&utm_content=team-settings) and find the **Model output watermarking** row. It shows **On (all models)**, **Off (all models)**, or **Custom**. Only team admins see this row.

1072. Select the settings icon next to it, then clear the checkbox for each model you want to opt out. **Select all** turns every model on or off at once.

1083. Select **Save**. If you turned a model off, confirm with **Opt Out**.

109 

110Changes apply to new requests within 5 minutes. After you opt a model out, its new requests stop including the watermark; after you opt back in, they start including it again.

111 

112Opting out asks you to confirm that an exception under applicable law applies to your use, and that you are solely responsible for any marking, disclosure, or other legal requirement.

113 

114Some models may be locked on for your team. Locked models are listed in the dialog but cannot be turned off from the Console. To ask about a locked model, see [Why can't I turn watermarking off for a model?](#why-cant-i-turn-watermarking-off-for-a-model)

115 

116Every opt-in and opt-out is recorded in your team's audit log. Team admins can view it on the [Audit Log page](https://console.x.ai/team/default/audit?utm_source=docs\&utm_medium=referral\&utm_campaign=developers-watermarking\&utm_content=audit) in the SpaceXSI Console. To find a change, search by event ID, description, or user, and use the time filter to narrow the results to a range of dates. For screenshots of these filters, see [Do you have audit logs?](/developers/faq/security#do-you-have-audit-logs) in the security FAQ.

117 

118## FAQ

119 

120### Do I need to change my code?

121 

122No. Watermarking has no request parameter, and the response format is unchanged apart from the `x-watermark` header.

123 

124### Does opting out apply to all of my API keys?

125 

126Yes. The setting belongs to the team, so it applies to every API key on the team. You choose it separately for each model.

127 

128### Why can't I turn watermarking off for a model?

129 

130The model is locked on for your team. Locked models show in the watermarking dialog without a checkbox.

131 

132For questions about a locked model, contact your team admin. If you still have questions, email [support@x.ai](mailto:support@x.ai).

133 

134### Does watermarking affect quality or speed?

135 

136No. Watermarking doesn't change response quality or speed.

rate-limits.md +2 −2

Details

41| grok-4.20-0309-non-reasoning | T0: 37, T1: 50, T2: 75, T3: 125, T4: 208 | T0: 10M, T1: 15M, T2: 25M, T3: 45M, T4: 85M |41| grok-4.20-0309-non-reasoning | T0: 37, T1: 50, T2: 75, T3: 125, T4: 208 | T0: 10M, T1: 15M, T2: 25M, T3: 45M, T4: 85M |

42| grok-build-0.1 | T0: 37, T1: 50, T2: 75, T3: 125, T4: 208 | T0: 10M, T1: 15M, T2: 25M, T3: 45M, T4: 85M |42| grok-build-0.1 | T0: 37, T1: 50, T2: 75, T3: 125, T4: 208 | T0: 10M, T1: 15M, T2: 25M, T3: 45M, T4: 85M |

43| grok-4.20-multi-agent-0309 | T0: 9, T1: 12, T2: 18, T3: 31, T4: 56 | T0: 2.5M, T1: 3.7M, T2: 6.2M, T3: 11M, T4: 21M |43| grok-4.20-multi-agent-0309 | T0: 9, T1: 12, T2: 18, T3: 31, T4: 56 | T0: 2.5M, T1: 3.7M, T2: 6.2M, T3: 11M, T4: 21M |

44| grok-imagine-image-quality | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |

45| grok-imagine-image | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |44| grok-imagine-image | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |

46| grok-imagine-image-2.0 | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |45| grok-imagine-image-2.0 | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |

47| grok-imagine-video | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |46| grok-imagine-image-quality | T0: 6, T1: 12, T2: 25, T3: 50, T4: 100 | — |

48| grok-imagine-video-1.5-lite | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |47| grok-imagine-video-1.5-lite | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |

48| grok-imagine-video | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |

49| grok-imagine-video-1.5 | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |49| grok-imagine-video-1.5 | T0: 10, T1: 20, T2: 39, T3: 79, T4: 158 | — |

50 50 

51**Voice & Audio**51**Voice & Audio**