Articles on: VPS Hosting

How to Use the OpenClaw API

This guide walks you through enabling the OpenAI-compatible API endpoint on your OpenClaw VPS, allowing external tools to connect directly to your private AI agent.


What Is the OpenClaw API?


This feature makes a Chat Completions API endpoint available on your VPS using OpenAI's API format. External applications like Cursor IDE, n8n, ElevenLabs, etc can then connect to your private OpenClaw agent.


Why Enable It?


  • Use Your Agent in Your Favorite Tools: Connect your private AI to coding assistants, automation workflows, or voice apps.
  • Standard Compatibility: Works with any app that supports the OpenAI API.


Prerequisites



If you're new to OpenClaw, feel free to check out this guideline.

How to Enable the API


  1. Run setup command: setup-api.


  1. The system will prompt you to confirm. You may proceed by typing y and pressing Enter.


  1. Wait while the system configures and restarts the service. Once completed, your unique API details will be displayed.


Note: Copy your endpoint URL for reference.

How to Disable the API


If you no longer need the API enabled, you can disable it anytime:


setup-api off



The system will process the request and restart OpenClaw services to apply the change.


Need Further Assistance?


If you face any issues or need assistance, don’t hesitate to reach out — our support team is always ready to help!


🔧 Need help? Submit a Support Ticket

💬 Chat with us on Live Chat via our website


Updated on: 03/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!