openapi: 3.1.0 info: title: Opik REST Projects API description: "The Opik REST API is currently in beta and subject to change. If you have any questions or feedback about the APIs, please reach out on GitHub: https://github.com/comet-ml/opik.\n\nAll of the methods listed in this documentation are used by either the SDK or the UI to interact with the Opik server. As a result,\nthe methods have been optimized for these use-cases in mind. If you are looking for a method that is not listed above, please create\nand issue on GitHub or raise a PR!\n\nOpik includes two main deployment options that results in slightly different API usage:\n\n- **Self-hosted Opik instance:** You will simply need to specify the URL as `http://localhost:5173/api/` or similar. This is the default option for the docs.\n- **Opik Cloud:** You will need to specify the Opik API Key and Opik Workspace in the header. The format of the header should be:\n\n ```\n {\n \"Comet-Workspace\": \"your-workspace-name\",\n \"authorization\": \"your-api-key\"\n }\n ```\n\n The full payload would therefore look like:\n \n ```\n curl -X GET 'https://www.comet.com/opik/api/v1/private/projects' \\\n -H 'Accept: application/json' \\\n -H 'Comet-Workspace: ' \\\n -H 'authorization: '\n ```\n\n Do take note here that the authorization header value does not include the `Bearer ` prefix. To switch to using the Opik Cloud in the documentation, you can\n click on the edit button displayed when hovering over the `Base URL` displayed on the right hand side of the docs.\n" contact: name: Github Repository url: https://github.com/comet-ml/opik license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 1.0.0 servers: - url: http://localhost:5173/api description: Local server - url: https://www.comet.com/opik/api description: Opik Cloud tags: - name: Projects description: Project related resources paths: /v1/private/projects/{projectId}/alerts: get: tags: - Projects summary: Find alerts by project description: Find alerts scoped to a project operationId: findAlertsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: sorting in: query schema: type: string - name: filters in: query schema: type: string responses: '200': description: Alerts page content: application/json: schema: $ref: '#/components/schemas/AlertPage_Public' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' /v1/private/projects/{projectId}/dashboards: get: tags: - Projects summary: Find dashboards by project description: Find dashboards scoped to a project operationId: findDashboardsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: name in: query schema: type: string description: Filter dashboards by name (partial match, case insensitive) - name: sorting in: query schema: type: string - name: filters in: query schema: type: string responses: '200': description: Dashboard page content: application/json: schema: $ref: '#/components/schemas/DashboardPage_Public' /v1/private/projects/{projectId}/datasets: get: tags: - Projects summary: Find datasets by project description: Find datasets scoped to a project operationId: findDatasetsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: with_experiments_only in: query schema: type: boolean - name: with_optimizations_only in: query schema: type: boolean - name: name in: query schema: type: string description: Filter datasets by name (partial match, case insensitive) - name: sorting in: query schema: type: string - name: filters in: query schema: type: string responses: '200': description: Dataset page content: application/json: schema: $ref: '#/components/schemas/DatasetPage_Public' /v1/private/projects/{projectId}/experiments: get: tags: - Projects summary: Find experiments by project description: Find experiments scoped to a project operationId: findExperimentsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: datasetId in: query schema: type: string format: uuid - name: optimization_id in: query schema: type: string format: uuid - name: types in: query schema: type: string - name: name in: query schema: type: string description: Filter experiments by name (partial match, case insensitive) - name: dataset_deleted in: query schema: type: boolean - name: sorting in: query schema: type: string - name: filters in: query schema: type: string - name: experiment_ids in: query schema: type: string description: Filter experiments by a list of experiment IDs - name: force_sorting in: query schema: type: boolean description: Force sorting even when exceeding the endpoint result set limit. May result in slower queries default: false responses: '200': description: Experiments page content: application/json: schema: $ref: '#/components/schemas/ExperimentPage_Public' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' /v1/private/projects/{projectId}/optimizations: get: tags: - Projects summary: Find optimizations by project description: Find optimizations scoped to a project operationId: findOptimizationsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: dataset_id in: query schema: type: string format: uuid - name: dataset_name in: query schema: type: string - name: name in: query schema: type: string description: Filter optimizations by name (partial match, case insensitive) - name: dataset_deleted in: query schema: type: boolean - name: filters in: query schema: type: string responses: '200': description: Optimizations page content: application/json: schema: $ref: '#/components/schemas/OptimizationPage_Public' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' /v1/private/projects/{projectId}/prompts: get: tags: - Projects summary: Get prompts by project description: Get prompts scoped to a project operationId: getPromptsByProject parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: name in: query schema: type: string description: Filter prompts by name (partial match, case insensitive) - name: sorting in: query schema: type: string - name: filters in: query schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PromptPage_Public' /v1/private/projects: get: tags: - Projects summary: Find projects description: Find projects operationId: findProjects parameters: - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: name in: query schema: type: string description: Filter projects by name (partial match, case insensitive) - name: sorting in: query schema: type: string responses: '200': description: Project resource content: application/json: schema: $ref: '#/components/schemas/ProjectPage_Public' post: tags: - Projects summary: Create project description: Create project operationId: createProject requestBody: content: application/json: schema: $ref: '#/components/schemas/Project_Write' responses: '201': description: Created headers: Location: required: true style: simple schema: type: string example: ${basePath}/v1/private/projects/{projectId} '422': description: Unprocessable Content content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' /v1/private/projects/{id}: get: tags: - Projects summary: Get project by id description: Get project by id operationId: getProjectById parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: Project resource content: application/json: schema: $ref: '#/components/schemas/Project_Public' delete: tags: - Projects summary: Delete project by id description: Delete project by id operationId: deleteProjectById parameters: - name: id in: path required: true schema: type: string format: uuid responses: '204': description: No Content '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' patch: tags: - Projects summary: Update project by id description: Update project by id operationId: updateProject parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectUpdate' responses: '204': description: No Content '422': description: Unprocessable Content content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' /v1/private/projects/delete: post: tags: - Projects summary: Delete projects description: Delete projects batch operationId: deleteProjectsBatch requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchDelete' responses: '204': description: No Content /v1/private/projects/feedback-scores/names: get: tags: - Projects summary: Find Feedback Score names By Project Ids description: Find Feedback Score names By Project Ids operationId: findFeedbackScoreNamesByProjectIds parameters: - name: project_ids in: query schema: type: string responses: '200': description: Feedback Scores resource content: application/json: schema: $ref: '#/components/schemas/FeedbackScoreNames' /v1/private/projects/{id}/token-usage/names: get: tags: - Projects summary: Find Token Usage names description: Find Token Usage names operationId: findTokenUsageNames parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: Token Usage names resource content: application/json: schema: $ref: '#/components/schemas/TokenUsageNames' /v1/private/projects/{id}/kpi-cards: post: tags: - Projects summary: Get Project KPI Cards description: Gets KPI card metrics for a project operationId: getProjectKpiCards parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/KpiCardRequest' responses: '200': description: KPI Card Metrics content: application/json: schema: $ref: '#/components/schemas/KpiCardResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' /v1/private/projects/{id}/metrics: post: tags: - Projects summary: Get Project Metrics description: Gets specified metrics for a project operationId: getProjectMetrics parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectMetricRequest_Public' responses: '200': description: Project Metrics content: application/json: schema: $ref: '#/components/schemas/ProjectMetricResponse_Public' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' /v1/private/projects/stats: get: tags: - Projects summary: Get Project Stats description: Get Project Stats operationId: getProjectStats parameters: - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: minimum: 1 type: integer format: int32 default: 10 - name: name in: query schema: type: string description: Filter projects by name (partial match, case insensitive) - name: filters in: query schema: type: string - name: sorting in: query schema: type: string responses: '200': description: Project Stats content: application/json: schema: $ref: '#/components/schemas/ProjectStatsSummary' /v1/private/projects/retrieve: post: tags: - Projects summary: Retrieve project description: Retrieve project operationId: retrieveProject requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectRetrieve_Detailed' responses: '200': description: Project resource content: application/json: schema: $ref: '#/components/schemas/Project_Detailed' '422': description: Unprocessable Content content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Detailed' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Detailed' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Detailed' /v1/private/projects/{projectId}/activities: get: tags: - Projects summary: Get recent activity for a project description: Returns the most recent activity items across all entity types for a project, sorted by date descending. operationId: getRecentActivity parameters: - name: projectId in: path required: true schema: type: string format: uuid - name: page in: query schema: minimum: 1 type: integer format: int32 default: 1 - name: size in: query schema: maximum: 100 minimum: 1 type: integer format: int32 default: 10 responses: '200': description: Recent activity page content: application/json: schema: $ref: '#/components/schemas/RecentActivityPage_Public' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessage_Public' components: schemas: JsonNode_Public: type: object ExperimentScore_Public: required: - name - value type: object properties: name: minLength: 1 type: string value: type: number ErrorMessage_Public: type: object properties: code: type: integer format: int32 message: type: string details: type: string PercentageValues_Detailed: type: object properties: p50: type: number p90: type: number p99: type: number readOnly: true TokenUsageNames: type: object properties: names: type: array items: type: string Comment_Public: required: - text type: object properties: id: type: string format: uuid readOnly: true text: minLength: 1 type: string created_at: type: string format: date-time readOnly: true last_updated_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_by: type: string readOnly: true readOnly: true StudioOptimizer_Public: required: - type type: object properties: type: minLength: 1 type: string parameters: $ref: '#/components/schemas/JsonNode_Public' ProjectPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/Project_Public' sortableBy: type: array items: type: string TraceThreadFilter_Public: type: object properties: field: type: string operator: type: string enum: - contains - not_contains - starts_with - ends_with - '=' - '!=' - '>' - '>=' - < - <= - is_empty - is_not_empty - in - not_in key: type: string value: type: string KpiCardRequest: required: - entity_type - interval_start type: object properties: entity_type: type: string enum: - traces - spans - threads filters: type: string interval_start: type: string format: date-time interval_end: type: string format: date-time AlertPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/Alert_Public' sortable_by: type: array items: type: string KpiMetric: type: object properties: type: type: string enum: - count - errors - avg_duration - total_cost current_value: type: number description: 'Metric value for the current period. Unit depends on `type`: `count` is an integer count; `errors` is a percentage in [0, 100]; `avg_duration` is milliseconds; `total_cost` is in USD.' format: double previous_value: type: number description: Metric value for the immediately preceding period of equal length. Same unit as `current_value`. format: double AssertionScoreAverage_Public: required: - name - value type: object properties: name: minLength: 1 type: string value: type: number description: Per-assertion average pass rates for test suite experiments. Null for regular experiments. readOnly: true PromptPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/Prompt_Public' sortableBy: type: array items: type: string AlertTrigger_Public: required: - event_type type: object properties: id: type: string format: uuid alert_id: type: string format: uuid readOnly: true event_type: type: string enum: - trace:errors - trace:feedback_score - trace_thread:feedback_score - prompt:created - prompt:committed - trace:guardrails_triggered - prompt:deleted - experiment:finished - trace:cost - trace:latency trigger_configs: type: array items: $ref: '#/components/schemas/AlertTriggerConfig_Public' created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true ErrorMessage: type: object properties: code: type: integer format: int32 message: type: string details: type: string ErrorCountWithDeviation: type: object properties: count: type: integer format: int64 deviation: type: integer format: int64 deviation_percentage: type: integer format: int64 ProjectRetrieve_Detailed: required: - name type: object properties: name: minLength: 1 type: string ErrorMessage_Detailed: type: object properties: errors: type: array items: type: string FeedbackScoreNames: type: object properties: scores: type: array items: $ref: '#/components/schemas/ScoreName' DatasetVersionSummary_Public: type: object properties: id: type: string description: Unique identifier of the version format: uuid version_hash: type: string description: Hash of the version content version_name: type: string description: Sequential version name formatted as 'v1', 'v2', etc. change_description: type: string description: Description of changes in this version tags: uniqueItems: true type: array description: Tags associated with this version items: type: string description: Tags associated with this version description: Summary of the latest dataset version readOnly: true JsonListString_Public: type: object anyOf: - type: object - type: array items: type: object - type: string ProjectStatsSummaryItem: type: object properties: project_id: type: string format: uuid feedback_scores: type: array items: $ref: '#/components/schemas/FeedbackScoreAverage' duration: $ref: '#/components/schemas/PercentageValues' total_estimated_cost: type: number format: double total_estimated_cost_sum: type: number format: double usage: type: object additionalProperties: type: number format: double trace_count: type: integer format: int64 thread_count: type: integer format: int64 guardrails_failed_count: type: integer format: int64 error_count: $ref: '#/components/schemas/ErrorCountWithDeviation' SpanFilter_Public: type: object properties: field: type: string operator: type: string enum: - contains - not_contains - starts_with - ends_with - '=' - '!=' - '>' - '>=' - < - <= - is_empty - is_not_empty - in - not_in key: type: string value: type: string OptimizationPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/Optimization_Public' sortableBy: type: array items: type: string TraceFilter_Public: type: object properties: field: type: string operator: type: string enum: - contains - not_contains - starts_with - ends_with - '=' - '!=' - '>' - '>=' - < - <= - is_empty - is_not_empty - in - not_in key: type: string value: type: string PromptVersionLink_Public: type: object properties: prompt_version_id: type: string format: uuid commit: type: string prompt_id: type: string format: uuid prompt_name: type: string Dashboard_Public: required: - config - name type: object properties: id: type: string format: uuid readOnly: true workspace_id: type: string readOnly: true project_id: type: string description: Project ID. Takes precedence over project_name when both are provided. format: uuid name: maxLength: 120 minLength: 1 type: string slug: type: string readOnly: true type: type: string enum: - multi_project - experiments scope: type: string readOnly: true enum: - workspace - insights description: maxLength: 1000 minLength: 0 type: string config: $ref: '#/components/schemas/JsonNode_Public' created_by: type: string readOnly: true last_updated_by: type: string readOnly: true created_at: type: string format: date-time readOnly: true last_updated_at: type: string format: date-time readOnly: true Project_Write: required: - name type: object properties: name: minLength: 1 type: string visibility: type: string enum: - private - public description: maxLength: 255 minLength: 0 type: string DashboardPage_Public: type: object properties: content: type: array items: $ref: '#/components/schemas/Dashboard_Public' page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 sortable_by: type: array items: type: string Experiment_Public: required: - dataset_name type: object properties: id: type: string format: uuid dataset_name: minLength: 1 type: string nullable: true dataset_id: type: string format: uuid readOnly: true project_id: type: string description: Project ID. Takes precedence over project_name when both are provided. format: uuid project_name: pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string description: Project name. Creates project if it doesn't exist. Ignored when project_id is provided. name: type: string metadata: $ref: '#/components/schemas/JsonListString_Public' tags: maxItems: 50 minItems: 0 uniqueItems: true type: array items: maxLength: 100 minLength: 0 type: string type: type: string enum: - regular - trial - mini-batch - mutation evaluation_method: type: string enum: - dataset - evaluation_suite optimization_id: type: string format: uuid feedback_scores: type: array readOnly: true items: $ref: '#/components/schemas/FeedbackScoreAverage_Public' comments: type: array readOnly: true items: $ref: '#/components/schemas/Comment_Public' trace_count: type: integer format: int64 readOnly: true dataset_item_count: type: integer format: int64 readOnly: true created_at: type: string format: date-time readOnly: true duration: $ref: '#/components/schemas/PercentageValues_Public' total_estimated_cost: type: number readOnly: true total_estimated_cost_avg: type: number readOnly: true usage: type: object additionalProperties: type: number format: double readOnly: true readOnly: true last_updated_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_by: type: string readOnly: true status: type: string enum: - running - completed - cancelled experiment_scores: type: array items: $ref: '#/components/schemas/ExperimentScore_Public' prompt_version: $ref: '#/components/schemas/PromptVersionLink_Public' prompt_versions: type: array items: $ref: '#/components/schemas/PromptVersionLink_Public' dataset_version_id: type: string description: ID of the dataset version this experiment is linked to. If not provided at creation, experiment will be automatically linked to the latest version. format: uuid dataset_version_summary: $ref: '#/components/schemas/DatasetVersionSummary_Public' pass_rate: type: number description: Pass rate for test suite experiments (0.0-1.0). Null for regular experiments. readOnly: true passed_count: type: integer description: Number of items that passed for test suite experiments. Null for regular experiments. format: int64 readOnly: true total_count: type: integer description: Total number of items for test suite experiments. Null for regular experiments. format: int64 readOnly: true assertion_scores: type: array description: Per-assertion average pass rates for test suite experiments. Null for regular experiments. readOnly: true items: $ref: '#/components/schemas/AssertionScoreAverage_Public' Dataset_Public: required: - name type: object properties: id: type: string format: uuid name: minLength: 1 type: string project_id: type: string description: Project ID. Takes precedence over project_name when both are provided. format: uuid type: type: string enum: - dataset - evaluation_suite visibility: type: string enum: - private - public tags: uniqueItems: true type: array items: type: string description: maxLength: 255 minLength: 0 pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true experiment_count: type: integer format: int64 readOnly: true dataset_items_count: type: integer format: int64 readOnly: true optimization_count: type: integer format: int64 readOnly: true most_recent_experiment_at: type: string format: date-time readOnly: true last_created_experiment_at: type: string format: date-time readOnly: true most_recent_optimization_at: type: string format: date-time readOnly: true last_created_optimization_at: type: string format: date-time readOnly: true status: type: string readOnly: true enum: - unknown - processing - completed - failed latest_version: $ref: '#/components/schemas/DatasetVersionSummary_Public' Project_Detailed: required: - name type: object properties: id: type: string format: uuid readOnly: true name: minLength: 1 type: string visibility: type: string enum: - private - public description: maxLength: 255 minLength: 0 type: string created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true last_updated_trace_at: type: string format: date-time readOnly: true feedback_scores: type: array readOnly: true items: $ref: '#/components/schemas/FeedbackScoreAverage_Detailed' duration: $ref: '#/components/schemas/PercentageValues_Detailed' total_estimated_cost: type: number format: double readOnly: true total_estimated_cost_sum: type: number format: double readOnly: true usage: type: object additionalProperties: type: number format: double readOnly: true readOnly: true trace_count: type: integer format: int64 readOnly: true thread_count: type: integer format: int64 readOnly: true guardrails_failed_count: type: integer format: int64 readOnly: true error_count: $ref: '#/components/schemas/ErrorCountWithDeviation_Detailed' FeedbackScoreAverage_Detailed: required: - name - value type: object properties: name: minLength: 1 type: string value: type: number readOnly: true StudioLlmModel_Public: required: - model type: object properties: model: minLength: 1 type: string parameters: $ref: '#/components/schemas/JsonNode_Public' ProjectMetricRequest_Public: type: object properties: metric_type: type: string enum: - FEEDBACK_SCORES - TRACE_COUNT - TOKEN_USAGE - DURATION - COST - GUARDRAILS_FAILED_COUNT - THREAD_COUNT - THREAD_DURATION - THREAD_FEEDBACK_SCORES - SPAN_FEEDBACK_SCORES - SPAN_COUNT - SPAN_DURATION - SPAN_TOKEN_USAGE - TRACE_AVERAGE_DURATION - TRACE_ERROR_RATE - SPAN_AVERAGE_DURATION - SPAN_COST - SPAN_ERROR_RATE - THREAD_AVERAGE_DURATION - THREAD_COST interval: type: string enum: - HOURLY - DAILY - WEEKLY - TOTAL interval_start: type: string format: date-time interval_end: type: string format: date-time span_filters: type: array items: $ref: '#/components/schemas/SpanFilter_Public' trace_filters: type: array items: $ref: '#/components/schemas/TraceFilter_Public' thread_filters: type: array items: $ref: '#/components/schemas/TraceThreadFilter_Public' breakdown: $ref: '#/components/schemas/BreakdownConfig_Public' ProjectStatsSummary: type: object properties: content: type: array items: $ref: '#/components/schemas/ProjectStatsSummaryItem' OptimizationStudioConfig_Public: required: - dataset_name - evaluation - llm_model - optimizer - prompt type: object properties: dataset_name: minLength: 1 type: string prompt: $ref: '#/components/schemas/StudioPrompt_Public' llm_model: $ref: '#/components/schemas/StudioLlmModel_Public' evaluation: $ref: '#/components/schemas/StudioEvaluation_Public' optimizer: $ref: '#/components/schemas/StudioOptimizer_Public' StudioMessage_Public: required: - content - role type: object properties: role: minLength: 1 type: string content: minLength: 1 type: string FeedbackScoreAverage_Public: required: - name - value type: object properties: name: minLength: 1 type: string value: type: number readOnly: true RecentActivityItem_Public: type: object properties: type: type: string enum: - trace_daily - experiment - dataset_version - test_suite_version - alert_event - optimization - prompt_version id: type: string format: uuid name: type: string resource_id: type: string format: uuid created_by: type: string created_at: type: string format: date-time Alert_Public: required: - webhook type: object properties: id: type: string format: uuid name: maxLength: 255 minLength: 0 type: string enabled: type: boolean alert_type: type: string enum: - general - slack - pagerduty metadata: type: object additionalProperties: type: string webhook: $ref: '#/components/schemas/Webhook_Public' triggers: type: array items: $ref: '#/components/schemas/AlertTrigger_Public' created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true project_id: type: string description: Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a 'scope:project' trigger config — the system will create it automatically from this field. Sending both project_id and a scope:project trigger config will result in an error. format: uuid ResultsNumber_Public: type: object properties: name: type: string data: type: array items: $ref: '#/components/schemas/DataPointNumber_Public' BreakdownConfig_Public: type: object properties: field: type: string enum: - none - tags - metadata - name - error_info - error_type - model - provider - type metadata_key: type: string sub_metric: type: string StudioPrompt_Public: required: - messages type: object properties: messages: minItems: 1 type: array items: $ref: '#/components/schemas/StudioMessage_Public' StudioEvaluation_Public: required: - metrics type: object properties: metrics: minItems: 1 type: array items: $ref: '#/components/schemas/StudioMetric_Public' Prompt_Public: required: - name type: object properties: id: type: string format: uuid name: minLength: 1 type: string project_id: type: string description: Project ID. Takes precedence over project_name when both are provided. format: uuid description: maxLength: 255 minLength: 0 pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string template_structure: type: string description: 'Template structure type: ''text'' or ''chat''. Immutable after creation.' default: text enum: - text - chat tags: uniqueItems: true type: array items: type: string created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true version_count: type: integer format: int64 readOnly: true BatchDelete: required: - ids type: object properties: ids: maxItems: 1000 minItems: 1 uniqueItems: true type: array items: type: string format: uuid ProjectMetricResponse_Public: type: object properties: project_id: type: string format: uuid metric_type: type: string enum: - FEEDBACK_SCORES - TRACE_COUNT - TOKEN_USAGE - DURATION - COST - GUARDRAILS_FAILED_COUNT - THREAD_COUNT - THREAD_DURATION - THREAD_FEEDBACK_SCORES - SPAN_FEEDBACK_SCORES - SPAN_COUNT - SPAN_DURATION - SPAN_TOKEN_USAGE - TRACE_AVERAGE_DURATION - TRACE_ERROR_RATE - SPAN_AVERAGE_DURATION - SPAN_COST - SPAN_ERROR_RATE - THREAD_AVERAGE_DURATION - THREAD_COST interval: type: string enum: - HOURLY - DAILY - WEEKLY - TOTAL results: type: array items: $ref: '#/components/schemas/ResultsNumber_Public' StudioMetric_Public: required: - type type: object properties: type: minLength: 1 type: string parameters: $ref: '#/components/schemas/JsonNode_Public' Webhook_Public: required: - url type: object properties: id: type: string format: uuid name: type: string url: minLength: 1 type: string secret_token: maxLength: 250 minLength: 0 type: string headers: type: object additionalProperties: type: string created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true DatasetPage_Public: type: object properties: content: type: array items: $ref: '#/components/schemas/Dataset_Public' page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 sortableBy: type: array items: type: string KpiCardResponse: type: object properties: stats: type: array items: $ref: '#/components/schemas/KpiMetric' ProjectUpdate: type: object properties: name: pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string description: maxLength: 255 minLength: 0 type: string visibility: type: string enum: - private - public DataPointNumber_Public: required: - time type: object properties: time: type: string format: date-time value: type: number Optimization_Public: required: - dataset_name - objective_name - status type: object properties: id: type: string format: uuid name: type: string dataset_name: minLength: 1 type: string project_id: type: string description: Project ID. Takes precedence over project_name when both are provided. format: uuid objective_name: minLength: 1 type: string status: type: string enum: - running - completed - cancelled - initialized - error metadata: $ref: '#/components/schemas/JsonListString_Public' studio_config: $ref: '#/components/schemas/OptimizationStudioConfig_Public' dataset_id: type: string format: uuid readOnly: true num_trials: type: integer format: int64 readOnly: true feedback_scores: type: array readOnly: true items: $ref: '#/components/schemas/FeedbackScoreAverage_Public' experiment_scores: type: array readOnly: true items: $ref: '#/components/schemas/FeedbackScoreAverage_Public' created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time last_updated_by: type: string readOnly: true baseline_objective_score: type: number readOnly: true best_objective_score: type: number readOnly: true baseline_duration: type: number readOnly: true best_duration: type: number readOnly: true baseline_cost: type: number readOnly: true best_cost: type: number readOnly: true total_optimization_cost: type: number readOnly: true AlertTriggerConfig_Public: required: - type type: object properties: id: type: string format: uuid alert_trigger_id: type: string format: uuid readOnly: true type: type: string enum: - scope:project - threshold:feedback_score - threshold:cost - threshold:latency - threshold:errors config_value: type: object additionalProperties: type: string group_index: type: integer description: 'Groups configs within a trigger: same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope:project configs.' format: int32 created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true Project_Public: required: - name type: object properties: id: type: string format: uuid readOnly: true name: minLength: 1 type: string visibility: type: string enum: - private - public description: maxLength: 255 minLength: 0 type: string created_at: type: string format: date-time readOnly: true created_by: type: string readOnly: true last_updated_at: type: string format: date-time readOnly: true last_updated_by: type: string readOnly: true last_updated_trace_at: type: string format: date-time readOnly: true ErrorCountWithDeviation_Detailed: type: object properties: count: type: integer format: int64 deviation: type: integer format: int64 deviation_percentage: type: integer format: int64 readOnly: true ScoreName: type: object properties: name: type: string type: type: string PercentageValues: type: object properties: p50: type: number p90: type: number p99: type: number PercentageValues_Public: type: object properties: p50: type: number p90: type: number p99: type: number RecentActivityPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/RecentActivityItem_Public' FeedbackScoreAverage: required: - name - value type: object properties: name: minLength: 1 type: string value: type: number ExperimentPage_Public: type: object properties: page: type: integer format: int32 size: type: integer format: int32 total: type: integer format: int64 content: type: array items: $ref: '#/components/schemas/Experiment_Public' sortableBy: type: array items: type: string