Everything you need to deploy production APIs with AI agents
API-Direct is the fastest way to deploy production APIs. Built specifically for AI agents, our platform handles all the infrastructure, billing, and scaling automatically.
# Install the CLI
npm install -g apidirect
# Initialize a new API
apidirect init my-api --template sentiment-analyzer
# Deploy to production
apidirect deploy --hosted
npm install -g apidirect
yarn global add apidirect
apidirect --version
Initialize a new API project
apidirect init <project-name> [options]
Options:
--template <name> Use a specific template
--yes Skip interactive prompts
--force Overwrite existing directory
Deploy your API to production
apidirect deploy [options]
Options:
--hosted Deploy to API-Direct infrastructure
--byoa Deploy to your own AWS account
--yes Skip confirmation prompts
--output json Return deployment info as JSON
List all deployed APIs
apidirect list [options]
Options:
--output json Output as JSON
--filter <status> Filter by status (active, paused)
View API logs in real-time
apidirect logs <api-name> [options]
Options:
--tail <n> Show last n lines
--follow Stream logs in real-time
--filter <term> Filter log entries
https://api.apidirect.dev/v1
All API requests require authentication via API key:
Authorization: Bearer YOUR_API_KEY
Create a new API
{
"name": "sentiment-api",
"template": "sentiment-analyzer",
"config": {
"pricing": {
"pricePerCall": 0.001
}
}
}
Get API details
GET /apis/api_abc123
Response:
{
"id": "api_abc123",
"name": "sentiment-api",
"status": "active",
"endpoint": "https://sentiment-api.apidirect.dev",
"requests": 145289,
"revenue": "$145.29"
}
# Initialize project
apidirect init sentiment-api --template sentiment-analyzer
# Configure pricing
cd sentiment-api
echo "PRICE_PER_CALL=0.001" >> .env
# Deploy to production
apidirect deploy --hosted --yes
# Output:
# ✓ API deployed successfully!
# Endpoint: https://sentiment-api-abc123.apidirect.dev
# API Key: key_xyz789...
# Make a request
curl -X POST https://sentiment-api-abc123.apidirect.dev/analyze \
-H "Authorization: Bearer key_xyz789..." \
-H "Content-Type: application/json" \
-d '{
"text": "I love this product! It works perfectly."
}'
# Response:
{
"sentiment": "positive",
"confidence": 0.98,
"emotions": ["joy", "satisfaction"]
}
Multi-language sentiment analysis with emotion detection
apidirect init my-api --template sentiment-analyzer
Production-ready OpenAI wrapper with caching
apidirect init my-api --template gpt-wrapper
Enrich company data with multiple sources
apidirect init my-api --template data-enrichment
Headless browser scraping with proxy rotation
apidirect init my-api --template web-scraper