In short.
This xAI guide explains certificate-based API access for developers and enterprise infrastructure teams, but the feature requires support-led enterprise activation and continued API-key authentication. It documents a global mTLS endpoint, Python and JavaScript SDK configuration, curl requests and certificate rotation. It is useful for planning gateway-based access controls; pricing, certificate revocation procedures and operational performance are not established, and no examples were executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected page at [https://docs.x.ai/developers/advanced-api-usage/mtls.md], including its enterprise notice, API-key requirement, examples, rotation table and FAQs. Linked console pages, regional documentation and all other linked material are excluded. No code, API requests, authentication configuration or certificate rotation was executed. Actual endpoint behavior, compatibility, performance and deployment security remain unverified.
The overview
identity
The resource is xAI's mTLS Authentication documentation at [https://docs.x.ai/developers/advanced-api-usage/mtls.md]. It explains an enterprise authentication feature for the xAI API. Mutual TLS adds a client certificate so the calling system must prove its identity alongside the usual API key.
assessment
The guide gives enough detail to plan an integration: what to send support, which endpoint to use, how to configure clients and which authentication errors to expect. Its strongest fit is a team that already manages certificates and routes API traffic through controlled infrastructure.
Adoption depends on enterprise enablement and certificate management. The page describes intended behavior but provides no observed deployment results, independent security assessment or compatibility matrix.
users
The intended users are enterprise developers, infrastructure engineers and security teams operating gateways, proxies or service meshes. A shared gateway can hold the certificate configuration while applications continue making familiar API calls.
Beginners receive concrete examples, but certificate issuance and private-key management are assumed. Teams without that infrastructure will need additional guidance beyond this page.
capabilities
The documented feature checks client certificates against a team-supplied certificate authority, or CA. Configuration applies to the whole team, so its API keys share the same mTLS settings. When mTLS is required, requests to the standard API endpoint are rejected.
The page says existing API paths, models, tools and streaming retain their behavior, with unchanged rate limits, billing and model access. It also describes client-certificate renewal without configuration changes when the CA and certificate Common Name remain the same.
Using it
requirements
Setup requires an xAI team ID, support-enabled enterprise access, a CA certificate and the Common Name, or CN, used by the client certificates. Both CA and client certificates must be X.509 certificates encoded in PEM format.
The calling system needs its client certificate, matching private key and a valid xAI API key. Its HTTP transport must support client certificates. The examples use Python with httpx and the OpenAI SDK, JavaScript with the OpenAI SDK and Node.js HTTPS, or curl; dependency versions are unspecified.
mechanism
The guide describes two authentication checks. Certificate verification validates the client's certificate against the CA supplied during setup; an absent or invalid certificate is documented as producing 403 Forbidden. API-key verification checks the bearer credential; a missing or invalid key is documented as producing 401 Unauthorized.
Both checks must pass. The client certificate adds machine identity, while the API key remains necessary for access. These response behaviors are documentation claims and were not observed through requests.
setup
The documented process starts by contacting support@x.ai with the team ID, CA certificate in PEM format and client-certificate CN. xAI configures the team and confirms activation.
Then configure the client to use [https://mtls.api.x.ai] and attach the certificate and private key through its HTTP transport. The SDK examples use [https://mtls.api.x.ai/v1] as the base URL. Existing API paths remain applicable, and each request retains API-key authentication.
example
The Python example creates an httpx client with certificate and private-key file paths, passes it to the OpenAI SDK and reads XAI_API_KEY from the environment. The JavaScript example supplies certificate material through an HTTPS agent. The curl example uses its certificate and key options alongside an Authorization header.
All three chat examples send a simple greeting to grok-4.7. That model name is part of the supplied examples; model availability and account entitlement are not established. No example was executed.
Assessment & evidence
limitations
The documented endpoint is global. Regional mTLS access and exceptions allowing particular keys to work without mTLS require discussion with support; their availability is not established. Team-level configuration limits the ability to manage separate certificate policies for individual keys.
CA changes require support. The guide does not specify certificate revocation, CN-change procedures, accepted key algorithms, TLS versions, CA transition windows or support turnaround. Its claim of rotation without downtime has no accompanying operational measurements.
reasoning
Requiring both a certificate and an API key means possession of an API key alone should be insufficient where mTLS is enforced. This follows from the documented requirement that both authentication checks pass.
The likely architectural benefit is centralized machine authentication at a managed gateway. Suitability depends on where certificates and keys are held and how they are renewed or revoked; the page does not establish the security of any particular deployment.
alternatives
The page identifies the standard endpoint, [https://api.x.ai], as the existing API-key-authenticated route. That is the documented option for access without this certificate requirement, subject to the team's configuration. Once mTLS is required, the guide says standard-endpoint requests are rejected.
No competing provider, alternative authentication design or available regional mTLS implementation is evaluated in the supplied page. Comparative suitability is not assessed.
evidence
The evidence consists of the complete provider documentation page, including setup instructions, three client examples, authentication outcomes, rotation guidance and FAQs. It supports an account of intended functionality but contains no independent validation or measured results.
The final troubleshooting sentence unexpectedly refers to SpaceXSI, while the rest of the page identifies xAI. The term is unexplained and leaves that sentence's naming unclear.
Access & freshness
costs
The page identifies mTLS as an enterprise feature and says billing behaves as it does on the standard endpoint. It supplies no enterprise price, activation fee, minimum commitment or model-usage rates, so those costs are unknown.
Certificate administration and gateway configuration introduce operational work, but its effort and cost are not quantified.
rights
The supplied page states no licence or redistribution permission for its documentation or code examples. Rights to redistribute those materials are therefore unknown. Enterprise service terms, contractual access conditions and data-handling commitments are also not established by this page.
freshness
The documentation copy was captured on 24 November 2026 at 00:22:14.651 UTC. The page itself supplies no publication date, last-update date or dependency versions.
Current enterprise eligibility, endpoint availability and SDK compatibility beyond that snapshot are unknown. The model name in the examples does not establish a current model catalogue.
actions
Before adoption, confirm enterprise pricing, team-wide enforcement, regional requirements and certificate lifecycle procedures with xAI support. Establish who owns certificate issuance, renewal and emergency revocation, particularly when a gateway serves several applications.
After activation, the guide suggests a diagnostic request to [https://mtls.api.x.ai/v1/api-key] using the client certificate, private key and API key. Validate successful access and the documented rejection cases in your environment, then confirm any required CA transition procedure. These checks remain unperformed.
