Skip to content

Latest commit

 

History

History
89 lines (69 loc) · 1.55 KB

API.md

File metadata and controls

89 lines (69 loc) · 1.55 KB

API

Overview

This API provides read-only access to a collection of models. It is open to the public and does not require an API key for access.

Response Format

  • All responses are in JSON format.

Rate Limiting

  • Limit: 10,000 requests per hour per IP address.
  • Exceeding this limit will result in temporary rate-limiting.
  • Rate-limited responses include the following structure:
{
  "error": {
    "code": 429,
    "message": "Rate limit exceeded. Try again later."
  }
}

Endpoints

GET /api/v1/models

Lists all models with pagination.

Query Parameters:

  • page (optional): The page number to retrieve (default: 1). Pages are 1-indexed.
  • limit (optional): The number of models per page (default: 100).

Example Request:

GET /api/v1/models?page=2&limit=50

Example Response:

{
  "pager": {
    "total_items": 235,
    "total_pages": 5,
    "current_page": 2
  },
  "models": [...]
}

GET /api/v1/model/{model}

Retrieves details of a specific model.

Path Parameters:

  • model: The ID of the model to retrieve. Model IDs can be found using the /api/v1/models endpoint.

Example Request:

GET /api/v1/model/1130

Example Response:

{
  "id": "1130",
  "framework": {
    "name": "Model Openness Framework",
    "version": "1.0",
    "date": "2024-12-15"
  },
  "release": {...},
  "classification": {
    "class": 1,
    "label": "Class I - Open Science",
    "progress": {
      "1": 100,
      "2": 100,
      "3": 100
    }
  }
}