Skip to main content

API Guides

Step-by-step AI API integration: getting and securing API keys, authentication, endpoints and SDKs, OpenAI-compatible setups, and patterns for production use.
  • 62 articles
  • Updated Oct 10, 2026
Conceptual Grok Voice API path from authenticated WebSocket input through response status and decoded WAV audio to speaker playback

Grok Voice Agent API: WebSocket Quickstart, Authentication, and Pricing

Use wss://api.x.ai/v1/realtime for a live Grok voice agent. Start with a server-side text or PCM turn, decode the audio reply, and use short-lived client secrets for browser connections. Current audio pricing is $0.08 per minute, with different duration meters for server VAD and push-to-talk.

12 min
Function-calling migration flow linking application execution and the returned result through the original call_id

Migrate Function Calling from Chat Completions to Responses API

Move the whole function-calling loop: validate the model’s arguments, run the authorized handler, return the result with its original call_id, and continue until the user gets a final answer. The JavaScript example preserves typed state and handles failed or unfinished responses.

14 min
Diagram connecting application JSON and YAML to an image API request, with a separate PDF document-processing step

Nano Banana Pro API Guide: JSON, YAML, Image Saving, and PDFs

Call gemini-3-pro-image through Google Interactions, save image bytes from the full response, and compile your own JSON or YAML job settings. PDFs need a document-capable model before Pro receives the verified facts and page images.

12 min