> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-pt-br/sdks/backend-sdk/selphid/technical_documentation/api_reference/management/api-v1-selphid-metrics-prometheus.md).

# /api/v1/selphid/metrics/prometheus

Returns the same snapshot as `GET /api/v1/selphid/metrics` as Prometheus text exposition (version 0.0.4). It never requires a JWT.

The series of the blocks owned by the service come first, with the `facephi_selphid_` prefix:

| Series                                                                                                                                                                                | Type    | Content                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `facephi_selphid_service_info{name,version,path_base,schema_version}`                                                                                                                 | gauge   | `service` block, always `1`                                                                                                                                 |
| `facephi_selphid_configured_threads`, `facephi_selphid_uptime_seconds`                                                                                                                | gauge   | `service.configuredThreads` and `service.uptimeSeconds`                                                                                                     |
| `facephi_selphid_snapshot_timestamp_seconds`                                                                                                                                          | gauge   | `timestamp`                                                                                                                                                 |
| `facephi_selphid_initialized`                                                                                                                                                         | gauge   | `state.initialized`                                                                                                                                         |
| `facephi_selphid_sdk_alive`, `facephi_selphid_sdk_last_health_known`, `facephi_selphid_sdk_last_health_check_timestamp_seconds`                                                       | gauge   | `state.sdk` block                                                                                                                                           |
| `facephi_selphid_state_classification{classification}`                                                                                                                                | gauge   | `1` for the current `state.classification`, `0` for the other values                                                                                        |
| `facephi_selphid_usage_counters_enabled`                                                                                                                                              | gauge   | `usage.enabled`                                                                                                                                             |
| `facephi_selphid_usage_operations_total{operation}`, `facephi_selphid_usage_total`                                                                                                    | counter | `usage` block; `operation` is `<METHOD> <path>`                                                                                                             |
| `facephi_selphid_authentication_samples_total`, `facephi_selphid_authentication_results_total{result}`                                                                                | counter | `quality.facialAuthentication`; `result` is `positive` or `negative`                                                                                        |
| `facephi_selphid_extraction_results_total{result}`                                                                                                                                    | counter | `quality.extraction`; `result` is `ok` or `error`                                                                                                           |
| `facephi_selphid_extraction_facial_quality_total{quality}`                                                                                                                            | counter | `quality.extraction.facialQualityCounts`                                                                                                                    |
| `facephi_selphid_liveness_diagnostics_total{diagnostic}`                                                                                                                              | counter | `quality.liveness.diagnosticCounts`                                                                                                                         |
| `facephi_selphid_liveness_fpad_status_total{status}`, `facephi_selphid_liveness_fmad_status_total{status}`                                                                            | counter | `quality.liveness.noLiveDetails` status counts                                                                                                              |
| `facephi_selphid_tracking_status_total{status}`                                                                                                                                       | counter | `quality.tracking.statusCounts`                                                                                                                             |
| `facephi_selphid_quality_score_samples`, `facephi_selphid_quality_score_avg`, `facephi_selphid_quality_score_min`, `facephi_selphid_quality_score_max` (labels `operation`, `metric`) | gauge   | Quality summaries: `similarity` of `facialAuthentication`, `faceConfidence` of `extraction`, and `fPadScore`, `fMadScore` and `coercionScore` of `liveness` |
| `facephi_selphid_low_quality_samples`, `facephi_selphid_low_quality_since_timestamp_seconds`                                                                                          | gauge   | `quality.summary` block                                                                                                                                     |
| `facephi_selphid_alert_active{code,severity}`, `facephi_selphid_alert_since_timestamp_seconds{code,severity}`                                                                         | gauge   | `alerts` block: `1` for active alerts, `0` for the rest                                                                                                     |

They are followed by the HTTP level series (`traffic`, `saturation`, `latency` and the per-endpoint breakdown) with the `facephi_` prefix, for example `facephi_requests_total`, `facephi_window_error_rate{window}` or `facephi_total_latency_ms{window,stat}`.

The classification and alert series always publish every possible value, and the sample counts are published with `0` before the first operation, so they never appear or disappear between scrapes. The series of a value count (`quality`, `diagnostic`, `status`) appear once that value was observed, and the `facephi_selphid_quality_score_*` series of a summary once the JSON snapshot includes it. Instants are published as epoch seconds and are `0` while the snapshot has not recorded them. Free-form text (`state.sdk.lastError` and `alerts[].message`) is only published in the JSON response.

