### API Response Structure Example Source: https://help.scenario.com/en/articles/managing-filtering-models-with-the-scenario-api Example of the JSON response structure for the /models endpoint, including a list of models with their tags and pagination information. ```json { "models": [ { "id": "model_xyz123", "name": "Scenario SDXL Base", "type": "checkpoint", "privacy": "public", "tags": ["sc:scenario", "base-model", "realistic"], "thumbnailUrl": "..." }, { "id": "model_abc987", "name": "Community Toon Style", "type": "lora", "privacy": "public", "tags": ["sc:third-party", "cartoon"], "thumbnailUrl": "..." } ], "nextPaginationToken": "..." } ``` -------------------------------- ### Remote MCP Server Configuration (JSON) Source: https://help.scenario.com/en/articles/getting-started-with-the-scenario-mcp-server Configure Claude Desktop, Windsurf, Zed, or Warp to use the Scenario MCP server via `npx mcp-remote`. This example uses OAuth. ```json { "mcpServers": { "scenario": { "command": "npx", "args": ["-y", "mcp-remote@latest", "https://mcp.scenario.com/mcp"] } } } ``` -------------------------------- ### Inventor's Triumph Prompt Source: https://help.scenario.com/en/articles/ovi-the-essentials Example prompt for an Image-to-Video (I2V) generation, starting from an illustration and including dialogue and mechanical sounds using speech and audio scenery tags. ```text A warm shaft of golden light filters down onto an exuberant scientist with wild white hair and oversized goggles, standing confidently in a cluttered workshop. Behold-my greatest invention yet! Soft clinking of glass, faint mechanical whirs, the scientist’s gleeful voice echoing. ``` -------------------------------- ### Python Universal Generation Script Source: https://help.scenario.com/en/articles/getting-started-with-api-example This script demonstrates how to trigger generation for various modalities (video, audio, 3D, image) using the Scenario API and poll for completion. Ensure you have your API keys and have installed the 'requests' library. ```python import requests import time import base64 # --- CONFIGURATION --- API_KEY = "YOUR_API_KEY" API_SECRET = "YOUR_API_SECRET" BASE_URL = "https://api.cloud.scenario.com/v1" # Basic Auth Header auth_str = f"{API_KEY}:{API_SECRET}" b64_auth = base64.b64encode(auth_str.encode()).decode() headers = { "Authorization": f"Basic {b64_auth}", "Content-Type": "application/json" } def run_generation(model_id, payload): """ Generic function to trigger generation and poll for the result. """ url = f"{BASE_URL}/generate/custom/{model_id}" print(f"\n--- Starting Generation: {model_id} ---") # 1. Start the Job try: response = requests.post(url, headers=headers, json=payload) response.raise_for_status() job_data = response.json() job_id = job_data['job']['jobId'] print(f"Job Initiated. ID: {job_id}") except requests.exceptions.RequestException as e: print(f"Error starting job: {e}") if response.text: print(response.text) return # 2. Poll for Completion poll_url = f"{BASE_URL}/jobs/{job_id}" while True: resp = requests.get(poll_url, headers=headers) status_data = resp.json() status = status_data['job']['status'] if status == 'success': # Result is usually a list of assetIds or a direct URL depending on model result = status_data['job'].get('result', {}) metadata = status_data['job'].get('metadata', {}) # Try to grab the Asset ID or URL asset_ids = metadata.get('assetIds', []) print(f"SUCCESS! Assets created: {asset_ids}") print(f"Full Result: {result}") break elif status in ['failed', 'cancelled']: print(f"Job Failed: {status_data['job'].get('error')}") break print(".", end="", flush=True) time.sleep(3) # Wait 3 seconds before next check # ========================================== # UNCOMMENT A BLOCK BELOW TO TEST A MODALITY # ========================================== # --- 1. VIDEO GENERATION --- # Model: Kling v2.6 T2V Pro # Docs: https://docs.scenario.com/docs/video-generation # video_model = "model_kling-v2-6-t2v-pro" # video_payload = { # "prompt": "A cinematic drone shot of a futuristic city at sunset, highly detailed", # "aspectRatio": "16:9", # "duration": 5 # } # run_generation(video_model, video_payload) # --- 2. AUDIO GENERATION (Music) --- # Model: Google Lyria 2 # Docs: https://docs.scenario.com/docs/audio-generation # audio_model = "model_lyria-2" # audio_payload = { # "prompt": "Futuristic country music, steel guitar, huge 808s, synth wave elements space western cosmic twang soaring vocals", # } # run_generation(audio_model, audio_payload) # --- 3. 3D GENERATION (Text-to-3D) --- # Model: Meshy Text to 3D # Docs: https://docs.scenario.com/docs/3d-model-generation # threed_model = "model_meshy-txt23d" # threed_payload = { # "prompt": "A low-poly treasure chest with gold coins" # } # run_generation(threed_model, threed_payload) # --- 4. THIRD-PARTY IMAGE GENERATION --- # Model: Imagen 4 Ultra # Docs: https://docs.scenario.com/docs/third-party-model-generation # image_model = "model_imagen4-ultra" # image_payload = { # "prompt": "A photorealistic portrait of an astronaut in a garden", # "aspectRatio": "4:3" # } # run_generation(image_model, image_payload) ``` -------------------------------- ### GET /collections Source: https://help.scenario.com/en/articles/collections Retrieve a list of all collections. ```APIDOC ## GET /collections ### Description Retrieve a list of all collections. ### Method GET ### Endpoint /collections ``` -------------------------------- ### Samurai Focus Prompt Source: https://help.scenario.com/en/articles/ovi-the-essentials Example prompt for an I2V generation transforming an illustration into a cinematic shot, utilizing audio scenery tags to enhance mood and realism. ```text A close-up frames a young woman with long dark hair holding a katana across her shoulder, her gaze calm and steady beneath the soft spring sunlight. Soft rustle of leaves, distant birdsong, faint whisper of a blade moving through the air. ```