Ploba logo

Find the right AI tool for the job: apps, agents, APIs, MCP servers and datasets, explained plainly.

Get the AI Digest

Discover

  • Explore
  • Top Charts
  • Categories
  • Agents
  • MCP servers
  • Developer tools

Learn & community

  • Learn AI
  • AI Glossary
  • Blog
  • Hackathons
  • People
  • AI Digest

For makers

  • List your tool
  • Docs
  • Claim a listing
  • Advertise
  • Write for us

Company

  • About
  • Careers
  • Changelog
  • Trust
  • Security
  • Contact

© 2026 Ploba. All rights reserved.

  • Privacy
  • Terms
  • Cookies
  • Advertising
  • All policies
llms.txt
Ploba logo
DiscoverHackathonsPeopleLearnAI Digest
Sign inGet started
HomeTop ChartsExploreCategories
TypesWeb apps1,894Agents585Plugins416APIs376Mobile apps152Datasets85
AdvertisingYour product hereReach people browsing AI tools on Ploba.Advertise hereAdvertisingYour product hereReach people browsing AI tools on Ploba.Advertise here
  1. Explore
  2. /
  3. Developer Tools
  4. /
  5. Grok API
Developer Tools
Grok API icon

Grok API

by xAI

The Grok API gives developers access to Grok models for text, code, reasoning, image and video generation, voice, and live web and X search. It is for developers and companies building apps and agents on Grok.

API·Usage-based

View documentation(opens in a new tab)

About Grok API

Key features of Grok API

  • Text, code and reasoning models
  • OpenAI-compatible REST API
  • Imagine API for image and video generation and editing
  • Voice API for speech-to-speech, text-to-speech and speech-to-text
  • Server-side web search, X search and code execution tools
  • Files and collections for searching your own documents
  • Function calling, structured outputs and Batch API
  • Free Playground in the Console

Who Grok API is for

  • Developers building chat, coding or research apps
  • Teams building AI agents with tool use
  • Media apps generating images and video
  • Companies building voice agents
  • Enterprises needing SSO, audit logs and data residency

How to use Grok API

  1. 1

    Step 1: Sign up at console.x.ai and add credits to your account.

  2. 2

    Step 2: Create an API key on the API Keys page and set it as XAI_API_KEY.

  3. 3

    Step 3: Install an SDK: the xAI Python SDK, the OpenAI SDK, or the Vercel AI SDK provider.

  4. 4

    Step 4: Set the base URL to https://api.x.ai/v1 and send a request to a Grok model such as grok-4.7.

  5. 5

    Step 5: Add tools such as web search, X search or function calling as your app needs them.

Grok API FAQ

Can API prompts be kept from being stored?

Team admins on the enterprise API can enable Zero Data Retention in the Console, so prompts and outputs are not persisted.

Is the Grok API compatible with the OpenAI SDK?

Yes. The REST API is compatible with the OpenAI REST API, so you can use the OpenAI SDK with the base URL https://api.x.ai/v1.

Can I try Grok models for free?

Yes. Every Console account includes a free Playground for chatting with Grok and testing image and video generation before you buy.

Does SpaceXSI train on my API data?

No. The enterprise FAQ says business inputs and outputs are not used for training, though free credits may sometimes be offered in exchange for permission to train.

Details

Pricing
Usage-basedUsage-based, billed per token, with prepaid credits or enterprise invoicing. Image, video and voice models are priced per image, per second or per minute, and server-side tools are billed per call. The Playground is free with a Console account.
Type
API
Platforms
  • API
Categories
Developer ToolsAIAutomation
Added
Oct 1, 2026

Links

  • Documentationdocs.x.ai
xAI iconPublisherxAI

Built from public sources

We put this page together from Grok API’s own website and docs so you can compare it with other tools. Ploba isn’t affiliated with Grok API.

Work at Grok API? Claim the listing to manage it yourself.

Something wrong here?

More from xAI

View publisher
Grok Imagine API iconGrok Imagine APIxAI · Usage-basedThe Grok Imagine API generates, edits and restyles images and video through one API. It supports text-to-video and image-to-video, with clips up to 15 seconds.Developer Tools · Usage-basedGrok Voice API iconGrok Voice APIxAI · Usage-basedGrok Voice API provides real-time speech-to-speech voice agents, text-to-speech and speech-to-text through one API. It supports tool calling, custom cloned voices and 25+ languages.Developer Tools · Usage-basedGrok DeepSearch iconGrok DeepSearchxAI · SubscriptionGrok DeepSearch uses AI for AI research mode for searching online information and synthesizing multi-source answers.Productivity · Subscription

Related tools

See more
E2B iconE2BE2B · Usage-basedE2B gives every AI agent its own isolated cloud machine, a microVM sandbox where it can run code, browse and use tools. It runs in E2B's cloud or in your own AWS, GCP or Azure account.Developer Tools · Usage-basedBox by ASCII iconBox by ASCIIBox by ASCII · Contact for pricingboat provides persistent Ubuntu virtual machines as sandboxes for AI agents, with SSH, Docker and fast forking from snapshots. It is controlled through a CLI, an HTTP API and SDKs.Developer Tools · Contact for pricingCognition's SWE-2 iconCognition's SWE-2Cognition · Contact for pricingSWE-2 is Cognition's coding model for agentic software engineering, built to deliver strong results at a lower cost per task. It is available in Devin Desktop and the Devin CLI.Developer Tools · Contact for pricing