✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Andrii Bidochko
  • Updated: March 18, 2026
  • 5 min read

OpenClaw Plugin Rating API: Updated Full OpenAPI Specification and Multi‑Language SDK Generation Guide

The OpenClaw Plugin Rating API delivers a full OpenAPI (Swagger) specification and supports automatic SDK generation for JavaScript, Python, and Go, enabling developers to integrate rating capabilities into AI‑agent workflows instantly.

🚀 Why AI Agents Are the Hottest Topic Right Now

In 2024 the AI‑agent market exploded as enterprises adopt autonomous assistants for customer support, data extraction, and real‑time decision‑making. Platforms like OpenClaw empower developers to stitch together multi‑modal agents that can chat, search, and act on behalf of users. Amid this hype, a reliable Plugin Rating API becomes essential: it lets agents evaluate and prioritize third‑party plugins, ensuring only the best tools are invoked.

UBOS’s host OpenClaw service provides the infrastructure to run these agents at scale, while the OpenClaw Plugin Rating API offers a standardized contract for rating data exchange.

1️⃣ Overview of the OpenClaw Plugin Rating API

The Plugin Rating API is a RESTful service that accepts rating submissions, retrieves aggregated scores, and exposes metadata about each plugin. It follows the OpenAPI 3.1 specification, making it language‑agnostic and ready for automatic client generation.

  • Endpoints: /ratings (POST), /ratings/{pluginId} (GET), /plugins (GET)
  • Authentication: Bearer token (JWT) issued by UBOS
  • Data model: Rating (1‑5 stars), reviewer ID, optional comments, timestamp
  • Rate limiting: 100 requests per minute per token

2️⃣ Full OpenAPI (Swagger) Specification

Below is the complete OpenAPI JSON definition. Copy it into a .json file (e.g., openclaw-rating-api.json) to feed any SDK generator.

{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenClaw Plugin Rating API",
    "version": "1.0.0",
    "description": "API for submitting and retrieving plugin ratings used by AI agents."
  },
  "servers": [
    {
      "url": "https://api.openclaw.ai/v1",
      "description": "Production server"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "Rating": {
        "type": "object",
        "properties": {
          "pluginId": { "type": "string", "example": "gpt-4-voice" },
          "score": { "type": "integer", "minimum": 1, "maximum": 5, "example": 4 },
          "reviewerId": { "type": "string", "example": "user-12345" },
          "comment": { "type": "string", "example": "Great integration, low latency." },
          "timestamp": { "type": "string", "format": "date-time", "example": "2024-03-15T12:34:56Z" }
        },
        "required": ["pluginId", "score", "reviewerId"]
      },
      "RatingResponse": {
        "type": "object",
        "properties": {
          "averageScore": { "type": "number", "format": "float", "example": 4.2 },
          "totalRatings": { "type": "integer", "example": 57 },
          "latestRatings": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Rating" }
          }
        }
      }
    }
  },
  "security": [{ "BearerAuth": [] }],
  "paths": {
    "/ratings": {
      "post": {
        "summary": "Submit a new rating",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/Rating" }
            }
          }
        },
        "responses": {
          "201": { "description": "Rating created" },
          "400": { "description": "Invalid payload" },
          "401": { "description": "Unauthorized" }
        }
      }
    },
    "/ratings/{pluginId}": {
      "get": {
        "summary": "Get aggregated rating for a plugin",
        "parameters": [
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregated rating data",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/RatingResponse" }
              }
            }
          },
          "404": { "description": "Plugin not found" }
        }
      }
    },
    "/plugins": {
      "get": {
        "summary": "List all plugins with rating summaries",
        "responses": {
          "200": {
            "description": "Array of plugins",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/RatingResponse" }
                }
              }
            }
          }
        }
      }
    }
  }
}

3️⃣ Generating a JavaScript SDK

