Oorbit API

APIs are at the heart of its platform, enabling seamless communication and control across all services. Designed to give users full command over Maingrid’s features, these APIs make it easy to manage infrastructure tasks and streamline operations without direct intervention in the control panel. Each service—AI Inference Termination (AIT) and Cloud Gaming—comes with its own dedicated API, providing tailored functionality for each use case.

By utilizing Maingrid’s APIs, users can automate workflows, manage infrastructure at scale, and integrate seamlessly with their existing development pipelines. This API-first approach empowers developers to fully leverage Maingrid’s platform, enabling both AIT and Cloud Gaming services to operate efficiently and transparently.

What Users Can Do with MainGrid’s APIs:

  • Infrastructure and Container Management: Users can perform essential operations like pulling code, creating and removing images, and managing containers—all through simple API calls.

  • Dynamic Container Control: With API commands, users can start, stop, and manage containerized applications, giving them flexibility to adjust resources on demand.

  • Health Checks and Monitoring: Maingrid’s APIs also support health checks, enabling users to monitor the status of their containers and infrastructure. This helps ensure applications are running optimally and facilitates quick troubleshooting if needed.

  • Seamless Code Integration: The APIs allow users to pull code securely from their repositories, automatically integrating it with Maingrid’s infrastructure to ensure smooth deployment and execution.

  • Multi-Language API Support: Through Postman, users can adapt API requests into the language of their choice for easy integration into front-end applications. Supported languages include Go, JavaScript, C#, Python, and more, allowing seamless compatibility across various development environments.

Example API usage:

-> Spinning up a new container

POST /Create Container

<Start a Container Using Provided Image>

Authorization

Name
Value

CX-API-KEY

{{apiKey}}

Plain Text

TTL : time to live (0 means infitinie , any number > 0 , will terminate container after X seconds)
Image: full image name including tag name

Example Request

import requests

url = "http://localhost:3000/api/containers"

payload = "{\r\n    \"image\": \"ghcr.io/testorg/testimage\",\r\n    \"ttl\" : 0,\r\n    \"envs\" : \"A=B,B=C\",\r\n    \"cmd\" : \"sleep 999999999\"\r\n}"
headers = {}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Explore detailed API usage within each section of MainGrid's services.

Last updated