globalMOO Documentation
  • globalMOO API Documentation
  • core
    • Authentication
    • Core Concepts
    • Getting Started with globalMOO
    • Error Handling
    • Event Handling
    • SDK Initialization
    • Debugging & Logging
  • schemas
    • Account Schema
    • Model Schema
    • Project Schema
    • Trial Schema
    • Objective Schema
    • Result Schema
    • Inverse Schema
  • quickstart
    • Your First Optimization with globalMOO
  • endpoints
    • accounts
      • Account Endpoints
      • Register Account
    • inverse
      • Inverse Optimization Endpoints
      • Initialize Inverse Optimization
      • Load Inverse Output
      • Suggest Inverse Step
    • models
      • Create Model
      • Model Endpoints
      • List Models
    • objectives
      • Objective Endpoints
      • Load Objectives
    • outputs
      • Output Endpoints
      • Load Output Cases
      • Load Developed Outputs
    • projects
      • Create Project
      • Project Endpoints
    • trials
      • Trial Endpoints
      • Read Trial
Powered by GitBook
On this page
  • Endpoint
  • Request Parameters
  • Request Format
  • Response Format
  • Examples
  • Response Example
  • Error Responses
  • Notes
  1. endpoints
  2. models

Create Model

Creates a new optimization model in globalMOO.

Endpoint

POST /models

Request Parameters

Parameter
Type
Required
Description

name

string

Yes

Name of the model (4-96 characters)

description

string

No

Optional description of the model (≥8 characters)

Request Format

{
    "name": "string",
    "description": "string"
}

Response Format

{
    "id": "string",
    "name": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string"
}

Examples

from globalmoo import Client

client = Client(api_key="your-api-key")
model = client.create_model(
    name="Optimization Model A",
    description="A model for optimizing process parameters"
)
const { Client } = require('globalmoo');

const client = new Client('your-api-key');
const model = await client.createModel({
    name: "Optimization Model A",
    description: "A model for optimizing process parameters"
});
$client = new Client("your-api-key");

$model = $client->createModel([
    "name" => "Optimization Model A",
    "description" => "A model for optimizing process parameters"
]);

Response Example

{
    "id": 123,
    "name": "Optimization Model A",
    "description": "A model for optimizing process parameters",
    "created_at": "2025-01-31T10:00:00Z",
    "updated_at": "2025-01-31T10:00:00Z"
}

Error Responses

Status Code
Description

400

Invalid request - Missing required fields or invalid format

401

Unauthorized - Invalid API key

429

Too many requests - Rate limit exceeded

500

Internal server error

Notes

  • Model names must be unique within your account

  • Description, if provided, must be at least 8 characters

  • Model IDs are automatically generated and returned in the response

PreviousmodelsNextModel Endpoints

Last updated 3 months ago