Docs menuinvideo Platform docsQuickstartFor AI agentsAPI referenceAuthenticationRequestsFilesErrorsLimitsBilling and balanceCatalogueProvider keys (BYOK)Formats and model IDsChat completionsOpenAI ResponsesAnthropic MessagesGeminiStreaming chat answersTools (function calling)Structured output (JSON)VideoAudioUse your own SDKOpenAI mediaElevenLabsReplicatefalGemini mediaxAIRunwayLumaDeepgram and CartesiaMakers' own APIsVideo provider formatsImage provider formatsAudio provider formatsLLM provider formatsGenerate and edit imagesTest your integrationWorkspaces and membersSecurityService accountsModels
View as markdown

xAI

Generate video with xAI’s API format and images with OpenAI’s API format through Platform.

Base URL:

text
https://platform-api.invideo.io/xai

Use jq to read the request ID from the submit response.

bash
REQUEST_ID=$(curl -fsS -X POST https://platform-api.invideo.io/xai/v1/videos/generations \
  -H "Authorization: Bearer $INVIDEO_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "veo-3-fast", "prompt": "A red fox running through snow", "duration": 4}' | jq -er .request_id)

curl "https://platform-api.invideo.io/xai/v1/videos/$REQUEST_ID" -H "Authorization: Bearer $INVIDEO_API_KEY"
# {"status": "done", "video": {"url": "..."}}

status is pending, done or failed. Images use the OpenAI shape at /xai/v1/images/generations. Use a Platform video or image model that matches the endpoint.

xAI - Docs | invideo Platform