Skip to content
JAOT

Models

The Models endpoints let you browse the public model marketplace, activate models for your organization, create private models, and execute models with custom input data.

A ModelCatalog entry is a public marketplace model. An OrganizationModel is a model activated by your organization, which may be a catalog model or a privately created one.

GET /api/v2/models/catalog

Browse the public model marketplace. This endpoint is public and does not require authentication.

Query Parameters

ParameterTypeDefaultDescription
categorystring--Filter by category (e.g. "logistics", "finance", "combinatorial")
searchstring--Search in model name and description
pageinteger1Page number
page_sizeinteger20Items per page (max 100)

Response

FieldTypeDescription
itemsarrayList of catalog model objects
items[].idstringModel ID (e.g. "mdl_abc123")
items[].namestringMachine-readable model name
items[].display_namestringHuman-readable display name
items[].descriptionstringModel description
items[].categorystringModel category
items[].credits_per_executionnumberCredits consumed per execution
items[].tagsarraySearchable tags
items[].statusstringPublication status
items[].created_atstringISO 8601 timestamp
totalintegerTotal matching models
pageintegerCurrent page number
page_sizeintegerPage size

Examples

import httpx

API_URL = "https://api.jaot.io/api/v2"
headers = {"Authorization": "Bearer ok_live_your_key_here"}

# List all logistics models
response = httpx.get(
    f"{API_URL}/models/catalog",
    params={"category": "logistics", "page_size": 10},
    headers=headers,
)
data = response.json()
for model in data["items"]:
    print(f"{model['display_name']}: {model['description']}")
    print(f"  Cost: {model['credits_per_execution']} credits/run")

Response

{
  "items": [
    {
      "id": "mdl_wh7k9x2m",
      "name": "warehouse_allocation",
      "display_name": "Warehouse Allocation Optimizer",
      "description": "Optimize product allocation across warehouse locations to minimize picking time",
      "category": "logistics",
      "credits_per_execution": 3,
      "tags": ["warehouse", "allocation", "logistics"],
      "status": "published",
      "created_at": "2026-01-15T09:00:00Z"
    }
  ],
  "total": 12,
  "page": 1,
  "page_size": 10
}

POST /api/v2/models/catalog/{catalog_id}/activate

Activate a marketplace model for your organization. Once activated, you can execute it with custom input data.

Authentication: Requires API key or JWT token.

Path Parameters

ParameterTypeDescription
catalog_idstringThe catalog model ID to activate

Response

FieldTypeDescription
idstringOrganization model ID
catalog_idstringOriginal catalog model ID
organization_idstringYour organization ID
custom_namestringCustom name (null if not set)
is_activebooleanWhether the model is active
created_atstringISO 8601 timestamp

Examples

import httpx

