Python 88.3%
TypeScript 7.6%
Shell 4.1%
1{2 "domain": "xai-media-voice-skills",3 "generated_at": "2026-09-18T00:00:00Z",4 "run_instructions": {5 "sh": "bash examples/xai/<area>/<file>.sh (sources scripts/lib.sh: `xai METHOD PATH` sets XAI_STATUS; needs .env with XAI_API_KEY; python3 for pretty-printing)",6 "py": ".venv/bin/python examples/xai/<area>/<file>.py (raw requests through scripts/live.py -> logged in reports/live-requests.jsonl; images/generate.py uses the openai SDK with base_url https://api.x.ai/v1; realtime uses websockets)",7 "ts": "node --env-file=.env --experimental-strip-types examples/xai/<area>/<file>.ts (plain fetch; realtime_text_turn.ts needs `npm i ws`)",8 "env": "XAI_API_KEY in .env. No official xAI Node SDK; the Python xai-sdk (client.image.sample / client.video.generate) is an alternative to the raw calls shown."9 },10 "records": [11 {"provider": "xai", "area": "images", "file": "examples/xai/images/generate.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "grok-imagine-image 1:1 1k b64_json -> 200 JPEG, cost_in_usd_ticks 200000000 ($0.02). Run once."},12 {"provider": "xai", "area": "images", "file": "examples/xai/images/generate.py", "language": "python", "status": "UNVERIFIED", "verified_at": null, "notes": "openai SDK + extra_body {aspect_ratio, resolution}; identical raw request LIVE_VERIFIED. Paid ($0.02), not run."},13 {"provider": "xai", "area": "images", "file": "examples/xai/images/generate.ts", "language": "typescript", "status": "UNVERIFIED", "verified_at": null, "notes": "fetch; identical raw request LIVE_VERIFIED. Paid, not run."},14 {"provider": "xai", "area": "images", "file": "examples/xai/images/edit.py", "language": "python", "status": "UNVERIFIED", "verified_at": null, "notes": "JSON edit with base64 data URL; identical raw request LIVE_VERIFIED 2026-09-18 ($0.022). Not run as a script."},15 {"provider": "xai", "area": "images", "file": "examples/xai/images/list_models.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "GET /v1/image-generation-models -> 3 models with pricing matrix. Free."},16 {"provider": "xai", "area": "videos", "file": "examples/xai/videos/generate_and_poll.sh", "language": "bash", "status": "UNVERIFIED", "verified_at": null, "notes": "Identical request/polling LIVE_VERIFIED via tmp-live/xai-media/probe_video.py (1 s, 480p, $0.05, done in 11.4 s, pending polls = HTTP 202). Paid, not run as script."},17 {"provider": "xai", "area": "videos", "file": "examples/xai/videos/generate_and_poll.py", "language": "python", "status": "UNVERIFIED", "verified_at": null, "notes": "Same as .sh; raw requests via scripts/live.py. Paid."},18 {"provider": "xai", "area": "videos", "file": "examples/xai/videos/generate_and_poll.ts", "language": "typescript", "status": "UNVERIFIED", "verified_at": null, "notes": "fetch + poll loop. Paid."},19 {"provider": "xai", "area": "videos", "file": "examples/xai/videos/list_models.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "GET /v1/video-generation-models -> grok-imagine-video, grok-imagine-video-1.5. Free."},20 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/tts.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "POST /v1/tts 'OK.' eve wav 16 kHz -> 200 audio/wav 25324 bytes. ~$0.00005."},21 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/voices.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "GET /v1/tts/voices -> 28 voices. Free."},22 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/client_secret.sh", "language": "bash", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "POST /v1/realtime/client_secrets 60 s -> value (111 chars) + expires_at. Free."},23 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/stt.py", "language": "python", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "POST /v1/stt on the tts.sh clip -> {'text': 'Okay.', 'language': 'en', 'duration': 0.79, words[...]}. ~$0.00002."},24 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/realtime_text_turn.py", "language": "python", "status": "LIVE_VERIFIED", "verified_at": "2026-09-18", "notes": "wss://api.x.ai/v1/realtime text turn -> 18 events, transcript 'OK', 22720 bytes PCM, usage.billable_audio_seconds 1. ~$0.005."},25 {"provider": "xai", "area": "voice", "file": "examples/xai/voice/realtime_text_turn.ts", "language": "typescript", "status": "UNVERIFIED", "verified_at": null, "notes": "Needs `npm i ws` (not installed). Mirrors the verified Python flow."},26 {"provider": "xai", "area": "skills", "file": "examples/xai/skills/skills_crud.py", "language": "python", "status": "FAILED_VERIFICATION", "verified_at": "2026-09-18", "notes": "GET /v1/skills -> 404 generic envelope with our key (ACCOUNT_RESTRICTED; OpenAPI-only endpoints). Script exits at the first non-2xx."},27 {"provider": "xai", "area": "skills", "file": "examples/xai/skills/list.sh", "language": "bash", "status": "FAILED_VERIFICATION", "verified_at": "2026-09-18", "notes": "404 with our key. Free."}28 ]29}30