JavaScript developers can use OpenAPI Generator to produce a ready‑to‑use client.

  1. Install the generator (Node.js)

    npm install @openapitools/openapi-generator-cli -g
  2. Run the generation command

    openapi-generator-cli generate \
      -i openclaw-rating-api.json \
      -g javascript \
      -o ./openclaw-js-sdk \
      --additional-properties=usePromises=true
  3. Install the SDK in your project

    cd openclaw-js-sdk
    npm install
    npm link   # optional, for local development
  4. Example usage

    import OpenClawApi from './openclaw-js-sdk/src/index.js';
    
    const api = new OpenClawApi({ 
      basePath: 'https://api.openclaw.ai/v1',
      accessToken: 'YOUR_JWT_TOKEN'
    });
    
    async function submitRating() {
      const rating = {
        pluginId: 'gpt-4-voice',
        score: 5,
        reviewerId: 'dev-987',
        comment: 'Seamless integration with ElevenLabs AI voice.'
      };
      await api.ratingsCreate(rating);
      console.log('Rating submitted!');
    }
    
    submitRating();

4️⃣ Generating a Python SDK

Python developers benefit from the same generator, targeting the python client library.

  1. Install the generator (via pip)

    pip install openapi-generator-cli
  2. Generate the client

    openapi-generator-cli generate \
      -i openclaw-rating-api.json \
      -g python \
      -o ./openclaw-py-sdk \
      --additional-properties=packageName=openclaw_sdk
  3. Install the SDK

    cd openclaw-py-sdk
    pip install .
  4. Example usage

    from openclaw_sdk import OpenClawSdk
    from openclaw_sdk.configuration import Configuration
    
    config = Configuration()
    config.host = "https://api.openclaw.ai/v1"
    config.access_token = "YOUR_JWT_TOKEN"
    
    client = OpenClawSdk(config)
    
    def submit_rating():
        rating = {
            "pluginId": "gpt-4-voice",
            "score": 5,
            "reviewerId": "dev-987",
            "comment": "Excellent latency and voice quality."
        }
        client.ratings_create(rating)
        print("Rating submitted!")
    
    submit_rating()

5️⃣ Generating a Go SDK

Go developers can produce a type‑safe client that integrates nicely with microservices.

  1. Install the generator (via Homebrew or Docker)

    # Homebrew
    brew install openapi-generator
    
    # Or Docker (no local install)
    docker pull openapitools/openapi-generator-cli
  2. Run the generation command

    openapi-generator-cli generate \
      -i openclaw-rating-api.json \
      -g go \
      -o ./openclaw-go-sdk \
      --additional-properties=packageName=openclaw
  3. Import and use the SDK

    package main
    
    import (
        "context"
        "log"
        openclaw "openclaw-go-sdk"
        "openclaw-go-sdk/client"
    )
    
    func main() {
        cfg := client.NewConfiguration()
        cfg.Host = "api.openclaw.ai/v1"
        cfg.AddDefaultHeader("Authorization", "Bearer YOUR_JWT_TOKEN")
    
        apiClient := client.NewAPIClient(cfg)
    
        rating := openclaw.Rating{
            PluginId:   "gpt-4-voice",
            Score:      5,
            ReviewerId: "dev-987",
            Comment:    "Fast, reliable, and easy to integrate.",
        }
    
        _, err := apiClient.RatingsApi.RatingsCreate(context.Background()).Rating(rating).Execute()
        if err != nil {
            log.Fatalf("Failed to submit rating: %v", err)
        }
        log.Println("Rating submitted successfully!")
    }
    

6️⃣ Practical Tips for Seamless Integration

  • Cache rating lookups: Store the /ratings/{pluginId} response for 5‑10 minutes to reduce API calls.
  • Validate scores client‑side: Enforce the 1‑5 range before sending to avoid 400 errors.
  • Use exponential backoff: Respect the 100 RPM limit; retry with jitter on 429 responses.
  • Secure the JWT: Rotate tokens every 24 hours via UBOS’s token‑refresh endpoint.
  • Monitor with UBOS analytics: Track request latency and error rates directly from the UBOS dashboard.

OpenClaw Plugin Rating API workflow diagram

7️⃣ Conclusion: Turn Ratings into Smarter AI Agents

The OpenClaw Plugin Rating API, paired with automatically generated SDKs, gives developers a frictionless path from specification to production. By embedding rating logic directly into your agents, you can:

  • Prioritize high‑performing plugins in real time.
  • Provide transparent feedback loops for continuous improvement.
  • Scale across languages (JS, Python, Go) without hand‑crafting HTTP clients.

Ready to supercharge your AI‑agent stack? Host your OpenClaw instance on UBOS today, generate the SDKs you need, and start collecting actionable plugin ratings tomorrow.

For the latest industry update on OpenClaw’s rating enhancements, see the original news article.


Andrii Bidochko

CTO UBOS

Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.