June 1, 2026 · xAI
Public URLs and Files API ↔ Imagine integration
- Public URLs for Files — turn any file in your Files API storage into a permanent, unauthenticated URL that anyone can open, embed, or share. Revocable at any time, or set an auto-expiry between 1 hour and 30 days. See the Public URLs docs.
- Reference stored files as Imagine inputs — substitute
image_file_id,video_file_id, orreference_image_file_idsfor URL inputs across every Imagine endpoint, with no need to re-upload bytes or make the file public. See Imagine → Files API Integration. - Persist Imagine outputs to Files — set
storage_optionson any Imagine request to save the generated asset to your Files storage; pair withstorage_options.public_urlto publish a shareable link in one round trip. See Imagine → Files API Integration.