> For the complete documentation index, see [llms.txt](https://onairos.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onairos.gitbook.io/docs/developer-guides/integrate-onairos-mobile/inference-api-response.md).

# Inference API Response

## Output Format

### Sentiment JSON

The API responds with a JSON object containing an `output` field. This field is an array of arrays, where each sub-array contains a single element representing the prediction score from the model. This score is a floating-point number reflecting the model's confidence for the input provided.

Example of the output format:

```json
{
  "output": [
    [[0.9998]],
    [[0.9999]],
    [[0.9922]],
    [[0.0013]],
    // Additional scores for more entries
  ]
}
```

Each score is deeply nested within two arrays to maintain compatibility with batch processing systems that may require this format.

#### Interpretation of Output

* A score close to `1` indicates a high confidence level in the prediction.
* A score close to `0` indicates a low confidence level in the prediction.
* The sequence of scores corresponds to the order of the input entries.

### Traits JSON

If the decides to send you their Personality Traits, there will be the following JSON present API responds with a JSON object. This is an object containing positive\_traits and traits\_to\_improve. The assicautated score is the level of each trait

Example of the output format:

```json
{
  "Traits": {
    "positive_traits": {
      "trait1": 9.7,
      "trait2": 9.6,
      "trait3": 9.1,
      "trait4": 8.8,
    ],
    "traits_to_improve": {
      "trait1": 1.7,
      "trait2": 3.6,
    ]
  ]
}
```

#### Interpretation of Output

* positive\_traits: Strong character defining Traits of the user. Levels 0-10 (1 dp)
* traits\_to\_improve:  Traits of the user which they are improving/need to improve. Levels 0-10 (1 dp)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://onairos.gitbook.io/docs/developer-guides/integrate-onairos-mobile/inference-api-response.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
