Cloud Infrastructure
Bearer Token
Modal REST API
Serverless compute platform for AI/ML workloads
Modal is a serverless compute platform designed for running AI/ML workloads, data pipelines, and backend services. Developers use Modal to deploy functions that scale from zero to thousands of containers automatically, with built-in GPU support and dependency management. The platform handles all infrastructure complexity while providing pay-per-use pricing for compute resources.
Base URL
https://api.modal.com/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /functions/deploy | Deploy a new function to Modal's serverless infrastructure |
| GET | /functions/{function_id} | Retrieve details about a deployed function including status and configuration |
| POST | /functions/{function_id}/invoke | Invoke a deployed function synchronously and return results |
| DELETE | /functions/{function_id} | Delete a deployed function and release associated resources |
| GET | /apps | List all deployed apps and their associated functions |
| POST | /apps/{app_id}/redeploy | Redeploy an existing app with updated code or configuration |
| GET | /volumes | List all persistent volumes attached to your workspace |
| POST | /volumes | Create a new persistent volume for storing data across function invocations |
| GET | /secrets | List all secrets available in your workspace |
| POST | /secrets | Create a new secret for secure credential storage |
| GET | /logs/{function_id} | Retrieve execution logs for a specific function |
| GET | /usage | Get compute usage statistics and billing information |
| POST | /images/build | Build a custom container image with specified dependencies |
| GET | /images | List all custom container images in your workspace |
| GET | /schedules | List all scheduled function executions |
Code Examples
curl -X POST https://api.modal.com/v1/functions/func_abc123/invoke \
-H 'Authorization: Bearer modal_token_xyz789' \
-H 'Content-Type: application/json' \
-d '{
"args": ["input_data"],
"kwargs": {"param": "value"}
}'
Connect Modal to AI
Deploy a Modal MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Modal through these tools:
deploy_modal_function
Deploy a new serverless function to Modal with specified code, dependencies, and GPU requirements
invoke_modal_function
Execute a deployed Modal function with provided arguments and return results
list_modal_apps
Retrieve all deployed Modal applications and their current status
create_modal_volume
Create a persistent volume for storing data across function invocations
get_modal_logs
Fetch execution logs and debugging information for Modal functions
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Modal MCP Server →