response = httpx.post(
    "https://api.jaot.io/api/v2/models/catalog/mdl_wh7k9x2m/activate",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
org_model = response.json()
print(f"Activated as: {org_model['id']}")

Response

{
  "id": "exe_9a1b2c3d",
  "catalog_id": "mdl_wh7k9x2m",
  "organization_id": "org_b7e4d1a0",
  "custom_name": null,
  "is_active": true,
  "created_at": "2026-02-19T10:00:00Z"
}

GET /api/v2/models

List models activated by your organization.

Authentication: Requires API key or JWT token.

Query Parameters

ParameterTypeDefaultDescription
categorystring--Filter by category
searchstring--Search in name/description
is_activeboolean--Filter by active status
is_favoriteboolean--Filter by favorite status
pageinteger1Page number
page_sizeinteger20Items per page (max 100)

Response

FieldTypeDescription
itemsarrayList of organization model objects
totalintegerTotal matching models
pageintegerCurrent page number
page_sizeintegerPage size

Examples

import httpx

API_URL = "https://api.jaot.io/api/v2"
headers = {"Authorization": "Bearer ok_live_your_key_here"}

# List your activated models
response = httpx.get(
    f"{API_URL}/models",
    params={"is_active": True},
    headers=headers,
)
data = response.json()
for model in data["items"]:
    print(f"{model['name']} ({model['id']})")

GET /api/v2/models/{model_id}

Get details of a specific activated model.

Authentication: Requires API key or JWT token.

Path Parameters

ParameterTypeDescription
model_idstringThe organization model ID

Examples

import httpx

API_URL = "https://api.jaot.io/api/v2"
headers = {"Authorization": "Bearer ok_live_your_key_here"}

response = httpx.get(f"{API_URL}/models/exe_9a1b2c3d", headers=headers)
model = response.json()
print(f"Model: {model['display_name']}")
print(f"Category: {model['category']}")

GET /api/v2/models/{model_id}/schema

Get the input schema and example input for a model. Useful for building dynamic forms or validating input before execution.

Authentication: Requires API key or JWT token.

Response

FieldTypeDescription
idstringOrganization model ID
namestringModel display name
generator_typestringType of model generator
input_schemaobjectJSON schema for input validation
input_fieldsarrayField definitions for UI rendering
example_inputobjectExample input data
custom_configobjectCustom configuration (null if not set)

Examples

import httpx

response = httpx.get(
    "https://api.jaot.io/api/v2/models/exe_9a1b2c3d/schema",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
schema = response.json()
print(f"Model: {schema['name']}")
print(f"Fields: {[f['name'] for f in schema['input_fields']]}")

Response

{
  "id": "exe_9a1b2c3d",
  "name": "Warehouse Allocation Optimizer",
  "generator_type": "template",
  "input_schema": {},
  "input_fields": [
    {"name": "warehouses", "label": "Warehouses", "type": "array", "required": true},
    {"name": "products", "label": "Products", "type": "array", "required": true}
  ],
  "example_input": {
    "warehouses": [{"name": "East", "capacity": 500}, {"name": "West", "capacity": 300}],
    "products": [{"name": "Widget A", "demand": 200}]
  },
  "custom_config": null
}

POST /api/v2/models

Create a private model for your organization (not from the marketplace).

Authentication: Requires API key or JWT token.

Request Body

FieldTypeRequiredDescription
namestringYesMachine-readable model name
descriptionstringNoModel description
categorystringNoModel category
generator_typestringYesGenerator type (e.g. "template")
input_schemaobjectNoJSON schema for input validation
input_fieldsarrayNoField definitions for UI
example_inputobjectNoExample input data
tagsarrayNoSearchable tags

Examples

import httpx

response = httpx.post(
    "https://api.jaot.io/api/v2/models",
    headers={
        "Authorization": "Bearer ok_live_your_key_here",
        "Content-Type": "application/json",
    },
    json={
        "name": "supply_chain_optimizer",
        "description": "Internal supply chain routing optimizer",
        "category": "supply_chain",
        "generator_type": "template",
        "tags": ["internal", "supply-chain"],
    },
)
model = response.json()
print(f"Created: {model['id']}")

PATCH /api/v2/models/{model_id}

Update a model's custom settings.

Authentication: Requires API key or JWT token.

Request Body

All fields are optional.

FieldTypeDescription
custom_namestringCustom display name
custom_configobjectCustom configuration overrides
is_activebooleanActive status
is_favoritebooleanFavorite status

Examples

import httpx

response = httpx.patch(
    "https://api.jaot.io/api/v2/models/exe_9a1b2c3d",
    headers={
        "Authorization": "Bearer ok_live_your_key_here",
        "Content-Type": "application/json",
    },
    json={"custom_name": "My Warehouse Optimizer", "is_favorite": True},
)
print(response.json())

Response

{"status": "updated"}

DELETE /api/v2/models/{model_id}

Deactivate a model (soft delete). The model can be reactivated later.

Authentication: Requires API key or JWT token.

Examples

import httpx

response = httpx.delete(
    "https://api.jaot.io/api/v2/models/exe_9a1b2c3d",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
print(response.json())

Response

{"status": "deactivated"}

POST /api/v2/models/{model_id}/execute

Execute an activated model with input data. Returns the optimization result.

Authentication: Requires API key or JWT token.

Request Body

FieldTypeRequiredDescription
input_dataobjectYesInput data matching the model's schema

Response

Same as POST /api/v2/solve -- returns the full optimization result.

Examples

import httpx

API_URL = "https://api.jaot.io/api/v2"
headers = {
    "Authorization": "Bearer ok_live_your_key_here",
    "Content-Type": "application/json",
}

response = httpx.post(
    f"{API_URL}/models/exe_9a1b2c3d/execute",
    headers=headers,
    json={
        "input_data": {
            "warehouses": [
                {"name": "East Hub", "capacity": 500, "cost_per_unit": 2.50},
                {"name": "West Hub", "capacity": 300, "cost_per_unit": 3.00},
            ],
            "products": [
                {"name": "Widget A", "demand": 200, "weight": 1.5},
                {"name": "Widget B", "demand": 150, "weight": 2.0},
            ],
        }
    },
)

result = response.json()
print(f"Status: {result['status']}")
print(f"Optimal cost: ${result['objective_value']:.2f}")

Errors

HTTP CodeErrorDescription
400bad_requestInvalid input data for this model
401unauthorizedMissing or invalid API key
402insufficient_creditsNot enough credits
404not_foundModel not found or not activated