Model & Tool Schemas

This directory contains OpenAPI schema definitions for AI models and tools used by the Eurus Studio application.

Directory Structure

Base Models (base_models/ - 10 files)

Core AI models for content generation:

Azure OpenAI Models

  • azure-openai_gpt-4o_chat-completion.json - GPT-4o chat completion

  • azure-openai_gpt-4o_chat-completion-streaming.json - GPT-4o streaming chat completion

FAL.ai Image Generation Models

  • fal-ai_flux-dev_text-to-image.json - FLUX Dev text-to-image generation

  • fal-ai_flux-dev_image-to-image.json - FLUX Dev image-to-image generation

  • fal-ai_flux-pro-kontext-max_multi-modal.json - FLUX Pro Kontext multi-modal

  • fal-ai_stable-diffusion-v35-medium_text-to-image.json - Stable Diffusion v3.5 Medium

FAL.ai Video Generation Models

  • fal-ai_veo2_text-to-video.json - Google Veo2 text-to-video generation

  • fal-ai_veo2_image-to-video.json - Google Veo2 image-to-video generation

  • fal-ai_veo3_text-to-video.json - Google Veo3 text-to-video generation

  • fal-ai_luma-dream-machine-ray-2_video-modification.json - Luma Dream Machine video modification

Tools (tools/ - 1 file)

Specialized processing and enhancement tools:

  • fal-ai_clarity-upscaler.json - Image upscaling and enhancement tool

Schema Structure

Each schema file is an OpenAPI 3.0.4 specification that includes:

  • Model metadata in info.x-fal-metadata or info.x-azure-metadata

  • Input schema defining the parameters the model accepts

  • Output schema defining the response structure

  • API endpoints and authentication requirements

Usage

Base Models

Base model schemas are automatically loaded by the ModelRegistry class at application startup:

// lib/models/registry/model-registry.ts
const schemaDir = path.join(process.cwd(), 'schemas', 'base_models')
const models = await this.schemaLoader.loadSchemasFromDirectory(schemaDir)

Tools

Tool schemas are loaded via the Tools API endpoint:

// app/api/tools/available/route.ts
const toolsDir = path.join(process.cwd(), 'schemas', 'tools')
const tools = await this.schemaLoader.loadSchemasFromDirectory(toolsDir)

Tools are displayed in the right sidebar's "Tools" tab in a 2-column grid layout.

Adding New Schemas

Base Models

To add new base model schemas:

  1. Place the OpenAPI JSON file in the base_models/ directory

  2. Follow the naming convention: {provider}_{model-id}_{category}.json

  3. Ensure the schema includes the required metadata fields

  4. Restart the application to load the new schema

Tools

To add new tool schemas:

  1. Place the OpenAPI JSON file in the tools/ directory

  2. Follow the naming convention: {provider}_{tool-name}.json

  3. Ensure the schema includes the required metadata fields

  4. Tools will be automatically available in the Tools tab

Expansion Plans

This directory is designed to scale to ~60 schemas total:

  • Base models: ~40-50 schemas

  • Tools: ~10-20 schemas

Last updated