> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.thymia.ai/api-reference/thymia-api/apollo/llms.txt.
> For full documentation content, see https://docs.thymia.ai/api-reference/thymia-api/apollo/llms-full.txt.

# Get Apollo model run status & results

GET /v1/models/apollo/{model_run_id}

Retrieve the details of an existing Apollo model run, including results if they are available.

Reference: https://docs.thymia.ai/api-reference/thymia-api/apollo/get-apollo-model-run-v-1-models-apollo-model-run-id-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Thymia API
  version: 1.0.0
paths:
  /v1/models/apollo/{model_run_id}:
    get:
      operationId: get-apollo-model-run-v-1-models-apollo-model-run-id-get
      summary: Get Apollo model run status & results
      description: >-
        Retrieve the details of an existing Apollo model run, including results
        if they are available.
      tags:
        - subpackage_apollo
      parameters:
        - name: model_run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: x-api-key
          in: header
          description: Your API Activation Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Details of model run's current state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApolloModelRunResponse'
        '404':
          description: Model run not found
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ModelRunStatus:
      type: string
      enum:
        - CREATED
        - RUNNING
        - COMPLETE_OK
        - COMPLETE_ERROR
      description: An enumeration.
      title: ModelRunStatus
    ApolloModelRunResponseResults:
      type: object
      properties: {}
      description: >-
        Model results containing mental health indicators. Only populated if the
        model run ended with `COMPLETE_OK` status.


        Results include:

        - **disorders**: Depression and anxiety assessments with probability
        (0-1) and severity (0-1) scores

        - **symptoms**: Detailed symptom breakdowns for each disorder,
        including:
          - Depression symptoms: anhedonia, low mood, sleep issues, low energy, appetite issues, worthlessness, concentration issues, psychomotor issues
          - Anxiety symptoms: nervousness, uncontrollable worry, excessive worry, trouble relaxing, restlessness, irritability, dread
          - Each symptom includes severity (0-1) and distribution across none/mild/moderate/severe categories
      title: ApolloModelRunResponseResults
    ApolloReport:
      type: object
      properties:
        viewUrl:
          type: string
          description: URL to view the Apollo report
        pdfUrl:
          type: string
          description: URL to download the Apollo report as PDF
        accessExpiresAt:
          type: string
          description: ISO 8601 formatted timestamp when the report URLs will expire
      required:
        - viewUrl
        - pdfUrl
        - accessExpiresAt
      title: ApolloReport
    ApolloErrorCode:
      type: string
      enum:
        - ERR_RECORDING_INVALID_FORMAT
        - ERR_RECORDING_TOO_SHORT
        - ERR_RECORDING_TOO_LONG
        - ERR_TRANSCRIPTION_FAILED
        - ERR_INTERNAL
      description: An enumeration.
      title: ApolloErrorCode
    ApolloModelRunResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The id of the existing model run
        createdAt:
          type: string
          format: date-time
          description: When the model run was submitted to the API
        status:
          $ref: '#/components/schemas/ModelRunStatus'
          description: |-
            Current status of the model run. Possible values:
             * `CREATED`: Model run created; Waiting for files to be uploaded or thymia activities to be completed
             * `RUNNING`: All input to model has been supplied and the model is being executed
             * `COMPLETE_OK`: Model execution completed ok and results are available
             * `COMPLETE_ERROR`: Model execution completed with error and no results available
                
        runAt:
          type: string
          format: date-time
          description: >-
            The time the model run started executing and the status changed to
            `RUNNING`. This is after all input to the model has been supplied
        completedAt:
          type: string
          format: date-time
          description: >-
            When the model run finished processing and either results or an
            error reason are available; only populated once the model run
            completes
        errorReason:
          type: string
          description: Only populated if the model run ended with `COMPLETE_ERROR` status
        warnings:
          type: array
          items:
            type: string
          description: >-
            Contain warnings about potential issues that occurred during the
            model run.
        userLabel:
          type: string
          description: Label of the user that this model run was submitted for
        results:
          $ref: '#/components/schemas/ApolloModelRunResponseResults'
          description: >-
            Model results containing mental health indicators. Only populated if
            the model run ended with `COMPLETE_OK` status.


            Results include:

            - **disorders**: Depression and anxiety assessments with probability
            (0-1) and severity (0-1) scores

            - **symptoms**: Detailed symptom breakdowns for each disorder,
            including:
              - Depression symptoms: anhedonia, low mood, sleep issues, low energy, appetite issues, worthlessness, concentration issues, psychomotor issues
              - Anxiety symptoms: nervousness, uncontrollable worry, excessive worry, trouble relaxing, restlessness, irritability, dread
              - Each symptom includes severity (0-1) and distribution across none/mild/moderate/severe categories
        report:
          $ref: '#/components/schemas/ApolloReport'
          description: >-
            URLs to access the Apollo report. Only populated if the model run
            ended with `COMPLETE_OK` status
        errorCode:
          $ref: '#/components/schemas/ApolloErrorCode'
          description: >-
            Only populated if the model run ended with `COMPLETE_ERROR` status.
            Meaning of each error code:

            * `ERR_RECORDING_INVALID_FORMAT` - One or more recordings supplied
            are in an unsupported format.

            * `ERR_RECORDING_TOO_SHORT` - One or more recordings supplied
            contained less than the minimum required amount of speech.

            * `ERR_RECORDING_TOO_LONG` - One or more recordings supplied
            exceeded the maximum allowed length.

            * `ERR_TRANSCRIPTION_FAILED` - Couldn't determine speech in one or
            more recordings supplied.

            * `ERR_INTERNAL` - An internal error occurred.
        deleteData:
          type: boolean
          description: >-
            Boolean flag indicating if user data is to be deleted after the
            completion of the model run.
        model:
          type: string
          description: The version of model used in the model run.
      required:
        - id
        - createdAt
        - status
        - userLabel
        - deleteData
      title: ApolloModelRunResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Your API Activation Key

```

## SDK Code Examples

```python
import requests

url = "https://api.example.com/v1/models/apollo/model_run_id"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/models/apollo/model_run_id';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/models/apollo/model_run_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/models/apollo/model_run_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/v1/models/apollo/model_run_id")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/models/apollo/model_run_id', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/models/apollo/model_run_id");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/models/apollo/model_run_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```