Ludo.ai

You've got questions? We've got answers!

Explore our comprehensive documentation for in-depth information about Ludo.ai and its powerful features.
API & MCPAudio GeneratorSprite GeneratorVideo GeneratorPlayable Generator3D Asset GeneratorLudo ScoreFAQUser Account and SubscriptionMarket TrendsGame ConceptImage GeneratorSearchTop Charts BlenderStep-by-Step Game IdeationGame IdeatorAsk Ludo

API & MCP


  • Introduction to API & MCP Integration

    Ludo.ai offers two ways to integrate our generative AI capabilities into your workflow:

    1. MCP (Model Context Protocol): Connect Ludo.ai directly to AI assistants like Claude or Cursor. Generate game assets through natural language conversations without writing code.

    2. REST API: Build custom integrations and automate asset creation in your own applications and pipelines.

    Both methods provide access to the same generative features:

    • Images & Animation: Sprites, icons, UI assets, textures, backgrounds, and spritesheet animations
    • Video & 3D: Video generation from images, 2D to 3D model conversion
    • Audio: Sound effects, music tracks, character voices, and voice cloning

    Choose MCP if you want to generate assets conversationally through an AI assistant. Choose the REST API if you need programmatic control or want to integrate asset generation into your own tools and pipelines.


  • Getting Started with API & MCP

    To use Ludo.ai's API or MCP integration, follow these steps:

    1. Subscribe to a Compatible Plan

    API and MCP features are available on select subscription plans. Check the pricing page to ensure your plan includes API access.

    2. Generate Your API Key

    1. Log in to your Ludo.ai account
    2. Go to your account settings
    3. Generate a new API key
    4. Store your key securely—treat it like a password

    3. Authenticate Your Requests

    All API and MCP requests require authentication. Include this header in your requests:

    Authentication: ApiKey YOUR_API_KEY
    

    Replace YOUR_API_KEY with the key you generated.

    Important Notes

    • Keep your API key confidential. Do not share it or commit it to public repositories.
    • If you believe your key has been compromised, regenerate it immediately in your account settings.

  • Credit Usage and Beta Limitations

    Credit System

    API and MCP requests consume credits from your account balance. This applies even if your subscription plan includes unlimited usage of web features—API/MCP usage is always credit-based.

    Credit costs vary by the type of asset you're generating. Refer to the API documentation for current pricing per endpoint.

    Beta Status

    The API and MCP integration is currently in beta. During this period:

    • Rate Limits: Stricter rate limits apply. Currently, only 1 simultaneous request is allowed per endpoint.
    • Higher Throughput: If your use case requires higher throughput or concurrent requests, contact us to discuss your needs.

    Tips for Managing Credits

    • Start with lower-cost generation types when experimenting
    • Use the web interface for exploration and iteration before automating via API
    • Monitor your credit balance in your account settings

  • Setting up MCP with Claude Code

    Connect Ludo.ai to Claude Code to generate game assets directly through natural language conversations.

    Quick Setup

    Run this command in your terminal:

    claude mcp add ludo https://mcp.ludo.ai/mcp -t http -H "Authentication: ApiKey YOUR_API_KEY"
    

    Replace YOUR_API_KEY with your Ludo.ai API key.

    MCP Server Details

    • Server URL: https://mcp.ludo.ai/mcp
    • Transport Type: HTTP
    • Authentication Header: Authentication: ApiKey YOUR_API_KEY

    Timeout Fix for Long-Running Operations

    Some asset generation (particularly 3D models) can take longer than 60 seconds. Recent Claude Code versions have a bug that causes MCP tool calls to timeout after 60 seconds.

    To fix this, downgrade to a stable version and increase the timeout:

    claude update --version 2.0.32 && MCP_TOOL_TIMEOUT=600000 claude
    

    This sets the timeout to 10 minutes (600,000 milliseconds), which should be sufficient for all generation types.

    Verifying the Connection

    After setup, you can ask Claude to use Ludo.ai tools. If the connection is working, Claude will have access to asset generation capabilities.


  • Setting up MCP with Cursor

    Connect Ludo.ai to Cursor to generate game assets directly within your development environment.

    Option 1: Cursor Settings UI

    1. Open Cursor Settings (Cmd+, on Mac or Ctrl+, on Windows/Linux)
    2. Navigate to the Tools & MCP section
    3. Click New MCP Server
    4. Configure the server:
      • Server Name: ludo-ai
      • Transport Type: http
      • URL: https://mcp.ludo.ai/mcp
    5. Add a header:
      • Key: Authentication
      • Value: ApiKey YOUR_API_KEY
    6. Save and restart Cursor

    Option 2: Manual Configuration

    Edit your Cursor MCP config file. The file is located at:

    • Global: ~/.cursor/mcp.json
    • Project-specific: .cursor/mcp.json in your project root

    Add the following configuration:

    {
      "mcpServers": {
        "ludo-ai": {
          "url": "https://mcp.ludo.ai/mcp",
          "transport": "http",
          "headers": {
            "Authentication": "ApiKey YOUR_API_KEY"
          }
        }
      }
    }
    

    Replace YOUR_API_KEY with your Ludo.ai API key, then restart Cursor.

    MCP Server Details

    • Server URL: https://mcp.ludo.ai/mcp
    • Transport Type: HTTP
    • Authentication Header: Authentication: ApiKey YOUR_API_KEY

  • Using the REST API

    Build custom integrations with Ludo.ai using our REST API. This gives you full programmatic control over asset generation for use in your own applications, pipelines, and tools.

    Base URL

    All API endpoints are relative to:

    https://api.ludo.ai/api/
    

    Authentication

    Include this header in all API requests:

    Authentication: ApiKey YOUR_API_KEY
    

    Replace YOUR_API_KEY with your Ludo.ai API key.

    API Characteristics

    • RESTful design: Standard HTTP methods and status codes
    • JSON responses: All responses are returned in JSON format
    • Asynchronous generation: Some endpoints may take time to generate assets

    Example Request Structure

    curl -X POST "https://api.ludo.ai/api/endpoint" \
      -H "Authentication: ApiKey YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"parameter": "value"}'
    

    Documentation

    For detailed endpoint documentation, parameters, and examples, visit the API Documentation.

    Need Help?