Loading...
Loading...
Manages AI gateway for routing, securing, and monitoring AI service requests in ML operations.
npx skill4agent add alphaonedev/openclaw-graph ai-gateway$AI_GATEWAY_API_KEYai-gateway-cli init --config path/to/config.yamlai-gateway-cli applycreateRoute()ai-gateway-cli init --cluster aimlops --key $AI_GATEWAY_API_KEYai-gateway-cli add-route --path /predict --target http://ai-service:8080 --method POSTai-gateway-cli secure --endpoint /predict --auth jwt --rate-limit 100/minai-gateway-cli metrics --format json{ "path": "/predict", "target": "http://ai-service:8080", "method": "POST" }{ "authType": "jwt", "rateLimit": 100 }import requests
headers = {'Authorization': f'Bearer {os.environ.get("AI_GATEWAY_API_KEY")}'}
response = requests.post('http://gateway:8080/api/v1/routes', json={"path": "/predict", "target": "http://ai-service:8080"}, headers=headers)export AI_GATEWAY_API_KEY=your_api_key_here
ai-gateway-cli add-route --path /chat --target http://llm-service:5000routes:
- path: /predict
target: http://ai-service:8080
methods: [POST]
security:
- endpoint: /predict
auth: jwt
rateLimit: 100kubectl annotate pod ai-pod aimlops/gateway=trueAI_Gateway(api_key=os.environ['AI_GATEWAY_API_KEY']).connect(cluster='aimlops')callback: http://external-service/webhookheaders['Authorization'] = f'Bearer {new_key}'if not os.environ.get('AI_GATEWAY_API_KEY'): raise ValueError('API key required')ai-gateway-cli config --log-level debugexport AI_GATEWAY_API_KEY=abc123; ai-gateway-cli add-route --path /ml-predict --target http://model-service:8000curl -H "Authorization: Bearer abc123" http://gateway:8080/ml-predict -d '{"input": "data"}'ai-gateway-cli secure --endpoint /chat --auth api-key --rate-limit 50/minai-gateway-cli metrics --endpoint /chatundefined