Claigrid
  • Introduction
  • Getting Started
    • Quickstart
  • Basics
    • AI Inference Termination (AIT)
    • Orchestration server (CIMS)
    • Worker nodes
    • Claigrid API
    • Pricing
  • Step by Step Setup
    • Connecting to Your Cloud Provider
    • Setting up a new project
    • AIT_API
Powered by GitBook
On this page
  • What Users Can Do with Claigrid’s APIs:
  • Example API usage:
  1. Basics

Claigrid API

PreviousWorker nodesNextPricing

Last updated 2 months ago

APIs are at the heart of its platform, enabling seamless communication and control across all services. Designed to give users full command over Claigrid’s features, these APIs make it easy to manage infrastructure tasks and streamline operations without direct intervention in the control panel.

What Users Can Do with Claigrid’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: Claigrid’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 Claigrid’s infrastructure to ensure smooth deployment and execution.

  • Multi-Language API Support: Through , 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 Claigrid's services.

Postman