Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hosenur/portal/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The OpenCode Portal HTTP API provides programmatic access to manage OpenCode instances, sessions, and project operations. The API is organized around REST principles with predictable resource-oriented URLs.Base URL
All API requests are made to:3000, but this may vary depending on your configuration.
Authentication
The OpenCode Portal API currently does not require authentication for local instances. All endpoints are accessible without API keys or tokens.Port Parameter
Many endpoints include a:port parameter in the URL path. This refers to the OpenCode instance port number, not the Portal port. Each OpenCode instance runs on its own port (typically starting at 3100).
Request Format
The API accepts JSON-encoded request bodies for POST requests. Include the following header:Response Format
All responses are returned as JSON with the following structure: Success Response (200-299)Error Codes
The API uses standard HTTP status codes:| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 404 | Not Found - Resource doesn’t exist |
| 500 | Internal Server Error |
Common Errors
Invalid Port
:port parameter is missing or not a valid number.