```json
{"openapi":"3.0.0","info":{"title":"SelphID-SDK Rest API","version":"6.22.0"},"security":[],"paths":{"/api/v1/selphid/metrics/prometheus":{"get":{"description":"Returns the same snapshot as `GET /api/v1/selphid/metrics` as Prometheus text exposition (version 0.0.4). It\nnever requires a JWT.\n\nThe series of the blocks owned by the service come first, with the `facephi_selphid_` prefix:\n\n| Series | Type | Content |\n|---|---|---|\n| `facephi_selphid_service_info{name,version,path_base,schema_version}` | gauge | `service` block, always `1` |\n| `facephi_selphid_configured_threads`, `facephi_selphid_uptime_seconds` | gauge | `service.configuredThreads` and `service.uptimeSeconds` |\n| `facephi_selphid_snapshot_timestamp_seconds` | gauge | `timestamp` |\n| `facephi_selphid_initialized` | gauge | `state.initialized` |\n| `facephi_selphid_sdk_alive`, `facephi_selphid_sdk_last_health_known`, `facephi_selphid_sdk_last_health_check_timestamp_seconds` | gauge | `state.sdk` block |\n| `facephi_selphid_state_classification{classification}` | gauge | `1` for the current `state.classification`, `0` for the other values |\n| `facephi_selphid_usage_counters_enabled` | gauge | `usage.enabled` |\n| `facephi_selphid_usage_operations_total{operation}`, `facephi_selphid_usage_total` | counter | `usage` block; `operation` is `<METHOD> <path>` |\n| `facephi_selphid_authentication_samples_total`, `facephi_selphid_authentication_results_total{result}` | counter | `quality.facialAuthentication`; `result` is `positive` or `negative` |\n| `facephi_selphid_extraction_results_total{result}` | counter | `quality.extraction`; `result` is `ok` or `error` |\n| `facephi_selphid_extraction_facial_quality_total{quality}` | counter | `quality.extraction.facialQualityCounts` |\n| `facephi_selphid_liveness_diagnostics_total{diagnostic}` | counter | `quality.liveness.diagnosticCounts` |\n| `facephi_selphid_liveness_fpad_status_total{status}`, `facephi_selphid_liveness_fmad_status_total{status}` | counter | `quality.liveness.noLiveDetails` status counts |\n| `facephi_selphid_tracking_status_total{status}` | counter | `quality.tracking.statusCounts` |\n| `facephi_selphid_quality_score_samples`, `facephi_selphid_quality_score_avg`, `facephi_selphid_quality_score_min`, `facephi_selphid_quality_score_max` (labels `operation`, `metric`) | gauge | Quality summaries: `similarity` of `facialAuthentication`, `faceConfidence` of `extraction`, and `fPadScore`, `fMadScore` and `coercionScore` of `liveness` |\n| `facephi_selphid_low_quality_samples`, `facephi_selphid_low_quality_since_timestamp_seconds` | gauge | `quality.summary` block |\n| `facephi_selphid_alert_active{code,severity}`, `facephi_selphid_alert_since_timestamp_seconds{code,severity}` | gauge | `alerts` block: `1` for active alerts, `0` for the rest |\n\nThey are followed by the HTTP level series (`traffic`, `saturation`, `latency` and the per-endpoint breakdown)\nwith the `facephi_` prefix, for example `facephi_requests_total`, `facephi_window_error_rate{window}` or\n`facephi_total_latency_ms{window,stat}`.\n\nThe classification and alert series always publish every possible value, and the sample counts are published\nwith `0` before the first operation, so they never appear or disappear between scrapes. The series of a value\ncount (`quality`, `diagnostic`, `status`) appear once that value was observed, and the\n`facephi_selphid_quality_score_*` series of a summary once the JSON snapshot includes it. Instants are\npublished as epoch seconds and are `0` while the snapshot has not recorded them. Free-form text\n(`state.sdk.lastError` and `alerts[].message`) is only published in the JSON response.\n","tags":["Management"],"responses":{"200":{"description":"Prometheus text exposition.","content":{"text/plain; version=0.0.4; charset=utf-8":{"schema":{"type":"string"}}}}}}}}}
```
