xAI

xAI Api Key API

The Api Key API from xAI — 1 operation(s) for api key.

Operations 1

GET /v1/api-key Get information about an API key, including name, status, permissions and users… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xai:xai-api-key-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

xai-api-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: xAI's REST Api Key API
  description: REST API for xAI compatible with other providers.
  license:
    name: ''
  version: 1.0.0
tags:
- name: API Key
paths:
  /v1/api-key:
    get:
      tags:
      - API Key
      summary: Get information about an API key, including name, status, permissions and users…
      operationId: handle_get_api_key_info_request
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
              example:
                redacted_api_key: xai-...b14o
                user_id: 59fbe5f2-040b-46d5-8325-868bb8f23eb2
                name: My API Key
                create_time: '2024-01-01T12:55:18.139305Z'
                modify_time: '2024-08-28T17:20:12.343321Z'
                modified_by: 3d38b4dc-4eb7-4785-ae26-c3fa8997ffc7
                team_id: 5ea6f6bd-7815-4b8a-9135-28b2d7ba6722
                acls:
                - api-key:model:*
                - api-key:endpoint:*
                api_key_id: ae1e1841-4326-4b36-a8a9-8a1a7237db11
                team_blocked: false
                api_key_blocked: false
                api_key_disabled: false
        '400':
          description: Bad request. The request is invalid or an invalid API key is provided.
      security:
      - bearerAuth: []
components:
  schemas:
    ApiKey:
      type: object
      required:
      - redacted_api_key
      - user_id
      - name
      - create_time
      - modify_time
      - modified_by
      - team_id
      - acls
      - api_key_id
      - team_blocked
      - api_key_blocked
      - api_key_disabled
      properties:
        acls:
          type: array
          items:
            type: string
          description: A list of ACLs authorized with the API key, e.g. `"api-key:endpoint:*"`, `"api-key:model:*"`.
        api_key_blocked:
          type: boolean
          description: Indicates whether the API key is blocked.
        api_key_disabled:
          type: boolean
          description: Indicates whether the API key is disabled.
        api_key_id:
          type: string
          description: ID of the API key.
        create_time:
          type: string
          description: Creation time of the API key in Unix timestamp.
        modified_by:
          type: string
          description: User ID of the user who last modified the API key.
        modify_time:
          type: string
          description: Last modification time of the API key in Unix timestamp.
        name:
          type: string
          description: The name of the API key specified by user.
        redacted_api_key:
          type: string
          description: The redacted API key.
        team_blocked:
          type: boolean
          description: Indicates whether the team that owns the API key.
        team_id:
          type: string
          description: The team ID of the team that owns the API key.
        user_id:
          type: string
          description: User ID the API key belongs to.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer