WZRD Studio’s backend is built entirely on Supabase Edge Functions — Deno-based serverless functions deployed at the edge and called directly from the Electron desktop app. Each function handles a focused responsibility: authentication, billing, AI model proxying, asset management, or social publishing. All functions share a common authentication pattern and CORS configuration, and they are addressable atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gratitude5dee/wzrd-studio-desktopfinal/llms.txt
Use this file to discover all available pages before exploring further.
{VITE_SUPABASE_URL}/functions/v1/{function-name}.
https://ixkkrousepsiorwlaycp.supabase.co/functions/v1/In the app, this value comes from the VITE_SUPABASE_URL environment variable.Authorization: Bearer <supabase-jwt> unless noted otherwise. Functions return Content-Type: application/json for standard responses and text/event-stream for SSE endpoints.Authentication
POST /functions/v1/wallet-auth — Wallet Signature → Supabase JWT
POST /functions/v1/wallet-auth — Wallet Signature → Supabase JWT
viem, then upserts the user in Supabase Auth and returns a full session.This is the primary sign-in path for WZRD Studio — users sign a timestamped message with their Web3 wallet, and the function bridges that proof into a standard Supabase session.Request body:walletAddress and timestamp as substrings to prevent replay attacks.- Creates a user profile row if one doesn’t exist
- Ensures a
wallet_userslink record exists - Provisions a credit account with a one-time 100-credit welcome grant via
ensure_credit_account
GET /functions/v1/get-thirdweb-config — Thirdweb Client Config
GET /functions/v1/get-thirdweb-config — Thirdweb Client Config
clientId and any additional configuration needed for the Thirdweb Connect SDK. Called by the app during initialization before the auth flow begins.Response:GET /functions/v1/realtime-client-secret — OpenAI Realtime API Key
GET /functions/v1/realtime-client-secret — OpenAI Realtime API Key
Billing
GET /functions/v1/billing-catalog — Plans and Credit Packs
GET /functions/v1/billing-catalog — Plans and Credit Packs
plan_code | Name | Monthly | Yearly | Credits/mo |
|---|---|---|---|---|
free | Free | $0 | — | 0 (one-time 100 welcome) |
pro | Pro | $49 | $468 | 2,000 |
business | Business | $149 | $1,428 | 10,000 |
pack_code | Credits | Price |
|---|---|---|
pack_500 | 500 | $9.99 |
pack_2000 | 2,000 | $29.99 |
pack_5000 | 5,000 | $59.99 |
POST /functions/v1/billing-checkout — Create Stripe Checkout Session
POST /functions/v1/billing-checkout — Create Stripe Checkout Session
"pack" (one-time credit purchase) or "subscription".checkout_mode is "pack". Must match an active billing_credit_packs row (e.g., "pack_500").checkout_mode is "subscription". Must match an active billing_plans row (e.g., "pro")."month" (default) or "year".{origin}/settings/billing?checkout=success.{origin}/settings/billing?checkout=cancel.billing_checkout_sessions row is inserted for audit purposes.POST /functions/v1/billing-portal — Customer Billing Portal
POST /functions/v1/billing-portal — Customer Billing Portal
POST /functions/v1/admin-add-credits — Admin Credit Adjustment
POST /functions/v1/admin-add-credits — Admin Credit Adjustment
AI Generation (Proxy)
POST /functions/v1/fal — fal.ai Model Proxy (Queue Mode)
POST /functions/v1/fal — fal.ai Model Proxy (Queue Mode)
queue mode and returns immediately with a requestId and initial status. Use this for fire-and-forget submissions where the client polls for results separately.Request body:fal-ai/flux/schnell). The function prepends the fal.run/v1/ prefix automatically.mode: "queue" added./functions/v1/fal-stream instead. The fal function is a thin proxy for advanced use cases.POST /functions/v1/fal-stream — fal.ai SSE Streaming Proxy
POST /functions/v1/fal-stream — fal.ai SSE Streaming Proxy
mergeFalModelInputs before submission."image", "video", "audio", "json", or "utility". Inferred from modelId when omitted.Event type | Description |
|---|---|
meta | Resolved model, fallback status, media type |
progress | fal.ai queue status (IN_QUEUE → IN_PROGRESS), progress percent (5–95), logs |
done | Final result object, resolved model ID |
fallback | Primary model failed; retrying with fallback model |
error | Terminal error with reason |
done; hold released on error.POST /functions/v1/fal-proxy — fal.ai Request Proxy
POST /functions/v1/fal-proxy — fal.ai Request Proxy
POST /functions/v1/gemini-image-generation — Gemini Image Generation
POST /functions/v1/gemini-image-generation — Gemini Image Generation
{ prompt, model?, parameters? }POST /functions/v1/gemini-video-generation — Gemini Video Generation
POST /functions/v1/gemini-video-generation — Gemini Video Generation
{ prompt, model?, parameters? }POST /functions/v1/gemini-text-generation — Gemini Text Generation (SSE)
POST /functions/v1/gemini-text-generation — Gemini Text Generation (SSE)
data: chunks. Used by the Unified Generation Service for the gemini-text route.Request body: { prompt, model?, stream? }POST /functions/v1/gemini-image-analysis — Gemini Image Analysis
POST /functions/v1/gemini-image-analysis — Gemini Image Analysis
{ image_url, prompt? }POST /functions/v1/elevenlabs-tts — ElevenLabs Text-to-Speech
POST /functions/v1/elevenlabs-tts — ElevenLabs Text-to-Speech
POST /functions/v1/elevenlabs-sfx — ElevenLabs Sound Effects
POST /functions/v1/elevenlabs-sfx — ElevenLabs Sound Effects
POST /functions/v1/elevenlabs-music — ElevenLabs Music Generation
POST /functions/v1/elevenlabs-music — ElevenLabs Music Generation
GET /functions/v1/elevenlabs-voices — ElevenLabs Voice List
GET /functions/v1/elevenlabs-voices — ElevenLabs Voice List
{ voices: [{ voice_id, name, preview_url, ... }] }POST /functions/v1/groq-chat — Groq Chat Completion
POST /functions/v1/groq-chat — Groq Chat Completion
/openai/v1/chat/completions endpoint. Used for fast text generation in project setup (storyline, shot ideas, scene breakdowns).Request body:llama-3.3-70b-versatile).POST /functions/v1/groq-stream — Groq Chat Completion (SSE)
POST /functions/v1/groq-stream — Groq Chat Completion (SSE)
groq-chat. Emits OpenAI-compatible data: SSE chunks.Request body: Same as groq-chat with stream: true implied.Assets & Projects
POST /functions/v1/asset-upload — Upload Media to Project
POST /functions/v1/asset-upload — Upload Media to Project
project_id(required) — target project UUIDfile— base64-encoded file data or a URL to fetch and re-uploadasset_type—"image"|"video"|"audio"metadata— optional custom key-value metadata
{ asset_id, public_url, storage_path }POST /functions/v1/asset-processor — Process / Transcode Assets
POST /functions/v1/asset-processor — Process / Transcode Assets
{ asset_id, operations: string[] }POST /functions/v1/create-project — Create a New Project
POST /functions/v1/create-project — Create a New Project
title(required) — project titledescription— optional project descriptiontemplate_id— optional starting template
{ project: { id, title, ... } }POST /functions/v1/upload — Generic File Upload
POST /functions/v1/upload — Generic File Upload
public_url.POST /functions/v1/download — Retrieve Asset
POST /functions/v1/download — Retrieve Asset
{ bucket, path, expires_in? }Response: { url } or binary stream.Collaboration & Sharing
POST /functions/v1/invite-collaborator
POST /functions/v1/invite-collaborator
project_id(required)invitee_emailorinvitee_user_idrole—"viewer"|"editor"|"admin"
POST /functions/v1/create-share-link
POST /functions/v1/create-share-link
GET /functions/v1/access-share-link
GET /functions/v1/access-share-link
POST /functions/v1/revoke-share
POST /functions/v1/revoke-share
Social (Postz)
The Postz integration lets users publish project exports to social media platforms directly from WZRD Studio.POST /functions/v1/postz-channels
POST /functions/v1/postz-channels
POST /functions/v1/postz-oauth
POST /functions/v1/postz-oauth
wzrd://postz/connected — see the Deep Links reference for how this callback is handled.Request body:provider(required) — platform to connect (e.g.,"instagram")redirect_uri— typically the deep linkwzrd://postz/connected
{ auth_url, state_id }POST /functions/v1/postz-posts
POST /functions/v1/postz-posts
channel_ids(required) — array of channel UUIDs to post toasset_url(required) — URL of the video or image to publishcaption— post caption textscheduled_at— ISO 8601 timestamp to schedule the post (publishes immediately if omitted)
{ post_id, status: "published" | "scheduled" }