{
  "openapi": "3.0.3",
  "info": {
    "title": "NOSIBLE Models V1.2 API",
    "version": "1.2",
    "description": "Public Models V1.2 API contract. Examples illustrate responses and do not require optional fields to be present. Existing API URLs remain supported."
  },
  "servers": [
    {
      "url": "https://nosible.world"
    }
  ],
  "externalDocs": {
    "url": "https://docs.nosible.com/"
  },
  "paths": {
    "/api/models/ontology": {
      "post": {
        "operationId": "model_ontology",
        "summary": "Ontology Classifier",
        "description": "Classify text against NOSIBLE's live semantic ontologies.\n\nUse Ontology Classifier when you need live taxonomy predictions for text that is not yet in the World archive. The endpoint accepts the same text-only request and response shape as the other model endpoints.",
        "tags": [
          "CLASSIFIERS"
        ],
        "externalDocs": {
          "description": "Interactive reference",
          "url": "https://docs.nosible.com/endpoints/model-ontology"
        },
        "x-nosible-reference-pages": [
          "model-ontology"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string",
                      "description": "Stable classifier response schema shared by the text model endpoints."
                    },
                    "model": {
                      "type": "string",
                      "description": "Pinned classifier name, version, and immutable build identifier."
                    },
                    "text": {
                      "type": "string",
                      "description": "The exact input text classified by the model."
                    },
                    "predictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "ontology": {
                            "type": "string",
                            "description": "Ontology that produced the prediction."
                          },
                          "label": {
                            "type": "string",
                            "description": "Predicted class label."
                          },
                          "score": {
                            "type": "number",
                            "description": "Model confidence score when supplied by the classifier."
                          }
                        }
                      },
                      "description": "Flat list of predictions, ordered by descending score where scores are available."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "schema": "nosible_model_classification_v1",
                  "model": "NOSIBLE/ontology-classifier-v2.0-preview@sha256:49b2ce9a6743b6b98f1428a392198f03e2b7a0dac3cac5fa3f0014b2149bfd54",
                  "text": "The company announced a new data centre investment.",
                  "predictions": [
                    {
                      "ontology": "gics",
                      "label": "Information Technology",
                      "score": 0.94
                    },
                    {
                      "ontology": "nosible",
                      "label": "Corporate Actions",
                      "score": 0.88
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.",
            "x-nosible-error-codes": [
              "invalid_request"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: The required API key or Bearer credential is missing or invalid.",
            "x-nosible-error-codes": [
              "unauthorized"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "validation_error: The request shape is understood but one or more values fail validation.",
            "x-nosible-error-codes": [
              "validation_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.",
            "x-nosible-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "upstream_error: An upstream retrieval service failed while processing the request.",
            "x-nosible-error-codes": [
              "upstream_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "504": {
            "description": "upstream_timeout: An upstream retrieval service did not respond within the request timeout.",
            "x-nosible-error-codes": [
              "upstream_timeout"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to classify. Maximum 50,000 characters.",
                    "example": "The company announced a new data centre investment."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "text"
                ]
              },
              "examples": {
                "model_ontology": {
                  "summary": "Ontology Classifier",
                  "value": {
                    "text": "The company announced a new data centre investment."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/models/ner": {
      "post": {
        "operationId": "model_ner",
        "summary": "Named Entity Recognition",
        "description": "Extract PERSON, ORG, GPE, LOC, and PRODUCT entities from English text.\n\nUse Named Entity Recognition to extract the fixed GLiNER label set from English text before resolving entities or constructing World filters. This fine-tune is trained for English. Entity offsets are half-open character spans: start is inclusive and end is exclusive. Keep the original text unchanged when using the offsets.",
        "tags": [
          "NAMED ENTITIES"
        ],
        "externalDocs": {
          "description": "Interactive reference",
          "url": "https://docs.nosible.com/endpoints/model-ner"
        },
        "x-nosible-reference-pages": [
          "model-ner"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string",
                      "description": "Stable classifier response schema shared by the text model endpoints."
                    },
                    "model": {
                      "type": "string",
                      "description": "Pinned classifier name, version, and immutable build identifier."
                    },
                    "text": {
                      "type": "string",
                      "description": "The exact input text classified by the model."
                    },
                    "predictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "One of PERSON, ORG, GPE, LOC, or PRODUCT."
                          },
                          "score": {
                            "type": "number",
                            "description": "Model confidence score."
                          },
                          "text": {
                            "type": "string",
                            "description": "The entity surface text."
                          }
                        }
                      },
                      "description": "Entities detected in the text, using PERSON, ORG, GPE, LOC, or PRODUCT labels."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "schema": "nosible_model_classification_v1",
                  "model": "NOSIBLE/gliner-ner-v1@revision:d306c21d9c56b6688a5353e091ddb04d37b2b3f9",
                  "text": "NVIDIA opened a new office in Johannesburg.",
                  "predictions": [
                    {
                      "label": "ORG",
                      "score": 0.99,
                      "text": "NVIDIA",
                      "start": 0,
                      "end": 6
                    },
                    {
                      "label": "GPE",
                      "score": 0.97,
                      "text": "Johannesburg",
                      "start": 30,
                      "end": 41
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.",
            "x-nosible-error-codes": [
              "invalid_request"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: The required API key or Bearer credential is missing or invalid.",
            "x-nosible-error-codes": [
              "unauthorized"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "validation_error: The request shape is understood but one or more values fail validation.",
            "x-nosible-error-codes": [
              "validation_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.",
            "x-nosible-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "upstream_error: An upstream retrieval service failed while processing the request.",
            "x-nosible-error-codes": [
              "upstream_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "504": {
            "description": "upstream_timeout: An upstream retrieval service did not respond within the request timeout.",
            "x-nosible-error-codes": [
              "upstream_timeout"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "English text to analyse. Maximum 8,000 characters.",
                    "example": "NVIDIA opened a new office in Johannesburg."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "text"
                ]
              },
              "examples": {
                "model_ner": {
                  "summary": "Named Entity Recognition",
                  "value": {
                    "text": "NVIDIA opened a new office in Johannesburg."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/models/ner/batch": {
      "post": {
        "operationId": "model_ner_batch",
        "summary": "Named Entity Recognition (batch)",
        "description": "Extract entities from up to 64 English texts in one request.\n\nUse Named Entity Recognition (batch) when you have multiple English texts to classify. This fine-tune is trained for English. Each item in results uses the same text and predictions shape as the single-text NER response, in the same order as the request.",
        "tags": [
          "NAMED ENTITIES"
        ],
        "externalDocs": {
          "description": "Interactive reference",
          "url": "https://docs.nosible.com/endpoints/model-ner-batch"
        },
        "x-nosible-reference-pages": [
          "model-ner-batch"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string",
                      "description": "Stable classifier response schema shared by the NER endpoints."
                    },
                    "model": {
                      "type": "string",
                      "description": "Pinned classifier name, version, and immutable build identifier."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "The exact input text classified for this result."
                          },
                          "predictions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "One of PERSON, ORG, GPE, LOC, or PRODUCT."
                                },
                                "score": {
                                  "type": "number",
                                  "description": "Model confidence score."
                                },
                                "text": {
                                  "type": "string",
                                  "description": "The entity surface text."
                                }
                              }
                            },
                            "description": "Entities detected in this text, using PERSON, ORG, GPE, LOC, or PRODUCT labels."
                          }
                        }
                      },
                      "description": "One NER result per input text, in input order."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "schema": "nosible_model_classification_v1",
                  "model": "NOSIBLE/gliner-ner-v1@revision:d306c21d9c56b6688a5353e091ddb04d37b2b3f9",
                  "results": [
                    {
                      "text": "NVIDIA opened a new office in Johannesburg.",
                      "predictions": [
                        {
                          "label": "ORG",
                          "score": 0.99,
                          "text": "NVIDIA",
                          "start": 0,
                          "end": 6
                        }
                      ]
                    },
                    {
                      "text": "SAP expanded in Berlin.",
                      "predictions": [
                        {
                          "label": "ORG",
                          "score": 0.98,
                          "text": "SAP",
                          "start": 0,
                          "end": 3
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.",
            "x-nosible-error-codes": [
              "invalid_request"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: The required API key or Bearer credential is missing or invalid.",
            "x-nosible-error-codes": [
              "unauthorized"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "validation_error: The request shape is understood but one or more values fail validation.",
            "x-nosible-error-codes": [
              "validation_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.",
            "x-nosible-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "upstream_error: An upstream retrieval service failed while processing the request.",
            "x-nosible-error-codes": [
              "upstream_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "504": {
            "description": "upstream_timeout: An upstream retrieval service did not respond within the request timeout.",
            "x-nosible-error-codes": [
              "upstream_timeout"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "texts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Between 1 and 64 English texts, each at most 8,000 characters.",
                    "example": [
                      "NVIDIA opened a new office in Johannesburg.",
                      "SAP expanded in Berlin."
                    ],
                    "minItems": 1,
                    "maxItems": 64
                  }
                },
                "additionalProperties": true,
                "required": [
                  "texts"
                ]
              },
              "examples": {
                "model_ner_batch": {
                  "summary": "Named Entity Recognition (batch)",
                  "value": {
                    "texts": [
                      "NVIDIA opened a new office in Johannesburg.",
                      "SAP expanded in Berlin."
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/models/sentiment": {
      "post": {
        "operationId": "model_sentiment",
        "summary": "Financial Sentiment",
        "description": "Classify the financial sentiment of text.\n\nUse Financial Sentiment for a model-backed financial tone classification. The endpoint accepts the same text-only request and response shape as the other model endpoints.",
        "tags": [
          "CLASSIFIERS"
        ],
        "externalDocs": {
          "description": "Interactive reference",
          "url": "https://docs.nosible.com/endpoints/model-sentiment"
        },
        "x-nosible-reference-pages": [
          "model-sentiment"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string",
                      "description": "Stable classifier response schema shared by the text model endpoints."
                    },
                    "model": {
                      "type": "string",
                      "description": "Pinned classifier name, version, and immutable build identifier."
                    },
                    "text": {
                      "type": "string",
                      "description": "The exact input text classified by the model."
                    },
                    "predictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "One of positive, neutral, or negative."
                          },
                          "score": {
                            "type": "number",
                            "description": "Model confidence score when supplied by the classifier."
                          }
                        }
                      },
                      "description": "The classifier output as a one-item prediction list."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "schema": "nosible_model_classification_v1",
                  "model": "NOSIBLE/financial-sentiment-v1.2-base@revision:acc796e59f4b568fe73e127de81c10a982b88845",
                  "text": "Revenue growth accelerated this quarter.",
                  "predictions": [
                    {
                      "label": "positive",
                      "score": 0.9
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.",
            "x-nosible-error-codes": [
              "invalid_request"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: The required API key or Bearer credential is missing or invalid.",
            "x-nosible-error-codes": [
              "unauthorized"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "validation_error: The request shape is understood but one or more values fail validation.",
            "x-nosible-error-codes": [
              "validation_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.",
            "x-nosible-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "upstream_error: An upstream retrieval service failed while processing the request.",
            "x-nosible-error-codes": [
              "upstream_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "504": {
            "description": "upstream_timeout: An upstream retrieval service did not respond within the request timeout.",
            "x-nosible-error-codes": [
              "upstream_timeout"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Financial text to classify. Maximum 50,000 characters.",
                    "example": "Revenue growth accelerated this quarter."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "text"
                ]
              },
              "examples": {
                "model_sentiment": {
                  "summary": "Financial Sentiment",
                  "value": {
                    "text": "Revenue growth accelerated this quarter."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/models/forward-looking": {
      "post": {
        "operationId": "model_forward_looking",
        "summary": "Forward Looking",
        "description": "Classify whether text is forward-looking.\n\nUse Forward Looking to identify forward-looking language in financial and business text. The endpoint accepts the same text-only request and response shape as the other model endpoints.",
        "tags": [
          "CLASSIFIERS"
        ],
        "externalDocs": {
          "description": "Interactive reference",
          "url": "https://docs.nosible.com/endpoints/model-forward-looking"
        },
        "x-nosible-reference-pages": [
          "model-forward-looking"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string",
                      "description": "Stable classifier response schema shared by the text model endpoints."
                    },
                    "model": {
                      "type": "string",
                      "description": "Pinned classifier name, version, and immutable build identifier."
                    },
                    "text": {
                      "type": "string",
                      "description": "The exact input text classified by the model."
                    },
                    "predictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The forward-looking classification label."
                          },
                          "score": {
                            "type": "number",
                            "description": "Model confidence score when supplied by the classifier."
                          }
                        }
                      },
                      "description": "The classifier output as a one-item prediction list."
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "schema": "nosible_model_classification_v1",
                  "model": "NOSIBLE/forward-looking-v1.2-base@revision:7fa6b656210d6497989ebb145c2943325665c830",
                  "text": "The company expects to open three factories next year.",
                  "predictions": [
                    {
                      "label": "forward",
                      "score": 0.91
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.",
            "x-nosible-error-codes": [
              "invalid_request"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: The required API key or Bearer credential is missing or invalid.",
            "x-nosible-error-codes": [
              "unauthorized"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "validation_error: The request shape is understood but one or more values fail validation.",
            "x-nosible-error-codes": [
              "validation_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.",
            "x-nosible-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "upstream_error: An upstream retrieval service failed while processing the request.",
            "x-nosible-error-codes": [
              "upstream_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "504": {
            "description": "upstream_timeout: An upstream retrieval service did not respond within the request timeout.",
            "x-nosible-error-codes": [
              "upstream_timeout"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to classify. Maximum 50,000 characters.",
                    "example": "The company expects to open three factories next year."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "text"
                ]
              },
              "examples": {
                "model_forward_looking": {
                  "summary": "Forward Looking",
                  "value": {
                    "text": "The company expects to open three factories next year."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key"
      }
    },
    "schemas": {}
  }
}
