{ "openapi": "3.1.0", "info": { "title": "Arize-Phoenix REST API", "description": "Schema for Arize-Phoenix REST API", "version": "1.0" }, "paths": { "/v1/annotation_configs": { "get": { "tags": [ "annotation_configs" ], "summary": "List annotation configurations", "description": "Retrieve a paginated list of all annotation configurations in the system.", "operationId": "listAnnotationConfigs", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded annotation config ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded annotation config ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "Maximum number of configs to return", "default": 100, "title": "Limit" }, "description": "Maximum number of configs to return" } ], "responses": { "200": { "description": "A list of annotation configurations with pagination information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAnnotationConfigsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "annotation_configs" ], "summary": "Create an annotation configuration", "operationId": "createAnnotationConfig", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAnnotationConfigData" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAnnotationConfigResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/annotation_configs/{config_identifier}": { "get": { "tags": [ "annotation_configs" ], "summary": "Get an annotation configuration by ID or name", "operationId": "getAnnotationConfig", "parameters": [ { "name": "config_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "ID or name of the annotation configuration", "title": "Config Identifier" }, "description": "ID or name of the annotation configuration" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAnnotationConfigResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/annotation_configs/{config_id}": { "put": { "tags": [ "annotation_configs" ], "summary": "Update an annotation configuration", "operationId": "updateAnnotationConfig", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "description": "ID of the annotation configuration", "title": "Config Id" }, "description": "ID of the annotation configuration" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAnnotationConfigData" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAnnotationConfigResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "annotation_configs" ], "summary": "Delete an annotation configuration", "operationId": "deleteAnnotationConfig", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "description": "ID of the annotation configuration", "title": "Config Id" }, "description": "ID of the annotation configuration" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAnnotationConfigResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/projects/{project_identifier}/annotation_configs": { "get": { "tags": [ "annotation_configs" ], "summary": "List annotation configurations assigned to a project", "description": "Retrieve a paginated list of the annotation configurations assigned to a project, identified by either project ID or project name.", "operationId": "getProjectAnnotationConfigs", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded annotation config ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded annotation config ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "Maximum number of configs to return", "default": 100, "title": "Limit" }, "description": "Maximum number of configs to return" } ], "responses": { "200": { "description": "A list of the project's annotation configurations with pagination information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetProjectAnnotationConfigsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "put": { "tags": [ "annotation_configs" ], "summary": "Replace the set of annotation configurations assigned to a project", "description": "Replace the project's entire set of assigned annotation configurations with the provided set. The server diffs the desired set against the current set: configs in the body but not assigned are added, and configs assigned but not in the body are removed. An empty array clears all assignments.", "operationId": "setProjectAnnotationConfigs", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetProjectAnnotationConfigsRequestBody" } } } }, "responses": { "200": { "description": "The resulting set of annotation configurations assigned to the project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetProjectAnnotationConfigsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/projects/{project_identifier}/annotation_configs/{config_identifier}": { "put": { "tags": [ "annotation_configs" ], "summary": "Assign an annotation configuration to a project", "description": "Assign an annotation configuration to a project. This operation is idempotent: re-assigning a config that is already assigned is a no-op that returns the config. Both the project and the config are identified by either ID or name.", "operationId": "assignAnnotationConfigToProject", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." }, { "name": "config_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The annotation configuration identifier: either ID or name.", "title": "Config Identifier" }, "description": "The annotation configuration identifier: either ID or name." } ], "responses": { "200": { "description": "The annotation configuration assigned to the project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignAnnotationConfigToProjectResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "delete": { "tags": [ "annotation_configs" ], "summary": "Unassign an annotation configuration from a project", "description": "Unassign an annotation configuration from a project. This operation is idempotent: unassigning a config that is not currently assigned is a no-op. The underlying annotation config is not deleted. Both the project and the config are identified by either ID or name.", "operationId": "unassignAnnotationConfigFromProject", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." }, { "name": "config_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The annotation configuration identifier: either ID or name.", "title": "Config Identifier" }, "description": "The annotation configuration identifier: either ID or name." } ], "responses": { "204": { "description": "No content returned on successful unassignment" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/projects/{project_identifier}/span_annotations": { "get": { "tags": [ "annotations" ], "summary": "Get span annotations filtered by span_ids and/or identifier.", "description": "Return span annotations for a project, filtered by `span_ids`, `identifier`, or both. At least one of `span_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.", "operationId": "listSpanAnnotationsBySpanIds", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "span_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of span ids to fetch annotations for. If omitted, `identifier` must be supplied.", "title": "Span Ids" }, "description": "Optional list of span ids to fetch annotations for. If omitted, `identifier` must be supplied." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string", "minLength": 1 } }, { "type": "null" } ], "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `span_ids` must be supplied. When combined with `span_ids`, results are the AND-intersection of both filters.", "title": "Identifier" }, "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `span_ids` must be supplied. When combined with `span_ids`, results are the AND-intersection of both filters." }, { "name": "include_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default).", "title": "Include Annotation Names" }, "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default)." }, { "name": "exclude_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to exclude from results.", "title": "Exclude Annotation Names" }, "description": "Optional list of annotation names to exclude from results." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "A cursor for pagination", "title": "Cursor" }, "description": "A cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10000, "exclusiveMinimum": 0, "description": "The maximum number of annotations to return in a single request", "default": 10, "title": "Limit" }, "description": "The maximum number of annotations to return in a single request" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpanAnnotationsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project or spans not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } }, "delete": { "tags": [ "annotations" ], "summary": "Delete span annotations in a project that match the supplied filter.", "description": "Hard-delete span annotations within the named project that match the\nsupplied filter.\n\n- The request must either supply both `start_time` AND `end_time`\n to bound the delete to a `[start_time, end_time)` time window,\n OR set `delete_all=true` to acknowledge an unbounded sweep. A request\n that satisfies neither is rejected with 422.\n- `name`, `identifier`, and `annotator_kind` are optional narrowing\n filters; on their own they do NOT authorize the request \u2014 they only\n narrow within an already-authorized request (bounded time range or\n `delete_all=true`).\n- All supplied filters are combined with AND. `name` and `identifier`,\n when present, must be non-empty.\n- `start_time` is inclusive (`>=`); `end_time` is exclusive\n (`<`). When both are supplied, `start_time` must be strictly earlier\n than `end_time` (else 422). A half-bounded range (only one of\n the two) does NOT satisfy the gate and is rejected unless\n `delete_all=true` is also set. Naive datetimes are interpreted as UTC.\n- The endpoint is idempotent: a request that matches no rows still\n returns 204.\n- When authentication is enabled, non-admin callers can only delete rows\n they own (`user_id == current_user.id`); admins delete all matching\n rows.", "operationId": "deleteSpanAnnotations", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name.", "title": "Name" }, "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier.", "title": "Identifier" }, "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier." }, { "name": "annotator_kind", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "LLM", "CODE", "HUMAN" ], "type": "string" }, { "type": "null" } ], "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind.", "title": "Annotator Kind" }, "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind." }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC.", "title": "Start Time" }, "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC." }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC.", "title": "End Time" }, "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC." }, { "name": "delete_all", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time.", "default": false, "title": "Delete All" }, "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } } }, "/v1/projects/{project_identifier}/trace_annotations": { "get": { "tags": [ "annotations" ], "summary": "Get trace annotations filtered by trace_ids and/or identifier.", "description": "Return trace annotations for a project, filtered by `trace_ids`, `identifier`, or both. At least one of `trace_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.", "operationId": "listTraceAnnotationsByTraceIds", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "trace_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of trace ids to fetch annotations for. If omitted, `identifier` must be supplied.", "title": "Trace Ids" }, "description": "Optional list of trace ids to fetch annotations for. If omitted, `identifier` must be supplied." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string", "minLength": 1 } }, { "type": "null" } ], "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `trace_ids` must be supplied. When combined with `trace_ids`, results are the AND-intersection of both filters.", "title": "Identifier" }, "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `trace_ids` must be supplied. When combined with `trace_ids`, results are the AND-intersection of both filters." }, { "name": "include_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default).", "title": "Include Annotation Names" }, "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default)." }, { "name": "exclude_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to exclude from results.", "title": "Exclude Annotation Names" }, "description": "Optional list of annotation names to exclude from results." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "A cursor for pagination", "title": "Cursor" }, "description": "A cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10000, "exclusiveMinimum": 0, "description": "The maximum number of annotations to return in a single request", "default": 10, "title": "Limit" }, "description": "The maximum number of annotations to return in a single request" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TraceAnnotationsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project or traces not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } }, "delete": { "tags": [ "annotations" ], "summary": "Delete trace annotations in a project that match the supplied filter.", "description": "Hard-delete trace annotations within the named project that match the\nsupplied filter.\n\n- The request must either supply both `start_time` AND `end_time`\n to bound the delete to a `[start_time, end_time)` time window,\n OR set `delete_all=true` to acknowledge an unbounded sweep. A request\n that satisfies neither is rejected with 422.\n- `name`, `identifier`, and `annotator_kind` are optional narrowing\n filters; on their own they do NOT authorize the request \u2014 they only\n narrow within an already-authorized request (bounded time range or\n `delete_all=true`).\n- All supplied filters are combined with AND. `name` and `identifier`,\n when present, must be non-empty.\n- `start_time` is inclusive (`>=`); `end_time` is exclusive\n (`<`). When both are supplied, `start_time` must be strictly earlier\n than `end_time` (else 422). A half-bounded range (only one of\n the two) does NOT satisfy the gate and is rejected unless\n `delete_all=true` is also set. Naive datetimes are interpreted as UTC.\n- The endpoint is idempotent: a request that matches no rows still\n returns 204.\n- When authentication is enabled, non-admin callers can only delete rows\n they own (`user_id == current_user.id`); admins delete all matching\n rows.", "operationId": "deleteTraceAnnotations", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name.", "title": "Name" }, "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier.", "title": "Identifier" }, "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier." }, { "name": "annotator_kind", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "LLM", "CODE", "HUMAN" ], "type": "string" }, { "type": "null" } ], "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind.", "title": "Annotator Kind" }, "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind." }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC.", "title": "Start Time" }, "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC." }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC.", "title": "End Time" }, "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC." }, { "name": "delete_all", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time.", "default": false, "title": "Delete All" }, "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } } }, "/v1/projects/{project_identifier}/session_annotations": { "get": { "tags": [ "annotations" ], "summary": "Get session annotations filtered by session_ids and/or identifier.", "description": "Return session annotations for a project, filtered by `session_ids`, `identifier`, or both. At least one of `session_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.", "operationId": "listSessionAnnotationsBySessionIds", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "session_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of session ids to fetch annotations for. If omitted, `identifier` must be supplied.", "title": "Session Ids" }, "description": "Optional list of session ids to fetch annotations for. If omitted, `identifier` must be supplied." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string", "minLength": 1 } }, { "type": "null" } ], "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `session_ids` must be supplied. When combined with `session_ids`, results are the AND-intersection of both filters.", "title": "Identifier" }, "description": "Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `session_ids` must be supplied. When combined with `session_ids`, results are the AND-intersection of both filters." }, { "name": "include_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default).", "title": "Include Annotation Names" }, "description": "Optional list of annotation names to include. If provided, only annotations with these names will be returned (allowlist). When omitted, the response includes every matching row regardless of name (no annotation names are excluded by default)." }, { "name": "exclude_annotation_names", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Optional list of annotation names to exclude from results.", "title": "Exclude Annotation Names" }, "description": "Optional list of annotation names to exclude from results." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "A cursor for pagination", "title": "Cursor" }, "description": "A cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10000, "exclusiveMinimum": 0, "description": "The maximum number of annotations to return in a single request", "default": 10, "title": "Limit" }, "description": "The maximum number of annotations to return in a single request" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionAnnotationsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project or sessions not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } }, "delete": { "tags": [ "annotations" ], "summary": "Delete session annotations in a project that match the supplied filter.", "description": "Hard-delete session annotations within the named project that match the\nsupplied filter.\n\n- The request must either supply both `start_time` AND `end_time`\n to bound the delete to a `[start_time, end_time)` time window,\n OR set `delete_all=true` to acknowledge an unbounded sweep. A request\n that satisfies neither is rejected with 422.\n- `name`, `identifier`, and `annotator_kind` are optional narrowing\n filters; on their own they do NOT authorize the request \u2014 they only\n narrow within an already-authorized request (bounded time range or\n `delete_all=true`).\n- All supplied filters are combined with AND. `name` and `identifier`,\n when present, must be non-empty.\n- `start_time` is inclusive (`>=`); `end_time` is exclusive\n (`<`). When both are supplied, `start_time` must be strictly earlier\n than `end_time` (else 422). A half-bounded range (only one of\n the two) does NOT satisfy the gate and is rejected unless\n `delete_all=true` is also set. Naive datetimes are interpreted as UTC.\n- The endpoint is idempotent: a request that matches no rows still\n returns 204.\n- When authentication is enabled, non-admin callers can only delete rows\n they own (`user_id == current_user.id`); admins delete all matching\n rows.", "operationId": "deleteSessionAnnotations", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name.", "title": "Name" }, "description": "Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name." }, { "name": "identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier.", "title": "Identifier" }, "description": "Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier." }, { "name": "annotator_kind", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "LLM", "CODE", "HUMAN" ], "type": "string" }, { "type": "null" } ], "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind.", "title": "Annotator Kind" }, "description": "Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind." }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC.", "title": "Start Time" }, "description": "Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC." }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC.", "title": "End Time" }, "description": "Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC." }, { "name": "delete_all", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time.", "default": false, "title": "Delete All" }, "description": "Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project \u2014 e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Project not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid parameters" } } } }, "/v1/dataset_labels": { "get": { "tags": [ "datasets" ], "summary": "List dataset labels", "description": "Retrieve a paginated list of all dataset labels in the system.", "operationId": "listDatasetLabels", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (a dataset label GlobalID)", "title": "Cursor" }, "description": "Cursor for pagination (a dataset label GlobalID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of dataset labels to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of dataset labels to return at a time." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDatasetLabelsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "datasets" ], "summary": "Create a dataset label", "operationId": "createDatasetLabel", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDatasetLabelRequestBody" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDatasetLabelResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "409": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "A dataset label with the same name already exists" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid request body" } } } }, "/v1/dataset_labels/{label_id}": { "get": { "tags": [ "datasets" ], "summary": "Get a dataset label by ID", "operationId": "getDatasetLabel", "parameters": [ { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset label", "title": "Label Id" }, "description": "The ID of the dataset label" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDatasetLabelResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset label not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset label ID" } } }, "patch": { "tags": [ "datasets" ], "summary": "Update a dataset label by ID", "description": "Partially update a dataset label's name, color, and/or description. Only the fields included in the request body are changed; omitted fields are left as-is.", "operationId": "updateDatasetLabel", "parameters": [ { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset label", "title": "Label Id" }, "description": "The ID of the dataset label" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDatasetLabelRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDatasetLabelResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset label not found" }, "409": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "A dataset label with the same name already exists" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset label ID or request body" } } }, "delete": { "tags": [ "datasets" ], "summary": "Delete a dataset label by ID", "description": "Delete a dataset label. This also removes the label from every dataset it is applied to.", "operationId": "deleteDatasetLabel", "parameters": [ { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset label", "title": "Label Id" }, "description": "The ID of the dataset label" } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset label not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset label ID" } } } }, "/v1/datasets/{dataset_identifier}/labels": { "get": { "tags": [ "datasets" ], "summary": "List the labels applied to a dataset", "operationId": "listDatasetLabelsForDataset", "parameters": [ { "name": "dataset_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The dataset identifier: either the dataset ID (GlobalID) or its name.", "title": "Dataset Identifier" }, "description": "The dataset identifier: either the dataset ID (GlobalID) or its name." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDatasetLabelsForDatasetResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset identifier" } } }, "put": { "tags": [ "datasets" ], "summary": "Replace the set of labels applied to a dataset", "description": "Replace the entire set of labels applied to a dataset. Labels present in the request but not currently applied are added; labels currently applied but absent from the request are removed. An empty list removes all labels.", "operationId": "setDatasetLabelsForDataset", "parameters": [ { "name": "dataset_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The dataset identifier: either the dataset ID (GlobalID) or its name.", "title": "Dataset Identifier" }, "description": "The dataset identifier: either the dataset ID (GlobalID) or its name." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetDatasetLabelsRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetDatasetLabelsForDatasetResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset or one or more dataset labels not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset identifier or request body" } } } }, "/v1/datasets/{dataset_identifier}/labels/{label_id}": { "put": { "tags": [ "datasets" ], "summary": "Apply a label to a dataset", "description": "Apply an existing label to a dataset. This operation is idempotent: applying a label that is already applied is a no-op that returns the label.", "operationId": "addDatasetLabelToDataset", "parameters": [ { "name": "dataset_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The dataset identifier: either the dataset ID (GlobalID) or its name.", "title": "Dataset Identifier" }, "description": "The dataset identifier: either the dataset ID (GlobalID) or its name." }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset label to apply", "title": "Label Id" }, "description": "The ID of the dataset label to apply" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddDatasetLabelToDatasetResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset or dataset label not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset identifier or dataset label ID" } } }, "delete": { "tags": [ "datasets" ], "summary": "Remove a label from a dataset", "description": "Remove a label from a dataset without deleting the label itself. This operation is idempotent: removing a label that is not applied is a no-op.", "operationId": "removeDatasetLabelFromDataset", "parameters": [ { "name": "dataset_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The dataset identifier: either the dataset ID (GlobalID) or its name.", "title": "Dataset Identifier" }, "description": "The dataset identifier: either the dataset ID (GlobalID) or its name." }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset label to remove", "title": "Label Id" }, "description": "The ID of the dataset label to remove" } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset identifier or dataset label ID" } } } }, "/v1/datasets": { "get": { "tags": [ "datasets" ], "summary": "List datasets", "operationId": "listDatasets", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination", "title": "Cursor" }, "description": "Cursor for pagination" }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "An optional dataset name to filter by", "title": "Name" }, "description": "An optional dataset name to filter by" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of datasets to return at a time.", "default": 10, "title": "Limit" }, "description": "The max number of datasets to return at a time." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDatasetsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/datasets/{id}": { "delete": { "tags": [ "datasets" ], "summary": "Delete dataset by ID", "operationId": "deleteDatasetById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset to delete.", "title": "Id" }, "description": "The ID of the dataset to delete." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset ID" } } }, "get": { "tags": [ "datasets" ], "summary": "Get dataset by ID", "operationId": "getDataset", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDatasetResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/datasets/{id}/versions": { "get": { "tags": [ "datasets" ], "summary": "List dataset versions", "operationId": "listDatasetVersionsByDatasetId", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination", "title": "Cursor" }, "description": "Cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of dataset versions to return at a time", "default": 10, "title": "Limit" }, "description": "The max number of dataset versions to return at a time" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDatasetVersionsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/datasets/upload": { "post": { "tags": [ "datasets" ], "summary": "Upload dataset from JSON, JSONL, CSV, or PyArrow", "operationId": "uploadDataset", "parameters": [ { "name": "sync", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, fulfill request synchronously and return JSON containing dataset_id.", "default": false, "title": "Sync" }, "description": "If true, fulfill request synchronously and return JSON containing dataset_id." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/UploadDatasetResponseBody" }, { "type": "null" } ], "title": "Response Uploaddataset" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "409": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset with the given name already exists (action=create)." }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid request body" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "inputs" ], "properties": { "action": { "type": "string", "enum": [ "create", "append", "update" ] }, "name": { "type": "string" }, "description": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object" } }, "outputs": { "type": "array", "items": { "type": "object" } }, "metadata": { "type": "array", "items": { "type": "object" } }, "splits": { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "description": "Split per example: string, string array, or null" }, "span_ids": { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "description": "Span IDs to link examples back to spans" }, "example_ids": { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "description": "Optional example ID per example. If provided, it is used as the example's stable public ID." } } } }, "multipart/form-data": { "schema": { "type": "object", "required": [ "name", "input_keys[]", "output_keys[]", "file" ], "properties": { "action": { "type": "string", "enum": [ "create", "append", "update" ] }, "name": { "type": "string" }, "description": { "type": "string" }, "input_keys[]": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "output_keys[]": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "metadata_keys[]": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "split_keys[]": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "description": "Deprecated: use split_key instead. Column names for auto-assigning examples to splits" }, "split_key": { "type": "string", "description": "Single column name containing split names (plain string or JSON list) per row" }, "flatten_keys[]": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "description": "Column names whose object values should be flattened into their selected bucket" }, "span_id_key": { "type": "string", "description": "Column name for span IDs to link examples back to spans" }, "example_id_key": { "type": "string", "description": "Column name containing stable IDs for examples. When provided, examples with matching IDs are updated in place when their content changes." }, "file": { "type": "string", "format": "binary" } } } } } } } }, "/v1/datasets/{id}/examples": { "get": { "tags": [ "datasets" ], "summary": "Get examples from a dataset", "operationId": "getDatasetExamples", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "version_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The ID of the dataset version (if omitted, returns data from the latest version)", "title": "Version Id" }, "description": "The ID of the dataset version (if omitted, returns data from the latest version)" }, { "name": "split", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "List of dataset split identifiers (GlobalIDs or names) to filter by", "title": "Split" }, "description": "List of dataset split identifiers (GlobalIDs or names) to filter by" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDatasetExamplesResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/datasets/{id}/csv": { "get": { "tags": [ "datasets" ], "summary": "Download dataset examples as CSV file", "operationId": "getDatasetCsv", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "version_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The ID of the dataset version (if omitted, returns data from the latest version)", "title": "Version Id" }, "description": "The ID of the dataset version (if omitted, returns data from the latest version)" } ], "responses": { "200": { "description": "Successful Response", "content": { "text/csv": { "schema": { "type": "string", "contentMediaType": "text/csv" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/datasets/{id}/jsonl": { "get": { "tags": [ "datasets" ], "summary": "Download dataset examples as JSONL file", "operationId": "getDatasetJSONL", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "version_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The ID of the dataset version (if omitted, returns data from the latest version)", "title": "Version Id" }, "description": "The ID of the dataset version (if omitted, returns data from the latest version)" } ], "responses": { "200": { "description": "Successful Response", "content": { "text/plain": { "schema": { "type": "string" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset or version ID" } } } }, "/v1/datasets/{id}/jsonl/openai_ft": { "get": { "tags": [ "datasets" ], "summary": "Download dataset examples as OpenAI fine-tuning JSONL file", "operationId": "getDatasetJSONLOpenAIFineTuning", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "version_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The ID of the dataset version (if omitted, returns data from the latest version)", "title": "Version Id" }, "description": "The ID of the dataset version (if omitted, returns data from the latest version)" } ], "responses": { "200": { "description": "Successful Response", "content": { "text/plain": { "schema": { "type": "string" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset or version ID" } } } }, "/v1/datasets/{id}/jsonl/openai_evals": { "get": { "tags": [ "datasets" ], "summary": "Download dataset examples as OpenAI evals JSONL file", "operationId": "getDatasetJSONLOpenAIEvals", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the dataset", "title": "Id" }, "description": "The ID of the dataset" }, { "name": "version_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The ID of the dataset version (if omitted, returns data from the latest version)", "title": "Version Id" }, "description": "The ID of the dataset version (if omitted, returns data from the latest version)" } ], "responses": { "200": { "description": "Successful Response", "content": { "text/plain": { "schema": { "type": "string" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid dataset or version ID" } } } }, "/v1/datasets/{dataset_id}/experiments": { "post": { "tags": [ "experiments" ], "summary": "Create experiment on a dataset", "operationId": "createExperiment", "parameters": [ { "name": "dataset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Dataset ID" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExperimentRequestBody" } } } }, "responses": { "200": { "description": "Experiment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExperimentResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Dataset or DatasetVersion not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "experiments" ], "summary": "List experiments by dataset", "description": "Retrieve a paginated list of experiments for the specified dataset.", "operationId": "listExperiments", "parameters": [ { "name": "dataset_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Dataset ID" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded experiment ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded experiment ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of experiments to return at a time.", "default": 50, "title": "Limit" }, "description": "The max number of experiments to return at a time." } ], "responses": { "200": { "description": "Paginated list of experiments for the dataset", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListExperimentsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/experiments/{experiment_id}": { "get": { "tags": [ "experiments" ], "summary": "Get experiment by ID", "operationId": "getExperiment", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } } ], "responses": { "200": { "description": "Experiment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetExperimentResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "experiments" ], "summary": "Update an experiment by ID", "description": "Partially update an experiment's name, description, and/or metadata. Only the fields included in the request body are changed; omitted fields are left as-is. Patching an ephemeral experiment refreshes its last-update timestamp, which extends the window before it is swept away.", "operationId": "updateExperiment", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment ID" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateExperimentRequestBody" } } } }, "responses": { "200": { "description": "Experiment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateExperimentResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid experiment ID or request body" } } }, "delete": { "tags": [ "experiments" ], "summary": "Delete experiment by ID", "operationId": "deleteExperiment", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } }, { "name": "delete_project", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, also delete the project associated with the experiment that contains traces and spans for the experiment tasks.", "default": false, "title": "Delete Project" }, "description": "If true, also delete the project associated with the experiment that contains traces and spans for the experiment tasks." } ], "responses": { "204": { "description": "Experiment deleted successfully" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/experiments/{experiment_id}/incomplete-runs": { "get": { "tags": [ "experiments" ], "summary": "Get incomplete runs for an experiment", "description": "Get runs that need to be completed for this experiment.\n\nReturns all incomplete runs, including both missing runs (not yet attempted)\nand failed runs (attempted but have errors).\n\nArgs:\n experiment_id: The ID of the experiment\n cursor: Cursor for pagination\n limit: Maximum number of results to return\n\nReturns:\n Paginated list of incomplete runs grouped by dataset example,\n with repetition numbers that need to be run", "operationId": "getIncompleteExperimentRuns", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination", "title": "Cursor" }, "description": "Cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "Maximum number of examples with incomplete runs to return", "default": 50, "title": "Limit" }, "description": "Maximum number of examples with incomplete runs to return" } ], "responses": { "200": { "description": "Incomplete runs retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetIncompleteExperimentRunsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid cursor format" } } } }, "/v1/experiments/{experiment_id}/json": { "get": { "tags": [ "experiments" ], "summary": "Download experiment runs as a JSON file", "operationId": "getExperimentJSON", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment ID" } } ], "responses": { "200": { "description": "Successful Response", "content": { "text/plain": { "schema": { "type": "string" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/experiments/{experiment_id}/csv": { "get": { "tags": [ "experiments" ], "summary": "Download experiment runs as a CSV file", "operationId": "getExperimentCSV", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment ID" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} }, "text/csv": { "schema": { "type": "string", "contentMediaType": "text/csv" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/experiments/{experiment_id}/runs": { "post": { "tags": [ "experiments" ], "summary": "Create run for an experiment", "operationId": "createExperimentRun", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExperimentRunRequestBody" } } } }, "responses": { "200": { "description": "Experiment run created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExperimentRunResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment or dataset example not found" }, "409": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment run already exists with a successful result and cannot be updated" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "experiments" ], "summary": "List runs for an experiment", "description": "Retrieve a paginated list of runs for an experiment", "operationId": "listExperimentRuns", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded experiment run ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded experiment run ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0 }, { "type": "null" } ], "description": "The max number of experiment runs to return at a time. If not specified, returns all results.", "title": "Limit" }, "description": "The max number of experiment runs to return at a time. If not specified, returns all results." } ], "responses": { "200": { "description": "Experiment runs retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListExperimentRunsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid cursor format" } } } }, "/v1/experiments/{experiment_id}/incomplete-evaluations": { "get": { "tags": [ "experiments" ], "summary": "Get incomplete evaluations for an experiment", "description": "Get experiment runs that have incomplete evaluations.\n\nReturns runs with:\n- Missing evaluations (evaluator has not been run)\n- Failed evaluations (evaluator ran but has errors)\n\nArgs:\n experiment_id: The ID of the experiment\n evaluation_name: List of evaluation names to check (required, at least one)\n cursor: Cursor for pagination\n limit: Maximum number of results to return\n\nReturns:\n Paginated list of runs with incomplete evaluations", "operationId": "getIncompleteExperimentEvaluations", "parameters": [ { "name": "experiment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Experiment Id" } }, { "name": "evaluation_name", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "description": "Evaluation names to check", "default": [], "title": "Evaluation Name" }, "description": "Evaluation names to check" }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination", "title": "Cursor" }, "description": "Cursor for pagination" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "Maximum number of runs with incomplete evaluations to return", "default": 50, "title": "Limit" }, "description": "Maximum number of runs with incomplete evaluations to return" } ], "responses": { "200": { "description": "Incomplete evaluations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetIncompleteEvaluationsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "400": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "No evaluator names provided" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Experiment not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid cursor format" } } } }, "/v1/experiment_evaluations": { "post": { "tags": [ "experiments" ], "summary": "Create or update evaluation for an experiment run", "operationId": "upsertExperimentEvaluation", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertExperimentEvaluationRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertExperimentEvaluationResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "404": { "description": "Experiment run not found", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/projects/{project_identifier}/traces": { "get": { "tags": [ "traces" ], "summary": "List traces for a project", "operationId": "listProjectTraces", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Inclusive lower bound on trace start time (ISO 8601)", "title": "Start Time" }, "description": "Inclusive lower bound on trace start time (ISO 8601)" }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Exclusive upper bound on trace start time (ISO 8601)", "title": "End Time" }, "description": "Exclusive upper bound on trace start time (ISO 8601)" }, { "name": "sort", "in": "query", "required": false, "schema": { "enum": [ "start_time", "latency_ms" ], "type": "string", "description": "Sort field", "default": "start_time", "title": "Sort" }, "description": "Sort field" }, { "name": "order", "in": "query", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string", "description": "Sort direction", "default": "desc", "title": "Order" }, "description": "Sort direction" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "exclusiveMinimum": 0, "description": "Maximum number of traces to return", "default": 100, "title": "Limit" }, "description": "Maximum number of traces to return" }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Pagination cursor (Trace GlobalID)", "title": "Cursor" }, "description": "Pagination cursor (Trace GlobalID)" }, { "name": "include_spans", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible.", "default": false, "title": "Include Spans" }, "description": "If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible." }, { "name": "session_identifier", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned.", "title": "Session Identifier" }, "description": "List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTracesResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/trace_annotations": { "post": { "tags": [ "traces" ], "summary": "Create trace annotations", "operationId": "annotateTraces", "parameters": [ { "name": "sync", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, fulfill request synchronously.", "default": false, "title": "Sync" }, "description": "If true, fulfill request synchronously." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateTracesRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateTracesResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Trace not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/trace_notes": { "post": { "tags": [ "traces" ], "summary": "Create a trace note", "description": "Add a note annotation to a trace. By default each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same trace. Callers may supply a non-empty `identifier` to upsert on (trace_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note, matching the semantics of structured annotations.", "operationId": "createTraceNote", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTraceNoteRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Trace note created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTraceNoteResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "404": { "description": "Trace not found", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/traces/{trace_identifier}": { "delete": { "tags": [ "traces" ], "summary": "Delete a trace by identifier", "description": "Delete an entire trace by its identifier. The identifier can be either:\n1. A Relay node ID (base64-encoded)\n2. An OpenTelemetry trace_id (hex string)\n\nThis will permanently remove all spans in the trace and their associated data.", "operationId": "deleteTrace", "parameters": [ { "name": "trace_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The trace identifier: either a relay GlobalID or OpenTelemetry trace_id", "title": "Trace Identifier" }, "description": "The trace identifier: either a relay GlobalID or OpenTelemetry trace_id" } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/projects/{project_identifier}/spans/otlpv1": { "get": { "tags": [ "spans" ], "summary": "Search spans with simple filters (no DSL)", "description": "Return spans within a project filtered by time range. Supports cursor-based pagination.", "operationId": "spanSearch", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Pagination cursor (Span Global ID)", "title": "Cursor" }, "description": "Pagination cursor (Span Global ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "exclusiveMinimum": 0, "description": "Maximum number of spans to return", "default": 100, "title": "Limit" }, "description": "Maximum number of spans to return" }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Inclusive lower bound time", "title": "Start Time" }, "description": "Inclusive lower bound time" }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Exclusive upper bound time", "title": "End Time" }, "description": "Exclusive upper bound time" }, { "name": "trace_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by one or more trace IDs", "title": "Trace Id" }, "description": "Filter by one or more trace IDs" }, { "name": "span_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by one or more span IDs", "title": "Span Id" }, "description": "Filter by one or more span IDs" }, { "name": "parent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by parent span ID. Use \"null\" to get root spans only.", "title": "Parent Id" }, "description": "Filter by parent span ID. Use \"null\" to get root spans only." }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by span name(s)", "title": "Name" }, "description": "Filter by span name(s)" }, { "name": "status_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by status code(s). Values: OK, ERROR, UNSET", "title": "Status Code" }, "description": "Filter by status code(s). Values: OK, ERROR, UNSET" }, { "name": "attribute", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter spans by `key:value`. Key is a dot-path (e.g. `user.id`, `metadata.tier`). Value is JSON-parsed: `k:12345` is int, `k:true` is bool, otherwise string (`k:user-42`). To match a numeric- or boolean-looking STRING, JSON-quote it: `user.id:\"12345\"` (URL-encoded `%2212345%22`). Split is on the first `:` only, so values may contain colons (`session.id:sess:abc:123`, ISO timestamps). Repeat the param to AND filters. List-valued attributes (e.g. `tag.tags`) cannot be matched here. Returns 422 on malformed input (missing colon, empty key/value, or list/dict/null value).", "title": "Attribute" }, "description": "Filter spans by `key:value`. Key is a dot-path (e.g. `user.id`, `metadata.tier`). Value is JSON-parsed: `k:12345` is int, `k:true` is bool, otherwise string (`k:user-42`). To match a numeric- or boolean-looking STRING, JSON-quote it: `user.id:\"12345\"` (URL-encoded `%2212345%22`). Split is on the first `:` only, so values may contain colons (`session.id:sess:abc:123`, ISO timestamps). Repeat the param to AND filters. List-valued attributes (e.g. `tag.tags`) cannot be matched here. Returns 422 on malformed input (missing colon, empty key/value, or list/dict/null value)." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OtlpSpansResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/projects/{project_identifier}/spans": { "get": { "tags": [ "spans" ], "summary": "List spans with simple filters (no DSL)", "description": "Return spans within a project filtered by time range. Supports cursor-based pagination.", "operationId": "getSpans", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Pagination cursor (Span Global ID)", "title": "Cursor" }, "description": "Pagination cursor (Span Global ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "exclusiveMinimum": 0, "description": "Maximum number of spans to return", "default": 100, "title": "Limit" }, "description": "Maximum number of spans to return" }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Inclusive lower bound time", "title": "Start Time" }, "description": "Inclusive lower bound time" }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Exclusive upper bound time", "title": "End Time" }, "description": "Exclusive upper bound time" }, { "name": "trace_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by one or more trace IDs", "title": "Trace Id" }, "description": "Filter by one or more trace IDs" }, { "name": "span_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by one or more span IDs", "title": "Span Id" }, "description": "Filter by one or more span IDs" }, { "name": "parent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by parent span ID. Use \"null\" to get root spans only.", "title": "Parent Id" }, "description": "Filter by parent span ID. Use \"null\" to get root spans only." }, { "name": "name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by span name(s)", "title": "Name" }, "description": "Filter by span name(s)" }, { "name": "span_kind", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by span kind(s). Values: LLM, CHAIN, TOOL, RETRIEVER, EMBEDDING, AGENT, RERANKER, GUARDRAIL, EVALUATOR, UNKNOWN", "title": "Span Kind" }, "description": "Filter by span kind(s). Values: LLM, CHAIN, TOOL, RETRIEVER, EMBEDDING, AGENT, RERANKER, GUARDRAIL, EVALUATOR, UNKNOWN" }, { "name": "status_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by status code(s). Values: OK, ERROR, UNSET", "title": "Status Code" }, "description": "Filter by status code(s). Values: OK, ERROR, UNSET" }, { "name": "attribute", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter spans by `key:value`. Key is a dot-path (e.g. `user.id`, `metadata.tier`). Value is JSON-parsed: `k:12345` is int, `k:true` is bool, otherwise string (`k:user-42`). To match a numeric- or boolean-looking STRING, JSON-quote it: `user.id:\"12345\"` (URL-encoded `%2212345%22`). Split is on the first `:` only, so values may contain colons (`session.id:sess:abc:123`, ISO timestamps). Repeat the param to AND filters. List-valued attributes (e.g. `tag.tags`) cannot be matched here. Returns 422 on malformed input (missing colon, empty key/value, or list/dict/null value).", "title": "Attribute" }, "description": "Filter spans by `key:value`. Key is a dot-path (e.g. `user.id`, `metadata.tier`). Value is JSON-parsed: `k:12345` is int, `k:true` is bool, otherwise string (`k:user-42`). To match a numeric- or boolean-looking STRING, JSON-quote it: `user.id:\"12345\"` (URL-encoded `%2212345%22`). Split is on the first `:` only, so values may contain colons (`session.id:sess:abc:123`, ISO timestamps). Repeat the param to AND filters. List-valued attributes (e.g. `tag.tags`) cannot be matched here. Returns 422 on malformed input (missing colon, empty key/value, or list/dict/null value)." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpansResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "spans" ], "summary": "Create spans", "description": "Submit spans to be inserted into a project. If any spans are invalid or duplicates, no spans will be inserted.", "operationId": "createSpans", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSpansRequestBody" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSpansResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "400": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Bad Request" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/span_annotations": { "post": { "tags": [ "spans" ], "summary": "Create span annotations", "operationId": "annotateSpans", "parameters": [ { "name": "sync", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, fulfill request synchronously.", "default": false, "title": "Sync" }, "description": "If true, fulfill request synchronously." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSpansRequestBody" } } } }, "responses": { "200": { "description": "Span annotations inserted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSpansResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Span not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/span_notes": { "post": { "tags": [ "spans" ], "summary": "Create a span note", "description": "Add a note annotation to a span. By default each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same span. Callers may supply a non-empty `identifier` to upsert on (span_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note, matching the semantics of structured annotations.", "operationId": "createSpanNote", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSpanNoteRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Span note created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSpanNoteResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "404": { "description": "Span not found", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/spans/{span_identifier}": { "delete": { "tags": [ "spans" ], "summary": "Delete a span by span_identifier", "description": "Delete a single span by identifier.\n\n **Important**: This operation deletes ONLY the specified span itself and does NOT\n delete its descendants/children. All child spans will remain in the trace and\n become orphaned (their parent_id will point to a non-existent span).\n\n Behavior:\n - Deletes only the target span (preserves all descendant spans)\n - If this was the last span in the trace, the trace record is also deleted\n - If the deleted span had a parent, its cumulative metrics (error count, token counts)\n are subtracted from all ancestor spans in the chain\n\n **Note**: This operation is irreversible and may create orphaned spans.", "operationId": "deleteSpan", "parameters": [ { "name": "span_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The span identifier: either a relay GlobalID or OpenTelemetry span_id", "title": "Span Identifier" }, "description": "The span identifier: either a relay GlobalID or OpenTelemetry span_id" } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/prompts": { "get": { "tags": [ "prompts" ], "summary": "List all prompts", "description": "Retrieve a paginated list of all prompts in the system. A prompt can have multiple versions.", "operationId": "getPrompts", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded prompt ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded prompt ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of prompts to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of prompts to return at a time." } ], "responses": { "200": { "description": "A list of prompts with pagination information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "prompts" ], "summary": "Create a new prompt", "description": "Create a new prompt and its initial version. A prompt can have multiple versions.", "operationId": "postPromptVersion", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePromptRequestBody" } } } }, "responses": { "200": { "description": "The newly created prompt version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePromptResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompts/{prompt_identifier}/versions": { "get": { "tags": [ "prompts" ], "summary": "List prompt versions", "description": "Retrieve all versions of a specific prompt with pagination support. Each prompt can have multiple versions with different configurations.", "operationId": "listPromptVersions", "parameters": [ { "name": "prompt_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The identifier of the prompt, i.e. name or ID.", "title": "Prompt Identifier" }, "description": "The identifier of the prompt, i.e. name or ID." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded promptVersion ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded promptVersion ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of prompt versions to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of prompt versions to return at a time." } ], "responses": { "200": { "description": "A list of prompt versions with pagination information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptVersionsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" } } } }, "/v1/prompt_versions/{prompt_version_id}": { "get": { "tags": [ "prompts" ], "summary": "Get prompt version by ID", "description": "Retrieve a specific prompt version using its unique identifier. A prompt version contains the actual template and configuration.", "operationId": "getPromptVersionByPromptVersionId", "parameters": [ { "name": "prompt_version_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the prompt version.", "title": "Prompt Version Id" }, "description": "The ID of the prompt version." } ], "responses": { "200": { "description": "The requested prompt version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompts/{prompt_identifier}/tags/{tag_name}": { "get": { "tags": [ "prompts" ], "summary": "Get prompt version by tag", "description": "Retrieve a specific prompt version using its tag name. Tags are used to identify specific versions of a prompt.", "operationId": "getPromptVersionByTagName", "parameters": [ { "name": "prompt_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The identifier of the prompt, i.e. name or ID.", "title": "Prompt Identifier" }, "description": "The identifier of the prompt, i.e. name or ID." }, { "name": "tag_name", "in": "path", "required": true, "schema": { "type": "string", "description": "The tag of the prompt version", "title": "Tag Name" }, "description": "The tag of the prompt version" } ], "responses": { "200": { "description": "The prompt version with the specified tag", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompts/{prompt_identifier}/latest": { "get": { "tags": [ "prompts" ], "summary": "Get latest prompt version", "description": "Retrieve the most recent version of a specific prompt.", "operationId": "getPromptVersionLatest", "parameters": [ { "name": "prompt_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The identifier of the prompt, i.e. name or ID.", "title": "Prompt Identifier" }, "description": "The identifier of the prompt, i.e. name or ID." } ], "responses": { "200": { "description": "The latest version of the specified prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompt_versions/{prompt_version_id}/tags": { "get": { "tags": [ "prompts" ], "summary": "List prompt version tags", "description": "Retrieve all tags associated with a specific prompt version. Tags are used to identify and categorize different versions of a prompt.", "operationId": "getPromptVersionTags", "parameters": [ { "name": "prompt_version_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the prompt version.", "title": "Prompt Version Id" }, "description": "The ID of the prompt version." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (base64-encoded promptVersionTag ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded promptVersionTag ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of tags to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of tags to return at a time." } ], "responses": { "200": { "description": "A list of tags associated with the prompt version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPromptVersionTagsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "prompts" ], "summary": "Add tag to prompt version", "description": "Add a new tag to a specific prompt version. Tags help identify and categorize different versions of a prompt.", "operationId": "createPromptVersionTag", "parameters": [ { "name": "prompt_version_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the prompt version.", "title": "Prompt Version Id" }, "description": "The ID of the prompt version." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromptVersionTagData" } } } }, "responses": { "204": { "description": "No content returned on successful tag creation" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompt_versions/{prompt_version_id}/tags/{tag_name}": { "delete": { "tags": [ "prompts" ], "summary": "Delete a tag from a prompt version", "description": "Delete a tag from a specific prompt version by tag name. The tag is resolved within the scope of the prompt linked to the version.", "operationId": "deletePromptVersionTag", "parameters": [ { "name": "prompt_version_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the prompt version.", "title": "Prompt Version Id" }, "description": "The ID of the prompt version." }, { "name": "tag_name", "in": "path", "required": true, "schema": { "type": "string", "description": "The name of the tag to delete.", "title": "Tag Name" }, "description": "The name of the tag to delete." } ], "responses": { "204": { "description": "No content returned on successful tag deletion" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/prompts/{prompt_identifier}": { "delete": { "tags": [ "prompts" ], "summary": "Delete a prompt", "description": "Delete a prompt and all its versions, tags, and labels by identifier.", "operationId": "deletePrompt", "parameters": [ { "name": "prompt_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The identifier of the prompt, i.e. name or ID.", "title": "Prompt Identifier" }, "description": "The identifier of the prompt, i.e. name or ID." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/projects": { "get": { "tags": [ "projects" ], "summary": "List all projects", "description": "Retrieve a paginated list of all projects in the system.", "operationId": "getProjects", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (project ID)", "title": "Cursor" }, "description": "Cursor for pagination (project ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of projects to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of projects to return at a time." }, { "name": "include_experiment_projects", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include experiment projects in the response. Experiment projects are created from running experiments.", "default": false, "title": "Include Experiment Projects" }, "description": "Include experiment projects in the response. Experiment projects are created from running experiments." }, { "name": "include_dataset_evaluator_projects", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include dataset evaluator projects in the response. Dataset evaluator projects are created when running experiments with persisted evaluators.", "default": false, "title": "Include Dataset Evaluator Projects" }, "description": "Include dataset evaluator projects in the response. Dataset evaluator projects are created when running experiments with persisted evaluators." }, { "name": "name_contains", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Return only projects whose name contains this substring (case-insensitive).", "title": "Name Contains" }, "description": "Return only projects whose name contains this substring (case-insensitive)." } ], "responses": { "200": { "description": "A list of projects with pagination information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetProjectsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "projects" ], "summary": "Create a new project", "description": "Create a new project with the specified configuration.", "operationId": "createProject", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProjectRequestBody" } } } }, "responses": { "200": { "description": "The newly created project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProjectResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/projects/{project_identifier}": { "get": { "tags": [ "projects" ], "summary": "Get project by ID or name", "description": "Retrieve a specific project using its unique identifier: either project ID or project name. Note: When using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "operationId": "getProject", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." } ], "responses": { "200": { "description": "The requested project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetProjectResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "put": { "tags": [ "projects" ], "summary": "Update a project by ID or name", "description": "Update an existing project with new configuration. Project names cannot be changed. The project identifier is either project ID or project name. Note: When using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "operationId": "updateProject", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProjectRequestBody" } } } }, "responses": { "200": { "description": "The updated project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProjectResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "delete": { "tags": [ "projects" ], "summary": "Delete a project by ID or name", "description": "Delete an existing project and all its associated data. The project identifier is either project ID or project name. The default project cannot be deleted. Note: When using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "operationId": "deleteProject", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters." } ], "responses": { "204": { "description": "No content returned on successful deletion" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/sessions/{session_identifier}": { "get": { "tags": [ "sessions" ], "summary": "Get session by ID or session_id", "operationId": "getSession", "parameters": [ { "name": "session_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The session identifier: either a GlobalID or user-provided session_id string.", "title": "Session Identifier" }, "description": "The session identifier: either a GlobalID or user-provided session_id string." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSessionResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "delete": { "tags": [ "sessions" ], "summary": "Delete a session by identifier", "description": "Delete a session by its identifier. The identifier can be either:\n1. A global ID (base64-encoded)\n2. A user-provided session_id string\n\nThis will permanently remove the session and all associated traces, spans, and annotations via cascade delete.", "operationId": "deleteSession", "parameters": [ { "name": "session_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The session identifier: either a GlobalID or user-provided session_id string.", "title": "Session Identifier" }, "description": "The session identifier: either a GlobalID or user-provided session_id string." } ], "responses": { "204": { "description": "Successful Response" }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sessions/delete": { "post": { "tags": [ "sessions" ], "summary": "Bulk delete sessions", "description": "Delete multiple sessions by their identifiers (GlobalIDs or session_id strings). All identifiers in a single request must be the same type. Non-existent IDs are silently skipped. All associated traces, spans, and annotations are cascade deleted.", "operationId": "deleteSessions", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteSessionsRequestBody" } } }, "required": true }, "responses": { "204": { "description": "Successful Response" }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Unprocessable Entity", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/v1/projects/{project_identifier}/sessions": { "get": { "tags": [ "sessions" ], "summary": "List sessions for a project", "operationId": "listProjectSessions", "parameters": [ { "name": "project_identifier", "in": "path", "required": true, "schema": { "type": "string", "description": "The project identifier: either project ID or project name.", "title": "Project Identifier" }, "description": "The project identifier: either project ID or project name." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (session ID)", "title": "Cursor" }, "description": "Cursor for pagination (session ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of sessions to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of sessions to return at a time." }, { "name": "order", "in": "query", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string", "description": "Sort order by ID: 'asc' (ascending) or 'desc' (descending).", "default": "asc", "title": "Order" }, "description": "Sort order by ID: 'asc' (ascending) or 'desc' (descending)." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSessionsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Not Found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/session_annotations": { "post": { "tags": [ "sessions" ], "summary": "Create session annotations", "operationId": "annotateSessions", "parameters": [ { "name": "sync", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If true, fulfill request synchronously.", "default": false, "title": "Sync" }, "description": "If true, fulfill request synchronously." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSessionsRequestBody" } } } }, "responses": { "200": { "description": "Session annotations inserted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSessionsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Session not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/session_notes": { "post": { "tags": [ "sessions" ], "summary": "Create a session note", "description": "Add a note annotation to a session. By default each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same session. Callers may supply a non-empty `identifier` to upsert on (session_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note, matching the semantics of structured annotations.", "operationId": "createSessionNote", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionNoteRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Session note created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionNoteResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "404": { "description": "Session not found", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/document_annotations": { "post": { "tags": [ "spans" ], "summary": "Create span document annotations", "operationId": "annotateSpanDocuments", "parameters": [ { "name": "sync", "in": "query", "required": false, "schema": { "type": "boolean", "description": "If set to true, the annotations are inserted synchronously.", "default": false, "title": "Sync" }, "description": "If set to true, the annotations are inserted synchronously." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSpanDocumentsRequestBody" } } } }, "responses": { "200": { "description": "Span document annotation inserted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateSpanDocumentsResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Span not found" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Invalid request - non-empty identifier not supported" } } } }, "/v1/user": { "get": { "tags": [ "users" ], "summary": "Get the authenticated user", "description": "Returns the profile of the currently authenticated user. When authentication is disabled, returns an anonymous user representation.", "operationId": "getViewer", "responses": { "200": { "description": "The authenticated user's profile.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetViewerResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "401": { "description": "User not found.", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/v1/users": { "get": { "tags": [ "users" ], "summary": "List all users", "description": "Retrieve a paginated list of all users in the system.", "operationId": "getUsers", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "description": "Cursor for pagination (base64-encoded user ID)", "title": "Cursor" }, "description": "Cursor for pagination (base64-encoded user ID)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "description": "The max number of users to return at a time.", "default": 100, "title": "Limit" }, "description": "The max number of users to return at a time." } ], "responses": { "200": { "description": "A list of users.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetUsersResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } }, "post": { "tags": [ "users" ], "summary": "Create a new user", "description": "Create a new user with the specified configuration.", "operationId": "createUser", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequestBody" } } } }, "responses": { "201": { "description": "The newly created user.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "400": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Role not found." }, "409": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Username or email already exists." }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/users/{user_id}": { "delete": { "tags": [ "users" ], "summary": "Delete a user by ID", "description": "Delete an existing user by their unique GlobalID.", "operationId": "deleteUser", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The GlobalID of the user (e.g. 'VXNlcjox').", "title": "User Id" }, "description": "The GlobalID of the user (e.g. 'VXNlcjox')." } ], "responses": { "204": { "description": "No content returned on successful deletion." }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Cannot delete the default admin or system user" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "User not found." }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/secrets": { "put": { "tags": [ "secrets" ], "summary": "Upsert or delete secrets", "description": "Atomically upsert or delete a batch of secrets. Entries with a non-null `value` are created or updated; entries with `value: null` are deleted. The `value` field is required for every entry, and omitting it returns 422. When the same key appears more than once, the last occurrence wins. Deleting a non-existent key succeeds silently. Secret values are never returned in the response.", "operationId": "upsertOrDeleteSecrets", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertOrDeleteSecretsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponseBody_UpsertOrDeleteSecretsResult_" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Unprocessable Entity", "content": { "text/plain": { "schema": { "type": "string" } } } }, "507": { "description": "Insufficient Storage", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/v1/user/api_keys": { "get": { "tags": [ "api_keys" ], "summary": "List the authenticated user's API keys", "description": "Retrieve the API keys belonging to the currently authenticated user. The keys themselves are not recoverable and are never included in the response.", "operationId": "getUserApiKeys", "responses": { "200": { "description": "The authenticated user's API keys.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetApiKeysResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "post": { "tags": [ "api_keys" ], "summary": "Create an API key for the authenticated user", "description": "Create a personal API key for the currently authenticated user. The key inherits the user's role, so it grants no more access than the user already has. Creation requires an access-token session; API keys cannot mint replacement keys. The response contains the key itself, which is shown only once and cannot be retrieved afterwards.", "operationId": "createUserApiKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyRequestBody" } } }, "required": true }, "responses": { "201": { "description": "The newly created API key, including the key itself.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Unprocessable Entity", "content": { "text/plain": { "schema": { "type": "string" } } } }, "507": { "description": "Insufficient Storage", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/v1/users/api_keys": { "get": { "tags": [ "api_keys" ], "summary": "List all user API keys", "description": "Retrieve API keys belonging to human users across the organization. System API keys are excluded. Restricted to admins.", "operationId": "getAllUserApiKeys", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Cursor for pagination (a UserApiKey GlobalID).", "title": "Cursor" }, "description": "Cursor for pagination (a UserApiKey GlobalID)." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "exclusiveMinimum": 0, "description": "The maximum number of API keys to return (at most 1000).", "default": 100, "title": "Limit" }, "description": "The maximum number of API keys to return (at most 1000)." } ], "responses": { "200": { "description": "A paginated list of user API keys and their owners.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAllUserApiKeysResponseBody" } } } }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "401": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unauthorized" }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/user/api_keys/{api_key_id}": { "delete": { "tags": [ "api_keys" ], "summary": "Delete a user API key", "description": "Permanently revoke a user API key. Users can revoke their own keys, and admins can revoke keys belonging to other users. The key stops working immediately.", "operationId": "deleteUserApiKey", "parameters": [ { "name": "api_key_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The GlobalID of the API key.", "title": "Api Key Id" }, "description": "The GlobalID of the API key." } ], "responses": { "204": { "description": "No content returned on successful deletion." }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "401": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unauthorized" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "API key not found." }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/v1/system/api_keys": { "get": { "tags": [ "api_keys" ], "summary": "List system API keys", "description": "Retrieve all system API keys. System keys belong to the system user rather than to any human, so this endpoint is restricted to admins. The keys themselves are not recoverable and are never included in the response.", "operationId": "getSystemApiKeys", "responses": { "200": { "description": "The system API keys.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetApiKeysResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "post": { "tags": [ "api_keys" ], "summary": "Create a system API key", "description": "Create a system API key. System keys belong to the system user rather than to any human, so this endpoint is restricted to admins. Creation requires an admin access-token session or the configured admin secret; API keys cannot mint keys. The response contains the key itself, which is shown only once and cannot be retrieved afterwards.", "operationId": "createSystemApiKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyRequestBody" } } }, "required": true }, "responses": { "201": { "description": "The newly created system API key, including the key itself.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyResponseBody" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "type": "string" } } } }, "422": { "description": "Unprocessable Entity", "content": { "text/plain": { "schema": { "type": "string" } } } }, "507": { "description": "Insufficient Storage", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/v1/system/api_keys/{api_key_id}": { "delete": { "tags": [ "api_keys" ], "summary": "Delete a system API key", "description": "Permanently revoke a system API key. The key stops working immediately. Restricted to admins.", "operationId": "deleteSystemApiKey", "parameters": [ { "name": "api_key_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The GlobalID of the system API key.", "title": "Api Key Id" }, "description": "The GlobalID of the system API key." } ], "responses": { "204": { "description": "No content returned on successful deletion." }, "403": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Forbidden" }, "401": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unauthorized" }, "404": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "System API key not found." }, "422": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Unprocessable Entity" } } } }, "/auth/login": { "post": { "summary": " Login", "description": "Authenticate user via email/password and return access/refresh tokens.", "operationId": "_login_auth_login_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/auth/logout": { "get": { "summary": " Logout", "description": "Log out user by revoking tokens and clearing cookies.", "operationId": "_logout_auth_logout_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/auth/refresh": { "post": { "summary": " Refresh Tokens", "description": "Refresh access and refresh tokens.", "operationId": "_refresh_tokens_auth_refresh_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/auth/password-reset-email": { "post": { "summary": " Initiate Password Reset", "description": "Send password reset email to user.", "operationId": "_initiate_password_reset_auth_password_reset_email_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/auth/password-reset": { "post": { "summary": " Reset Password", "description": "Reset user password using a valid reset token.", "operationId": "_reset_password_auth_password_reset_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/auth/ldap/login": { "post": { "summary": " Ldap Login", "description": "Authenticate user via LDAP and return access/refresh tokens.", "operationId": "_ldap_login_auth_ldap_login_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/oauth2/{idp_name}/login": { "post": { "summary": "Login", "operationId": "login_oauth2__idp_name__login_post", "parameters": [ { "name": "idp_name", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "[a-z0-9_]+", "title": "Idp Name" } }, { "name": "returnUrl", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Returnurl" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "Login", "operationId": "login_oauth2__idp_name__login_get", "parameters": [ { "name": "idp_name", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "[a-z0-9_]+", "title": "Idp Name" } }, { "name": "returnUrl", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Returnurl" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/oauth2/{idp_name}/tokens": { "get": { "summary": "Create Tokens", "operationId": "create_tokens_oauth2__idp_name__tokens_get", "parameters": [ { "name": "idp_name", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "[a-z0-9_]+", "title": "Idp Name" } }, { "name": "state", "in": "query", "required": true, "schema": { "type": "string", "title": "State" } }, { "name": "code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code" } }, { "name": "error", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, { "name": "error_description", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Description" } }, { "name": "phoenix-oauth2-state", "in": "cookie", "required": true, "schema": { "type": "string", "title": "Phoenix-Oauth2-State" } }, { "name": "phoenix-oauth2-nonce", "in": "cookie", "required": true, "schema": { "type": "string", "title": "Phoenix-Oauth2-Nonce" } }, { "name": "phoenix-oauth2-code-verifier", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phoenix-Oauth2-Code-Verifier" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/agents/server/sessions/{session_id}/chat": { "post": { "tags": [ "chat" ], "summary": "Run Server Agent", "description": "Stream a chat turn from the GraphQL server agent.\n\nThis is the endpoint the PXI CLI talks to directly (no pre-configured\nagent record): it builds a fresh server agent per request from the\ncaller-supplied model and contexts, then streams the reply back as\nVercel-AI chunks.\n\nThe request contexts gate capabilities \u2014 GraphQL mutations, web access,\nand subagents \u2014 and mutations are refused for viewer users. When trace\nrecording is enabled (and permitted by system settings), the run is\ntraced; locally ingested traces are persisted to the agent's project\nonce the stream completes.\n\nReturns ``403`` if agents or the server agent are disabled, or if a\nviewer requests mutations.", "operationId": "run_server_agent_agents_server_sessions__session_id__chat_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/agents/{agent_id}/sessions/{session_id}/chat": { "post": { "tags": [ "chat" ], "summary": "Chat", "operationId": "chat_agents__agent_id__sessions__session_id__chat_post", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Id" } }, { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/agents/{agent_id}/sessions/{session_id}/summary": { "post": { "tags": [ "chat" ], "summary": "Summarize Endpoint", "operationId": "summarize_endpoint_agents__agent_id__sessions__session_id__summary_post", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Agent Id" } }, { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_SummarizeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/_SummarizeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/arize_phoenix_version": { "get": { "summary": "Version", "operationId": "version_arize_phoenix_version_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/healthz": { "get": { "summary": "Check Healthz", "operationId": "check_healthz_healthz_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/readyz": { "get": { "summary": "Check Readyz", "operationId": "check_readyz_readyz_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "AddDatasetLabelToDatasetResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/DatasetLabel" } }, "type": "object", "required": [ "data" ], "title": "AddDatasetLabelToDatasetResponseBody" }, "AgentSpanContext": { "properties": { "type": { "type": "string", "const": "span", "title": "Type" }, "projectNodeId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Projectnodeid" }, "spanNodeId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Spannodeid" }, "otelSpanId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Otelspanid" } }, "type": "object", "required": [ "type" ], "title": "AgentSpanContext", "description": "Span the user has selected.\n\nExactly one of ``span_node_id`` (relay) or ``otel_span_id`` (OpenTelemetry\nhex) must be set. ``project_node_id`` is optional because a span can be\nselected from views outside a project route." }, "AnnotateSessionsRequestBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SessionAnnotationData" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSessionsRequestBody" }, "AnnotateSessionsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/InsertedSessionAnnotation" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSessionsResponseBody" }, "AnnotateSpanDocumentsRequestBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SpanDocumentAnnotationData" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSpanDocumentsRequestBody" }, "AnnotateSpanDocumentsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/InsertedSpanDocumentAnnotation" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSpanDocumentsResponseBody" }, "AnnotateSpansRequestBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SpanAnnotationData" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSpansRequestBody" }, "AnnotateSpansResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/InsertedSpanAnnotation" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateSpansResponseBody" }, "AnnotateTracesRequestBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/TraceAnnotationData" }, "type": "array", "title": "Data", "description": "The trace annotations to be upserted" } }, "type": "object", "required": [ "data" ], "title": "AnnotateTracesRequestBody" }, "AnnotateTracesResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/InsertedTraceAnnotation" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "AnnotateTracesResponseBody" }, "AnnotationResult": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label", "description": "The label assigned by the annotation" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score", "description": "The score assigned by the annotation" }, "explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Explanation", "description": "Explanation of the annotation result" } }, "type": "object", "title": "AnnotationResult" }, "AnonymousUser": { "properties": { "auth_method": { "type": "string", "const": "ANONYMOUS", "title": "Auth Method" } }, "type": "object", "required": [ "auth_method" ], "title": "AnonymousUser" }, "ApiKey": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" } }, "type": "object", "required": [ "id", "name", "created_at" ], "title": "ApiKey" }, "ApiKeyData": { "properties": { "name": { "type": "string", "title": "Name", "description": "A human-readable name for the API key." }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "An optional description of what the API key is for." }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At", "description": "When the API key expires. The key never expires when omitted." } }, "type": "object", "required": [ "name" ], "title": "ApiKeyData" }, "ApiKeyUser": { "properties": { "id": { "type": "string", "title": "Id" }, "username": { "type": "string", "title": "Username" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" } }, "type": "object", "required": [ "id", "username", "email" ], "title": "ApiKeyUser" }, "AppContext": { "properties": { "type": { "type": "string", "const": "app", "title": "Type" }, "currentDateTime": { "type": "string", "title": "Currentdatetime" }, "timeZone": { "type": "string", "title": "Timezone" } }, "type": "object", "required": [ "type", "currentDateTime", "timeZone" ], "title": "AppContext", "description": "Per-turn browser clock context for resolving relative time requests." }, "AssignAnnotationConfigToProjectResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "title": "Data", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } } }, "type": "object", "required": [ "data" ], "title": "AssignAnnotationConfigToProjectResponseBody" }, "AssistantMessageMetadata": { "properties": { "type": { "type": "string", "const": "assistant", "title": "Type", "default": "assistant" }, "sessionId": { "type": "string", "title": "Sessionid" }, "trace": { "anyOf": [ { "$ref": "#/components/schemas/AssistantMessageMetadataTraceIds" }, { "type": "null" } ] }, "turnTraceContext": { "anyOf": [ { "$ref": "#/components/schemas/TurnTraceContext" }, { "type": "null" } ] }, "usage": { "anyOf": [ { "$ref": "#/components/schemas/AssistantMessageMetadataUsage" }, { "type": "null" } ] } }, "type": "object", "required": [ "sessionId" ], "title": "AssistantMessageMetadata", "description": "Wire schema for the chat stream's `message_metadata` payload." }, "AssistantMessageMetadataTraceIds": { "properties": { "traceId": { "type": "string", "title": "Traceid" }, "rootSpanId": { "type": "string", "title": "Rootspanid" } }, "type": "object", "required": [ "traceId", "rootSpanId" ], "title": "AssistantMessageMetadataTraceIds" }, "AssistantMessageMetadataUsage": { "properties": { "tokens": { "$ref": "#/components/schemas/AssistantMessageMetadataUsageTokens" }, "promptDetails": { "anyOf": [ { "$ref": "#/components/schemas/AssistantMessageMetadataUsageTokenDetails" }, { "type": "null" } ] } }, "type": "object", "required": [ "tokens" ], "title": "AssistantMessageMetadataUsage" }, "AssistantMessageMetadataUsageTokenDetails": { "properties": { "cacheRead": { "type": "integer", "title": "Cacheread" }, "cacheWrite": { "type": "integer", "title": "Cachewrite" } }, "type": "object", "required": [ "cacheRead", "cacheWrite" ], "title": "AssistantMessageMetadataUsageTokenDetails" }, "AssistantMessageMetadataUsageTokens": { "properties": { "prompt": { "type": "integer", "title": "Prompt" }, "completion": { "type": "integer", "title": "Completion" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "prompt", "completion", "total" ], "title": "AssistantMessageMetadataUsageTokens" }, "BuiltInProviderModelSelection": { "properties": { "providerType": { "type": "string", "const": "builtin", "title": "Providertype" }, "provider": { "$ref": "#/components/schemas/ModelProvider" }, "modelName": { "type": "string", "title": "Modelname" }, "openaiApiType": { "type": "string", "enum": [ "chat_completions", "responses" ], "title": "Openaiapitype", "default": "responses" } }, "type": "object", "required": [ "providerType", "provider", "modelName" ], "title": "BuiltInProviderModelSelection", "description": "Chat against a Phoenix built-in provider.\n\nCredentials and connection details (base URL, Azure endpoint, AWS\nregion) are resolved from the secret store first and the process\nenvironment second. ``openai_api_type`` is honoured by the OpenAI and\nAzure OpenAI branches; other providers ignore it." }, "CategoricalAnnotationConfig": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "CATEGORICAL", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "$ref": "#/components/schemas/OptimizationDirection" }, "values": { "items": { "$ref": "#/components/schemas/CategoricalAnnotationValue" }, "type": "array", "title": "Values" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "type", "optimization_direction", "values", "id" ], "title": "CategoricalAnnotationConfig" }, "CategoricalAnnotationConfigData": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "CATEGORICAL", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "$ref": "#/components/schemas/OptimizationDirection" }, "values": { "items": { "$ref": "#/components/schemas/CategoricalAnnotationValue" }, "type": "array", "title": "Values" } }, "type": "object", "required": [ "name", "type", "optimization_direction", "values" ], "title": "CategoricalAnnotationConfigData" }, "CategoricalAnnotationValue": { "properties": { "label": { "type": "string", "title": "Label" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" } }, "type": "object", "required": [ "label" ], "title": "CategoricalAnnotationValue" }, "ChatContext": { "oneOf": [ { "$ref": "#/components/schemas/AppContext" }, { "$ref": "#/components/schemas/ProjectContext" }, { "$ref": "#/components/schemas/TraceContext" }, { "$ref": "#/components/schemas/SessionContext" }, { "$ref": "#/components/schemas/PromptContext" }, { "$ref": "#/components/schemas/PromptVersionContext" }, { "$ref": "#/components/schemas/AgentSpanContext" }, { "$ref": "#/components/schemas/PlaygroundContext" }, { "$ref": "#/components/schemas/CodeEvaluatorContext" }, { "$ref": "#/components/schemas/LlmEvaluatorContext" }, { "$ref": "#/components/schemas/DatasetContext" }, { "$ref": "#/components/schemas/GraphQLContext" }, { "$ref": "#/components/schemas/WebAccessContext" }, { "$ref": "#/components/schemas/SubagentsContext" } ], "title": "ChatContext", "description": "Discriminated union of every UI-state context the agent understands.", "discriminator": { "propertyName": "type", "mapping": { "app": "#/components/schemas/AppContext", "code_evaluator": "#/components/schemas/CodeEvaluatorContext", "dataset": "#/components/schemas/DatasetContext", "graphql": "#/components/schemas/GraphQLContext", "llm_evaluator": "#/components/schemas/LlmEvaluatorContext", "playground": "#/components/schemas/PlaygroundContext", "project": "#/components/schemas/ProjectContext", "prompt": "#/components/schemas/PromptContext", "prompt_version": "#/components/schemas/PromptVersionContext", "session": "#/components/schemas/SessionContext", "span": "#/components/schemas/AgentSpanContext", "subagents": "#/components/schemas/SubagentsContext", "trace": "#/components/schemas/TraceContext", "web_access": "#/components/schemas/WebAccessContext" } } }, "ChatRegenerateMessage": { "properties": { "trigger": { "type": "string", "const": "regenerate-message", "title": "Trigger" }, "id": { "type": "string", "title": "Id" }, "messages": { "items": { "$ref": "#/components/schemas/PhoenixUIMessage" }, "type": "array", "title": "Messages" }, "messageId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Messageid" }, "ingestTraces": { "type": "boolean", "title": "Ingesttraces", "default": false }, "exportRemoteTraces": { "type": "boolean", "title": "Exportremotetraces", "default": false }, "attachUserId": { "type": "boolean", "title": "Attachuserid", "description": "When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.", "default": false }, "contexts": { "items": { "$ref": "#/components/schemas/ChatContext" }, "type": "array", "title": "Contexts" }, "editPermission": { "type": "string", "enum": [ "manual", "bypass" ], "title": "Editpermission", "default": "manual" }, "requestedSkills": { "items": { "type": "string" }, "type": "array", "title": "Requestedskills", "description": "Skills the user explicitly requested via the prompt's slash-command affordance. The server force-loads each available skill by injecting a synthetic load_skill tool call/result at the tail of the message history. Unknown or context-unavailable names are ignored." }, "model": { "oneOf": [ { "$ref": "#/components/schemas/CustomProviderModelSelection" }, { "$ref": "#/components/schemas/BuiltInProviderModelSelection" } ], "title": "Model", "discriminator": { "propertyName": "providerType", "mapping": { "builtin": "#/components/schemas/BuiltInProviderModelSelection", "custom": "#/components/schemas/CustomProviderModelSelection" } } }, "turnTraceContext": { "anyOf": [ { "$ref": "#/components/schemas/TurnTraceContext" }, { "type": "null" } ] } }, "additionalProperties": true, "type": "object", "required": [ "trigger", "id", "messages", "model" ], "title": "ChatRegenerateMessage", "description": "Regenerate message extended with Phoenix-specific fields." }, "ChatRequest": { "oneOf": [ { "$ref": "#/components/schemas/ChatSubmitMessage" }, { "$ref": "#/components/schemas/ChatRegenerateMessage" } ], "title": "ChatRequest", "description": "Discriminated union of chat request payloads.", "discriminator": { "propertyName": "trigger", "mapping": { "regenerate-message": "#/components/schemas/ChatRegenerateMessage", "submit-message": "#/components/schemas/ChatSubmitMessage" } } }, "ChatSubmitMessage": { "properties": { "trigger": { "type": "string", "const": "submit-message", "title": "Trigger", "default": "submit-message" }, "id": { "type": "string", "title": "Id" }, "messages": { "items": { "$ref": "#/components/schemas/PhoenixUIMessage" }, "type": "array", "title": "Messages" }, "ingestTraces": { "type": "boolean", "title": "Ingesttraces", "default": false }, "exportRemoteTraces": { "type": "boolean", "title": "Exportremotetraces", "default": false }, "attachUserId": { "type": "boolean", "title": "Attachuserid", "description": "When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.", "default": false }, "contexts": { "items": { "$ref": "#/components/schemas/ChatContext" }, "type": "array", "title": "Contexts" }, "editPermission": { "type": "string", "enum": [ "manual", "bypass" ], "title": "Editpermission", "default": "manual" }, "requestedSkills": { "items": { "type": "string" }, "type": "array", "title": "Requestedskills", "description": "Skills the user explicitly requested via the prompt's slash-command affordance. The server force-loads each available skill by injecting a synthetic load_skill tool call/result at the tail of the message history. Unknown or context-unavailable names are ignored." }, "model": { "oneOf": [ { "$ref": "#/components/schemas/CustomProviderModelSelection" }, { "$ref": "#/components/schemas/BuiltInProviderModelSelection" } ], "title": "Model", "discriminator": { "propertyName": "providerType", "mapping": { "builtin": "#/components/schemas/BuiltInProviderModelSelection", "custom": "#/components/schemas/CustomProviderModelSelection" } } }, "turnTraceContext": { "anyOf": [ { "$ref": "#/components/schemas/TurnTraceContext" }, { "type": "null" } ] } }, "additionalProperties": true, "type": "object", "required": [ "id", "messages", "model" ], "title": "ChatSubmitMessage", "description": "Submit message extended with Phoenix-specific fields." }, "CodeEvaluatorContext": { "properties": { "type": { "type": "string", "const": "code_evaluator", "title": "Type" }, "evaluatorNodeId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Evaluatornodeid" } }, "type": "object", "required": [ "type" ], "title": "CodeEvaluatorContext", "description": "Code-evaluator create/edit form mounted in the current browser route." }, "ContinuousAnnotationConfig": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "CONTINUOUS", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "$ref": "#/components/schemas/OptimizationDirection" }, "lower_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Lower Bound" }, "upper_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Upper Bound" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "type", "optimization_direction", "id" ], "title": "ContinuousAnnotationConfig" }, "ContinuousAnnotationConfigData": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "CONTINUOUS", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "$ref": "#/components/schemas/OptimizationDirection" }, "lower_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Lower Bound" }, "upper_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Upper Bound" } }, "type": "object", "required": [ "name", "type", "optimization_direction" ], "title": "ContinuousAnnotationConfigData" }, "CreateAnnotationConfigData": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfigData" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfigData" }, { "$ref": "#/components/schemas/FreeformAnnotationConfigData" } ], "title": "CreateAnnotationConfigData", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfigData", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfigData", "FREEFORM": "#/components/schemas/FreeformAnnotationConfigData" } } }, "CreateAnnotationConfigResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "title": "Data", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } } }, "type": "object", "required": [ "data" ], "title": "CreateAnnotationConfigResponseBody" }, "CreateApiKeyRequestBody": { "properties": { "data": { "$ref": "#/components/schemas/ApiKeyData" } }, "type": "object", "required": [ "data" ], "title": "CreateApiKeyRequestBody" }, "CreateApiKeyResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/CreatedApiKey" } }, "type": "object", "required": [ "data" ], "title": "CreateApiKeyResponseBody" }, "CreateDatasetLabelRequestBody": { "properties": { "name": { "type": "string", "minLength": 1, "title": "Name", "description": "The name of the dataset label" }, "color": { "type": "string", "pattern": "^#([0-9a-f]{6})$", "title": "Color", "description": "A lowercase hex color code (e.g. '#00cc88') used to display the label" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "An optional description of the dataset label" } }, "type": "object", "required": [ "name", "color" ], "title": "CreateDatasetLabelRequestBody" }, "CreateDatasetLabelResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/DatasetLabel" } }, "type": "object", "required": [ "data" ], "title": "CreateDatasetLabelResponseBody" }, "CreateExperimentRequestBody": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "Name of the experiment (if omitted, a random name will be generated)" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "An optional description of the experiment" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the experiment" }, "version_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version Id", "description": "ID of the dataset version over which the experiment will be run (if omitted, the latest version will be used)" }, "splits": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Splits", "description": "List of dataset split identifiers (GlobalIDs or names) to filter by" }, "repetitions": { "type": "integer", "title": "Repetitions", "description": "Number of times the experiment should be repeated for each example", "default": 1 } }, "type": "object", "title": "CreateExperimentRequestBody", "description": "Details of the experiment to be created" }, "CreateExperimentResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Experiment" } }, "type": "object", "required": [ "data" ], "title": "CreateExperimentResponseBody" }, "CreateExperimentRunRequestBody": { "properties": { "dataset_example_id": { "type": "string", "title": "Dataset Example Id", "description": "The ID of the dataset example used in the experiment run" }, "output": { "title": "Output", "description": "The output of the experiment task" }, "repetition_number": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Repetition Number", "description": "The repetition number of the experiment run" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "The start time of the experiment run" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "The end time of the experiment run" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id", "description": "The ID of the corresponding trace (if one exists)" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error", "description": "Optional error message if the experiment run encountered an error" } }, "type": "object", "required": [ "dataset_example_id", "output", "repetition_number", "start_time", "end_time" ], "title": "CreateExperimentRunRequestBody" }, "CreateExperimentRunResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/CreateExperimentRunResponseBodyData" } }, "type": "object", "required": [ "data" ], "title": "CreateExperimentRunResponseBody" }, "CreateExperimentRunResponseBodyData": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the newly created experiment run" } }, "type": "object", "required": [ "id" ], "title": "CreateExperimentRunResponseBodyData" }, "CreateProjectRequestBody": { "properties": { "name": { "type": "string", "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name" ], "title": "CreateProjectRequestBody" }, "CreateProjectResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Project" } }, "type": "object", "required": [ "data" ], "title": "CreateProjectResponseBody" }, "CreatePromptRequestBody": { "properties": { "prompt": { "$ref": "#/components/schemas/PromptData" }, "version": { "$ref": "#/components/schemas/PromptVersionData" } }, "type": "object", "required": [ "prompt", "version" ], "title": "CreatePromptRequestBody" }, "CreatePromptResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/PromptVersion" } }, "type": "object", "required": [ "data" ], "title": "CreatePromptResponseBody" }, "CreateSessionNoteRequestBody": { "properties": { "data": { "$ref": "#/components/schemas/SessionNoteData" } }, "type": "object", "required": [ "data" ], "title": "CreateSessionNoteRequestBody" }, "CreateSessionNoteResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/InsertedSessionAnnotation" } }, "type": "object", "required": [ "data" ], "title": "CreateSessionNoteResponseBody" }, "CreateSpanNoteRequestBody": { "properties": { "data": { "$ref": "#/components/schemas/SpanNoteData" } }, "type": "object", "required": [ "data" ], "title": "CreateSpanNoteRequestBody" }, "CreateSpanNoteResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/InsertedSpanAnnotation" } }, "type": "object", "required": [ "data" ], "title": "CreateSpanNoteResponseBody" }, "CreateSpansRequestBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Span" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "CreateSpansRequestBody" }, "CreateSpansResponseBody": { "properties": { "total_received": { "type": "integer", "title": "Total Received", "description": "Total number of spans received" }, "total_queued": { "type": "integer", "title": "Total Queued", "description": "Number of spans successfully queued for insertion" } }, "type": "object", "required": [ "total_received", "total_queued" ], "title": "CreateSpansResponseBody" }, "CreateTraceNoteRequestBody": { "properties": { "data": { "$ref": "#/components/schemas/TraceNoteData" } }, "type": "object", "required": [ "data" ], "title": "CreateTraceNoteRequestBody" }, "CreateTraceNoteResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/InsertedTraceAnnotation" } }, "type": "object", "required": [ "data" ], "title": "CreateTraceNoteResponseBody" }, "CreateUserRequestBody": { "properties": { "user": { "oneOf": [ { "$ref": "#/components/schemas/LocalUserData" }, { "$ref": "#/components/schemas/OAuth2UserData" }, { "$ref": "#/components/schemas/LDAPUserData" } ], "title": "User", "discriminator": { "propertyName": "auth_method", "mapping": { "LDAP": "#/components/schemas/LDAPUserData", "LOCAL": "#/components/schemas/LocalUserData", "OAUTH2": "#/components/schemas/OAuth2UserData" } } }, "send_welcome_email": { "type": "boolean", "title": "Send Welcome Email", "default": true } }, "type": "object", "required": [ "user" ], "title": "CreateUserRequestBody" }, "CreateUserResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/LocalUser" }, { "$ref": "#/components/schemas/OAuth2User" }, { "$ref": "#/components/schemas/LDAPUser" } ], "title": "Data", "discriminator": { "propertyName": "auth_method", "mapping": { "LDAP": "#/components/schemas/LDAPUser", "LOCAL": "#/components/schemas/LocalUser", "OAUTH2": "#/components/schemas/OAuth2User" } } } }, "type": "object", "required": [ "data" ], "title": "CreateUserResponseBody" }, "CreatedApiKey": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "key": { "type": "string", "title": "Key", "description": "The API key. This is the only time it is returned; it cannot be recovered from the listing endpoints." } }, "type": "object", "required": [ "id", "name", "created_at", "key" ], "title": "CreatedApiKey" }, "CustomProviderModelSelection": { "properties": { "providerType": { "type": "string", "const": "custom", "title": "Providertype" }, "providerId": { "type": "string", "title": "Providerid" }, "modelName": { "type": "string", "title": "Modelname" } }, "type": "object", "required": [ "providerType", "providerId", "modelName" ], "title": "CustomProviderModelSelection", "description": "Chat against a stored custom provider record." }, "DataUIPart": { "properties": { "type": { "type": "string", "pattern": "^data-", "title": "Type" }, "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "data": { "title": "Data" } }, "additionalProperties": false, "type": "object", "required": [ "type", "data" ], "title": "DataUIPart", "description": "Data part with dynamic type based on data name." }, "Dataset": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "example_count": { "type": "integer", "title": "Example Count" } }, "type": "object", "required": [ "id", "name", "description", "metadata", "created_at", "updated_at", "example_count" ], "title": "Dataset" }, "DatasetContext": { "properties": { "type": { "type": "string", "const": "dataset", "title": "Type" }, "datasetNodeId": { "type": "string", "title": "Datasetnodeid" }, "datasetVersionNodeId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Datasetversionnodeid" } }, "type": "object", "required": [ "type", "datasetNodeId" ], "title": "DatasetContext", "description": "Dataset the user is currently viewing or has bound to a workflow.\n\nCarries the dataset's relay node id and, when known, the active version\nnode id. These IDs scope the create-form handoff link and the sampling of\nactive dataset examples used as prompt context; the dataset schema itself\nis open." }, "DatasetExample": { "properties": { "id": { "type": "string", "title": "Id" }, "node_id": { "type": "string", "title": "Node Id" }, "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "output": { "additionalProperties": true, "type": "object", "title": "Output" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "anyOf": [ { "$ref": "#/components/schemas/DatasetExampleSource" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "node_id", "input", "output", "metadata", "updated_at" ], "title": "DatasetExample" }, "DatasetExampleSource": { "properties": { "span_id": { "type": "string", "title": "Span Id" }, "span_node_id": { "type": "string", "title": "Span Node Id" } }, "type": "object", "required": [ "span_id", "span_node_id" ], "title": "DatasetExampleSource" }, "DatasetLabel": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "color": { "type": "string", "title": "Color" } }, "type": "object", "required": [ "id", "name", "description", "color" ], "title": "DatasetLabel" }, "DatasetVersion": { "properties": { "version_id": { "type": "string", "title": "Version Id" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "version_id", "description", "metadata", "created_at" ], "title": "DatasetVersion" }, "DatasetWithExampleCount": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "example_count": { "type": "integer", "title": "Example Count" } }, "type": "object", "required": [ "id", "name", "description", "metadata", "created_at", "updated_at", "example_count" ], "title": "DatasetWithExampleCount" }, "DeleteAnnotationConfigResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "title": "Data", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } } }, "type": "object", "required": [ "data" ], "title": "DeleteAnnotationConfigResponseBody" }, "DeleteSessionsRequestBody": { "properties": { "session_identifiers": { "items": { "type": "string" }, "type": "array", "title": "Session Identifiers", "description": "List of session identifiers to delete. All identifiers must be the same type: either all GlobalIDs or all user-provided session_id strings." } }, "type": "object", "required": [ "session_identifiers" ], "title": "DeleteSessionsRequestBody" }, "DynamicToolApprovalRequestedPart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "approval-requested", "title": "State", "default": "approval-requested" }, "input": { "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input" ], "title": "DynamicToolApprovalRequestedPart", "description": "Dynamic tool part in approval-requested state (awaiting user decision)." }, "DynamicToolApprovalRespondedPart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "approval-responded", "title": "State", "default": "approval-responded" }, "input": { "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input" ], "title": "DynamicToolApprovalRespondedPart", "description": "Dynamic tool part in approval-responded state (user approved/denied, execution pending)." }, "DynamicToolInputAvailablePart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "input-available", "title": "State", "default": "input-available" }, "input": { "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input" ], "title": "DynamicToolInputAvailablePart", "description": "Dynamic tool part in input-available state." }, "DynamicToolInputStreamingPart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "input-streaming", "title": "State", "default": "input-streaming" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId" ], "title": "DynamicToolInputStreamingPart", "description": "Dynamic tool part in input-streaming state." }, "DynamicToolOutputAvailablePart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-available", "title": "State", "default": "output-available" }, "input": { "title": "Input" }, "output": { "title": "Output" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "preliminary": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Preliminary" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input", "output" ], "title": "DynamicToolOutputAvailablePart", "description": "Dynamic tool part in output-available state." }, "DynamicToolOutputDeniedPart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-denied", "title": "State", "default": "output-denied" }, "input": { "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input" ], "title": "DynamicToolOutputDeniedPart", "description": "Dynamic tool part in output-denied state (tool was denied, terminal state)." }, "DynamicToolOutputErrorPart": { "properties": { "type": { "type": "string", "const": "dynamic-tool", "title": "Type", "default": "dynamic-tool" }, "toolName": { "type": "string", "title": "Toolname" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-error", "title": "State", "default": "output-error" }, "input": { "title": "Input" }, "errorText": { "type": "string", "title": "Errortext" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "toolName", "toolCallId", "input", "errorText" ], "title": "DynamicToolOutputErrorPart", "description": "Dynamic tool part in output-error state." }, "Experiment": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the experiment" }, "dataset_id": { "type": "string", "title": "Dataset Id", "description": "The ID of the dataset associated with the experiment" }, "dataset_version_id": { "type": "string", "title": "Dataset Version Id", "description": "The ID of the dataset version associated with the experiment" }, "name": { "type": "string", "title": "Name", "description": "The name of the experiment" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "The description of the experiment" }, "repetitions": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Repetitions", "description": "Number of times the experiment is repeated" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Metadata of the experiment" }, "project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Project Name", "description": "The name of the project associated with the experiment" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "The creation timestamp of the experiment" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At", "description": "The last update timestamp of the experiment" }, "example_count": { "type": "integer", "title": "Example Count", "description": "Number of examples in the experiment" }, "successful_run_count": { "type": "integer", "title": "Successful Run Count", "description": "Number of successful runs in the experiment" }, "failed_run_count": { "type": "integer", "title": "Failed Run Count", "description": "Number of failed runs in the experiment" }, "missing_run_count": { "type": "integer", "title": "Missing Run Count", "description": "Number of missing (not yet executed) runs in the experiment" } }, "type": "object", "required": [ "id", "dataset_id", "dataset_version_id", "name", "description", "repetitions", "metadata", "project_name", "created_at", "updated_at", "example_count", "successful_run_count", "failed_run_count", "missing_run_count" ], "title": "Experiment" }, "ExperimentEvaluationResult": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label", "description": "The label assigned by the evaluation" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score", "description": "The score assigned by the evaluation" }, "explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Explanation", "description": "Explanation of the evaluation result" } }, "type": "object", "title": "ExperimentEvaluationResult" }, "ExperimentRun": { "properties": { "dataset_example_id": { "type": "string", "title": "Dataset Example Id", "description": "The ID of the dataset example used in the experiment run" }, "output": { "title": "Output", "description": "The output of the experiment task" }, "repetition_number": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Repetition Number", "description": "The repetition number of the experiment run" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "The start time of the experiment run" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "The end time of the experiment run" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id", "description": "The ID of the corresponding trace (if one exists)" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error", "description": "Optional error message if the experiment run encountered an error" }, "id": { "type": "string", "title": "Id", "description": "The ID of the experiment run" }, "experiment_id": { "type": "string", "title": "Experiment Id", "description": "The ID of the experiment" } }, "type": "object", "required": [ "dataset_example_id", "output", "repetition_number", "start_time", "end_time", "id", "experiment_id" ], "title": "ExperimentRun" }, "FileUIPart": { "properties": { "type": { "type": "string", "const": "file", "title": "Type", "default": "file" }, "mediaType": { "type": "string", "title": "Mediatype" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "url": { "type": "string", "title": "Url" }, "providerMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Providermetadata" } }, "additionalProperties": false, "type": "object", "required": [ "mediaType", "url" ], "title": "FileUIPart", "description": "A file part of a message." }, "FreeformAnnotationConfig": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "FREEFORM", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "anyOf": [ { "$ref": "#/components/schemas/OptimizationDirection" }, { "type": "null" } ] }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "lower_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Lower Bound" }, "upper_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Upper Bound" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "type", "id" ], "title": "FreeformAnnotationConfig" }, "FreeformAnnotationConfigData": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "const": "FREEFORM", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "optimization_direction": { "anyOf": [ { "$ref": "#/components/schemas/OptimizationDirection" }, { "type": "null" } ] }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "lower_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Lower Bound" }, "upper_bound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Upper Bound" } }, "type": "object", "required": [ "name", "type" ], "title": "FreeformAnnotationConfigData" }, "GetAllUserApiKeysResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/UserApiKey" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetAllUserApiKeysResponseBody" }, "GetAnnotationConfigResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "title": "Data", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } } }, "type": "object", "required": [ "data" ], "title": "GetAnnotationConfigResponseBody" }, "GetAnnotationConfigsResponseBody": { "properties": { "data": { "items": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetAnnotationConfigsResponseBody" }, "GetApiKeysResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/ApiKey" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "GetApiKeysResponseBody" }, "GetDatasetLabelResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/DatasetLabel" } }, "type": "object", "required": [ "data" ], "title": "GetDatasetLabelResponseBody" }, "GetDatasetLabelsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/DatasetLabel" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetDatasetLabelsResponseBody" }, "GetDatasetResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/DatasetWithExampleCount" } }, "type": "object", "required": [ "data" ], "title": "GetDatasetResponseBody" }, "GetExperimentResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Experiment" } }, "type": "object", "required": [ "data" ], "title": "GetExperimentResponseBody" }, "GetIncompleteEvaluationsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/IncompleteExperimentEvaluation" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetIncompleteEvaluationsResponseBody" }, "GetIncompleteExperimentRunsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/IncompleteExperimentRun" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetIncompleteExperimentRunsResponseBody" }, "GetProjectAnnotationConfigsResponseBody": { "properties": { "data": { "items": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetProjectAnnotationConfigsResponseBody" }, "GetProjectResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Project" } }, "type": "object", "required": [ "data" ], "title": "GetProjectResponseBody" }, "GetProjectsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Project" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetProjectsResponseBody" }, "GetPromptResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/PromptVersion" } }, "type": "object", "required": [ "data" ], "title": "GetPromptResponseBody" }, "GetPromptVersionTagsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/PromptVersionTag" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetPromptVersionTagsResponseBody" }, "GetPromptVersionsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/PromptVersion" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetPromptVersionsResponseBody" }, "GetPromptsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Prompt" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetPromptsResponseBody" }, "GetSessionResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/SessionData" } }, "type": "object", "required": [ "data" ], "title": "GetSessionResponseBody" }, "GetSessionsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SessionData" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetSessionsResponseBody" }, "GetTracesResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/TraceData" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetTracesResponseBody" }, "GetUsersResponseBody": { "properties": { "data": { "items": { "oneOf": [ { "$ref": "#/components/schemas/LocalUser" }, { "$ref": "#/components/schemas/OAuth2User" }, { "$ref": "#/components/schemas/LDAPUser" } ], "discriminator": { "propertyName": "auth_method", "mapping": { "LDAP": "#/components/schemas/LDAPUser", "LOCAL": "#/components/schemas/LocalUser", "OAUTH2": "#/components/schemas/OAuth2User" } } }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "GetUsersResponseBody" }, "GetViewerResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/LocalUser" }, { "$ref": "#/components/schemas/OAuth2User" }, { "$ref": "#/components/schemas/LDAPUser" }, { "$ref": "#/components/schemas/AnonymousUser" } ], "title": "Data", "discriminator": { "propertyName": "auth_method", "mapping": { "ANONYMOUS": "#/components/schemas/AnonymousUser", "LDAP": "#/components/schemas/LDAPUser", "LOCAL": "#/components/schemas/LocalUser", "OAUTH2": "#/components/schemas/OAuth2User" } } } }, "type": "object", "required": [ "data" ], "title": "GetViewerResponseBody" }, "GraphQLContext": { "properties": { "type": { "type": "string", "const": "graphql", "title": "Type" }, "mutationsEnabled": { "type": "boolean", "title": "Mutationsenabled" } }, "type": "object", "required": [ "type", "mutationsEnabled" ], "title": "GraphQLContext", "description": "GraphQL runtime state." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "Identifier": { "type": "string", "pattern": "^[a-z0-9]([_a-z0-9-]*[a-z0-9])?$", "title": "Identifier" }, "IncompleteExperimentEvaluation": { "properties": { "experiment_run": { "$ref": "#/components/schemas/ExperimentRun", "description": "The experiment run" }, "dataset_example": { "$ref": "#/components/schemas/DatasetExample", "description": "The dataset example" }, "evaluation_names": { "items": { "type": "string" }, "type": "array", "title": "Evaluation Names", "description": "List of evaluation names that are incomplete (either missing or failed)" } }, "type": "object", "required": [ "experiment_run", "dataset_example", "evaluation_names" ], "title": "IncompleteExperimentEvaluation", "description": "Information about an experiment run with incomplete evaluations" }, "IncompleteExperimentRun": { "properties": { "dataset_example": { "$ref": "#/components/schemas/DatasetExample", "description": "The dataset example" }, "repetition_numbers": { "items": { "type": "integer" }, "type": "array", "title": "Repetition Numbers", "description": "List of repetition numbers that need to be run" } }, "type": "object", "required": [ "dataset_example", "repetition_numbers" ], "title": "IncompleteExperimentRun", "description": "Information about incomplete runs for a dataset example" }, "InsertedSessionAnnotation": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the inserted session annotation" } }, "type": "object", "required": [ "id" ], "title": "InsertedSessionAnnotation" }, "InsertedSpanAnnotation": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the inserted span annotation" } }, "type": "object", "required": [ "id" ], "title": "InsertedSpanAnnotation" }, "InsertedSpanDocumentAnnotation": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the inserted span document annotation" } }, "type": "object", "required": [ "id" ], "title": "InsertedSpanDocumentAnnotation" }, "InsertedTraceAnnotation": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the inserted trace annotation" } }, "type": "object", "required": [ "id" ], "title": "InsertedTraceAnnotation" }, "LDAPUser": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "LDAP", "title": "Auth Method" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "email", "username", "role", "auth_method" ], "title": "LDAPUser" }, "LDAPUserData": { "properties": { "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "LDAP", "title": "Auth Method" } }, "type": "object", "required": [ "email", "username", "role", "auth_method" ], "title": "LDAPUserData" }, "ListDatasetExamplesData": { "properties": { "dataset_id": { "type": "string", "title": "Dataset Id" }, "version_id": { "type": "string", "title": "Version Id" }, "filtered_splits": { "items": { "type": "string" }, "type": "array", "title": "Filtered Splits" }, "examples": { "items": { "$ref": "#/components/schemas/DatasetExample" }, "type": "array", "title": "Examples" } }, "type": "object", "required": [ "dataset_id", "version_id", "examples" ], "title": "ListDatasetExamplesData" }, "ListDatasetExamplesResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/ListDatasetExamplesData" } }, "type": "object", "required": [ "data" ], "title": "ListDatasetExamplesResponseBody" }, "ListDatasetLabelsForDatasetResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/DatasetLabel" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "ListDatasetLabelsForDatasetResponseBody" }, "ListDatasetVersionsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/DatasetVersion" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "ListDatasetVersionsResponseBody" }, "ListDatasetsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Dataset" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "ListDatasetsResponseBody" }, "ListExperimentRunsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/ExperimentRun" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "ListExperimentRunsResponseBody" }, "ListExperimentsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Experiment" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "ListExperimentsResponseBody" }, "LlmEvaluatorContext": { "properties": { "type": { "type": "string", "const": "llm_evaluator", "title": "Type" }, "evaluatorNodeId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Evaluatornodeid" } }, "type": "object", "required": [ "type" ], "title": "LlmEvaluatorContext", "description": "LLM-evaluator create/edit form mounted in the current browser route." }, "LocalUser": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "LOCAL", "title": "Auth Method" }, "password": { "type": "string", "title": "Password" }, "password_needs_reset": { "type": "boolean", "title": "Password Needs Reset" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "email", "username", "role", "auth_method", "password_needs_reset" ], "title": "LocalUser" }, "LocalUserData": { "properties": { "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "LOCAL", "title": "Auth Method" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "email", "username", "role", "auth_method" ], "title": "LocalUserData" }, "ModelProvider": { "type": "string", "enum": [ "OPENAI", "AZURE_OPENAI", "ANTHROPIC", "GOOGLE", "DEEPSEEK", "XAI", "OLLAMA", "AWS", "CEREBRAS", "FIREWORKS", "GROQ", "MOONSHOT", "PERPLEXITY", "TOGETHER" ], "title": "ModelProvider" }, "OAuth2User": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "OAUTH2", "title": "Auth Method" }, "oauth2_client_id": { "type": "string", "title": "Oauth2 Client Id" }, "oauth2_user_id": { "type": "string", "title": "Oauth2 User Id" }, "profile_picture_url": { "type": "string", "title": "Profile Picture Url" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "email", "username", "role", "auth_method" ], "title": "OAuth2User" }, "OAuth2UserData": { "properties": { "email": { "type": "string", "title": "Email" }, "username": { "type": "string", "title": "Username" }, "role": { "type": "string", "enum": [ "SYSTEM", "ADMIN", "MEMBER", "VIEWER" ], "title": "Role" }, "auth_method": { "type": "string", "const": "OAUTH2", "title": "Auth Method" }, "oauth2_client_id": { "type": "string", "title": "Oauth2 Client Id" }, "oauth2_user_id": { "type": "string", "title": "Oauth2 User Id" } }, "type": "object", "required": [ "email", "username", "role", "auth_method" ], "title": "OAuth2UserData" }, "OptimizationDirection": { "type": "string", "enum": [ "MINIMIZE", "MAXIMIZE", "NONE" ], "title": "OptimizationDirection" }, "OtlpAnyValue": { "properties": { "array_value": { "anyOf": [ { "$ref": "#/components/schemas/OtlpArrayValue" }, { "type": "null" } ] }, "bool_value": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Bool Value" }, "bytes_value": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9+/]*={0,2}$" }, { "type": "null" } ], "title": "Bytes Value" }, "double_value": { "anyOf": [ { "type": "number" }, { "$ref": "#/components/schemas/OtlpDoubleValue" }, { "type": "string" }, { "type": "null" } ], "title": "Double Value" }, "int_value": { "anyOf": [ { "type": "integer", "exclusiveMaximum": 9.223372036854776e+18, "minimum": -9.223372036854776e+18 }, { "type": "string", "pattern": "^-?[0-9]+$" }, { "type": "null" } ], "title": "Int Value" }, "kvlist_value": { "type": "null", "title": "Kvlist Value" }, "string_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "String Value" } }, "additionalProperties": false, "type": "object", "title": "OtlpAnyValue" }, "OtlpArrayValue": { "properties": { "values": { "anyOf": [ { "items": { "$ref": "#/components/schemas/OtlpAnyValue" }, "type": "array" }, { "type": "null" } ], "title": "Values", "description": "Array of values. The array may be empty (contain 0 elements)." } }, "additionalProperties": false, "type": "object", "title": "OtlpArrayValue" }, "OtlpDoubleValue": { "type": "string", "enum": [ "Infinity", "-Infinity", "NaN" ], "title": "OtlpDoubleValue" }, "OtlpEvent": { "properties": { "attributes": { "anyOf": [ { "items": { "$ref": "#/components/schemas/OtlpKeyValue" }, "type": "array" }, { "type": "null" } ], "title": "Attributes", "description": "attributes is a collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key)." }, "dropped_attributes_count": { "anyOf": [ { "type": "integer", "maximum": 4294967295.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Dropped Attributes Count", "description": "dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped." }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "name of the event. This field is semantically required to be set to non-empty string." }, "time_unix_nano": { "anyOf": [ { "type": "integer", "exclusiveMaximum": 1.8446744073709552e+19, "minimum": 0.0 }, { "type": "string", "pattern": "^[0-9]+$" }, { "type": "null" } ], "title": "Time Unix Nano", "description": "time_unix_nano is the time the event occurred. Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970." } }, "additionalProperties": false, "type": "object", "title": "OtlpEvent" }, "OtlpKeyValue": { "properties": { "key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key" }, "value": { "anyOf": [ { "$ref": "#/components/schemas/OtlpAnyValue" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "OtlpKeyValue" }, "OtlpKind": { "type": "string", "enum": [ "SPAN_KIND_UNSPECIFIED", "SPAN_KIND_INTERNAL", "SPAN_KIND_SERVER", "SPAN_KIND_CLIENT", "SPAN_KIND_PRODUCER", "SPAN_KIND_CONSUMER" ], "title": "OtlpKind" }, "OtlpSpan": { "properties": { "attributes": { "anyOf": [ { "items": { "$ref": "#/components/schemas/OtlpKeyValue" }, "type": "array" }, { "type": "null" } ], "title": "Attributes", "description": "attributes is a collection of key/value pairs. Note, global attributes like server name can be set using the resource API. Examples of attributes:\n\n \"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n \"/http/server_latency\": 300\n \"example.com/myattribute\": true\n \"example.com/score\": 10.239\n\nThe OpenTelemetry API specification further restricts the allowed value types:\nhttps://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute\nAttribute keys MUST be unique (it is not allowed to have more than one attribute with the same key)." }, "dropped_attributes_count": { "anyOf": [ { "type": "integer", "maximum": 4294967295.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Dropped Attributes Count", "description": "dropped_attributes_count is the number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0, then no attributes were dropped." }, "dropped_events_count": { "anyOf": [ { "type": "integer", "maximum": 4294967295.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Dropped Events Count", "description": "dropped_events_count is the number of dropped events. If the value is 0, then no events were dropped." }, "dropped_links_count": { "anyOf": [ { "type": "integer", "maximum": 4294967295.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Dropped Links Count", "description": "dropped_links_count is the number of dropped links after the maximum size was enforced. If this value is 0, then no links were dropped." }, "end_time_unix_nano": { "anyOf": [ { "type": "integer", "exclusiveMaximum": 1.8446744073709552e+19, "minimum": 0.0 }, { "type": "string", "pattern": "^[0-9]+$" }, { "type": "null" } ], "title": "End Time Unix Nano", "description": "end_time_unix_nano is the end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.\nValue is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\nThis field is semantically required and it is expected that end_time >= start_time." }, "events": { "anyOf": [ { "items": { "$ref": "#/components/schemas/OtlpEvent" }, "type": "array" }, { "type": "null" } ], "title": "Events", "description": "events is a collection of Event items. A span with no events is valid." }, "flags": { "anyOf": [ { "type": "integer", "maximum": 4294967295.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Flags", "description": "Flags, a bit field.\n\nBits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace Context specification. To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n\nSee https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n\nBits 8 and 9 represent the 3 states of whether a span's parent is remote. The states are (unknown, is not remote, is remote).\nTo read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\nTo read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n\nWhen creating span messages, if the message is logically forwarded from another source with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD be copied as-is. If creating from a source that does not have an equivalent flags field (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST be set to zero.\nReaders MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n\n[Optional]." }, "kind": { "anyOf": [ { "$ref": "#/components/schemas/OtlpKind" }, { "type": "integer", "maximum": 2147483647.0, "minimum": -2147483648.0 }, { "type": "null" } ], "title": "Kind", "description": "Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify queueing latency associated with the span.", "default": "SPAN_KIND_INTERNAL" }, "links": { "type": "null", "title": "Links" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "A description of the span's operation.\n\nFor example, the name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name at the same call point in an application. This makes it easier to correlate spans in different traces.\n\nThis field is semantically required to be set to non-empty string. Empty value is equivalent to an unknown span name.\n\nThis field is required." }, "parent_span_id": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9+/]*={0,2}$" }, { "type": "null" } ], "title": "Parent Span Id", "description": "The `span_id` of this span's parent span. If this is a root span, then this field must be empty. The ID is an 8-byte array." }, "span_id": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9+/]*={0,2}$" }, { "type": "null" } ], "title": "Span Id", "description": "A unique identifier for a span within a trace, assigned when the span is created. The ID is an 8-byte array. An ID with all zeroes OR of length other than 8 bytes is considered invalid (empty string in OTLP/JSON is zero-length and thus is also invalid).\n\nThis field is required." }, "start_time_unix_nano": { "anyOf": [ { "type": "integer", "exclusiveMaximum": 1.8446744073709552e+19, "minimum": 0.0 }, { "type": "string", "pattern": "^[0-9]+$" }, { "type": "null" } ], "title": "Start Time Unix Nano", "description": "start_time_unix_nano is the start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.\nValue is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\nThis field is semantically required and it is expected that end_time >= start_time." }, "status": { "anyOf": [ { "$ref": "#/components/schemas/OtlpStatus" }, { "type": "null" } ], "description": "An optional final status for this span. Semantically when Status isn't set, it means span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0)." }, "trace_id": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9+/]*={0,2}$" }, { "type": "null" } ], "title": "Trace Id", "description": "A unique identifier for a trace. All spans from the same trace share the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR of length other than 16 bytes is considered invalid (empty string in OTLP/JSON is zero-length and thus is also invalid).\n\nThis field is required." }, "trace_state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace State", "description": "trace_state conveys information about request position in multiple distributed tracing graphs. It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header\nSee also https://github.com/w3c/distributed-tracing for more details about this field." } }, "additionalProperties": false, "type": "object", "title": "OtlpSpan" }, "OtlpSpansResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/OtlpSpan" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "OtlpSpansResponseBody", "description": "Paginated response where each span follows OTLP JSON structure." }, "OtlpStatus": { "properties": { "code": { "anyOf": [ { "type": "integer", "maximum": 2147483647.0, "minimum": -2147483648.0 }, { "type": "null" } ], "title": "Code", "description": "The status code." }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message", "description": "A developer-facing human readable error message." } }, "additionalProperties": false, "type": "object", "title": "OtlpStatus" }, "PhoenixUIMessage": { "properties": { "id": { "type": "string", "title": "Id" }, "role": { "type": "string", "enum": [ "system", "user", "assistant" ], "title": "Role" }, "metadata": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/AssistantMessageMetadata" }, { "$ref": "#/components/schemas/UserMessageMetadata" } ], "discriminator": { "propertyName": "type", "mapping": { "assistant": "#/components/schemas/AssistantMessageMetadata", "user": "#/components/schemas/UserMessageMetadata" } } }, { "type": "null" } ], "title": "Metadata" }, "parts": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TextUIPart" }, { "$ref": "#/components/schemas/ReasoningUIPart" }, { "$ref": "#/components/schemas/ToolInputStreamingPart" }, { "$ref": "#/components/schemas/ToolInputAvailablePart" }, { "$ref": "#/components/schemas/ToolOutputAvailablePart" }, { "$ref": "#/components/schemas/ToolOutputErrorPart" }, { "$ref": "#/components/schemas/ToolApprovalRequestedPart" }, { "$ref": "#/components/schemas/ToolApprovalRespondedPart" }, { "$ref": "#/components/schemas/ToolOutputDeniedPart" }, { "$ref": "#/components/schemas/DynamicToolInputStreamingPart" }, { "$ref": "#/components/schemas/DynamicToolInputAvailablePart" }, { "$ref": "#/components/schemas/DynamicToolOutputAvailablePart" }, { "$ref": "#/components/schemas/DynamicToolOutputErrorPart" }, { "$ref": "#/components/schemas/DynamicToolApprovalRequestedPart" }, { "$ref": "#/components/schemas/DynamicToolApprovalRespondedPart" }, { "$ref": "#/components/schemas/DynamicToolOutputDeniedPart" }, { "$ref": "#/components/schemas/SourceUrlUIPart" }, { "$ref": "#/components/schemas/SourceDocumentUIPart" }, { "$ref": "#/components/schemas/FileUIPart" }, { "$ref": "#/components/schemas/DataUIPart" }, { "$ref": "#/components/schemas/StepStartUIPart" } ] }, "type": "array", "title": "Parts" } }, "additionalProperties": false, "type": "object", "required": [ "id", "role", "parts" ], "title": "PhoenixUIMessage", "description": "`UIMessage` with `metadata` narrowed to the Phoenix wire shapes." }, "PlaygroundBuiltinModelContext": { "properties": { "type": { "type": "string", "const": "builtin", "title": "Type", "default": "builtin" }, "provider": { "type": "string", "title": "Provider" }, "modelName": { "type": "string", "title": "Modelname" } }, "type": "object", "required": [ "provider", "modelName" ], "title": "PlaygroundBuiltinModelContext", "description": "Built-in playground model selection." }, "PlaygroundContext": { "properties": { "type": { "type": "string", "const": "playground", "title": "Type" }, "recordExperiments": { "type": "boolean", "title": "Recordexperiments", "default": true }, "repetitions": { "type": "integer", "title": "Repetitions", "default": 1 }, "nextExperimentScaffold": { "anyOf": [ { "$ref": "#/components/schemas/PlaygroundExperimentScaffoldContext" }, { "type": "null" } ] }, "instances": { "items": { "$ref": "#/components/schemas/PlaygroundInstanceContext" }, "type": "array", "title": "Instances" }, "evaluators": { "items": { "$ref": "#/components/schemas/PlaygroundEvaluatorContext" }, "type": "array", "title": "Evaluators" } }, "type": "object", "required": [ "type" ], "title": "PlaygroundContext", "description": "Playground prompt editor state mounted in the current browser route." }, "PlaygroundCustomProviderModelContext": { "properties": { "type": { "type": "string", "const": "custom", "title": "Type", "default": "custom" }, "customProviderId": { "type": "string", "title": "Customproviderid" }, "customProviderName": { "type": "string", "title": "Customprovidername" }, "provider": { "type": "string", "title": "Provider" }, "modelName": { "type": "string", "title": "Modelname" } }, "type": "object", "required": [ "customProviderId", "customProviderName", "provider", "modelName" ], "title": "PlaygroundCustomProviderModelContext", "description": "Custom-provider playground model selection." }, "PlaygroundEvaluatorContext": { "properties": { "datasetEvaluatorId": { "type": "string", "title": "Datasetevaluatorid" }, "name": { "type": "string", "title": "Name" }, "kind": { "type": "string", "enum": [ "LLM", "CODE", "BUILTIN" ], "title": "Kind" }, "isBuiltin": { "type": "boolean", "title": "Isbuiltin" }, "isApplied": { "type": "boolean", "title": "Isapplied" } }, "type": "object", "required": [ "datasetEvaluatorId", "name", "kind", "isBuiltin", "isApplied" ], "title": "PlaygroundEvaluatorContext", "description": "One dataset evaluator on the mounted playground's roster. ``name`` is\nuser-controlled; sanitize at every model-visible boundary." }, "PlaygroundExperimentScaffoldContext": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "hasMetadata": { "type": "boolean", "title": "Hasmetadata", "default": false } }, "type": "object", "title": "PlaygroundExperimentScaffoldContext", "description": "Experiment name/description/metadata the user has staged for the playground's\n*next* dataset-backed run, before that run has started.\n\nThe playground UI lets the user pre-set how the next recorded run's experiment\nwill be named, described, and tagged (via the ``set_playground_experiment_recording``\ntool or the recording form). That staged state is surfaced here so the agent can\nsee what is already set and avoid re-staging it.\n\nField semantics:\n- ``name`` / ``description``: the staged values, surfaced to the model verbatim,\n or ``None`` when the user has not staged them.\n- ``has_metadata``: a presence flag, not the value. Only *whether* metadata has\n been staged is model-relevant (so the agent knows not to re-attach it); the\n metadata object itself is deliberately kept out of the prompt.\n\nA field left unstaged (``None`` / ``False``) falls back to the server default when\nthe run starts. The scaffold is consumed once that next run begins." }, "PlaygroundInstanceContext": { "properties": { "instanceId": { "type": "integer", "title": "Instanceid" }, "model": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/PlaygroundBuiltinModelContext" }, { "$ref": "#/components/schemas/PlaygroundCustomProviderModelContext" } ], "discriminator": { "propertyName": "type", "mapping": { "builtin": "#/components/schemas/PlaygroundBuiltinModelContext", "custom": "#/components/schemas/PlaygroundCustomProviderModelContext" } } }, { "type": "null" } ], "title": "Model" }, "experimentId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Experimentid" } }, "type": "object", "required": [ "instanceId" ], "title": "PlaygroundInstanceContext", "description": "One mounted playground instance and its current model selection.\n\n``experiment_id`` carries the relay node id of the experiment produced by\nthis instance's last dataset-backed run, or ``None`` when the instance has\nnot produced one. Ephemeral experiments are included: they remain queryable\nuntil the server sweeps them ~24h after their last update." }, "Project": { "properties": { "name": { "type": "string", "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "id" ], "title": "Project" }, "ProjectContext": { "properties": { "type": { "type": "string", "const": "project", "title": "Type" }, "projectNodeId": { "type": "string", "title": "Projectnodeid" }, "spanFilter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Spanfilter" } }, "type": "object", "required": [ "type", "projectNodeId" ], "title": "ProjectContext", "description": "Project the user is currently viewing.\n\n``span_filter`` carries the project-scoped span filter expression when the\nspan filter field is mounted \u2014 empty string when the field is mounted with\nno condition applied, ``None`` when the field is not present at all. It\ndescribes the view in full, root-span scoping included (which is expressed\nwithin the filter DSL as ``parent_id is None``)." }, "Prompt": { "properties": { "name": { "$ref": "#/components/schemas/Identifier" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "source_prompt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Prompt Id" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "id" ], "title": "Prompt" }, "PromptAnthropicInvocationParameters": { "properties": { "type": { "type": "string", "const": "anthropic", "title": "Type" }, "anthropic": { "$ref": "#/components/schemas/PromptAnthropicInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "anthropic" ], "title": "PromptAnthropicInvocationParameters" }, "PromptAnthropicInvocationParametersContent": { "properties": { "max_tokens": { "type": "integer", "title": "Max Tokens" }, "temperature": { "type": "number", "title": "Temperature" }, "top_p": { "type": "number", "title": "Top P" }, "stop_sequences": { "items": { "type": "string" }, "type": "array", "title": "Stop Sequences" }, "output_config": { "$ref": "#/components/schemas/PromptAnthropicOutputConfig" }, "thinking": { "oneOf": [ { "$ref": "#/components/schemas/PromptAnthropicThinkingConfigDisabled" }, { "$ref": "#/components/schemas/PromptAnthropicThinkingConfigEnabled" }, { "$ref": "#/components/schemas/PromptAnthropicThinkingConfigAdaptive" } ], "title": "Thinking", "discriminator": { "propertyName": "type", "mapping": { "adaptive": "#/components/schemas/PromptAnthropicThinkingConfigAdaptive", "disabled": "#/components/schemas/PromptAnthropicThinkingConfigDisabled", "enabled": "#/components/schemas/PromptAnthropicThinkingConfigEnabled" } } }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "required": [ "max_tokens" ], "title": "PromptAnthropicInvocationParametersContent" }, "PromptAnthropicOutputConfig": { "properties": { "effort": { "type": "string", "enum": [ "low", "medium", "high", "xhigh", "max" ], "title": "Effort" } }, "additionalProperties": false, "type": "object", "title": "PromptAnthropicOutputConfig" }, "PromptAnthropicThinkingConfigAdaptive": { "properties": { "type": { "type": "string", "const": "adaptive", "title": "Type" }, "display": { "type": "string", "enum": [ "summarized", "omitted" ], "title": "Display" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "PromptAnthropicThinkingConfigAdaptive" }, "PromptAnthropicThinkingConfigDisabled": { "properties": { "type": { "type": "string", "const": "disabled", "title": "Type" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "PromptAnthropicThinkingConfigDisabled" }, "PromptAnthropicThinkingConfigEnabled": { "properties": { "type": { "type": "string", "const": "enabled", "title": "Type" }, "budget_tokens": { "type": "integer", "minimum": 1024.0, "title": "Budget Tokens" }, "display": { "type": "string", "enum": [ "summarized", "omitted" ], "title": "Display" } }, "additionalProperties": false, "type": "object", "required": [ "type", "budget_tokens" ], "title": "PromptAnthropicThinkingConfigEnabled" }, "PromptAwsInvocationParameters": { "properties": { "type": { "type": "string", "const": "aws", "title": "Type" }, "aws": { "$ref": "#/components/schemas/PromptAwsInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "aws" ], "title": "PromptAwsInvocationParameters" }, "PromptAwsInvocationParametersContent": { "properties": { "max_tokens": { "type": "integer", "title": "Max Tokens" }, "temperature": { "type": "number", "title": "Temperature" }, "top_p": { "type": "number", "title": "Top P" }, "stop_sequences": { "items": { "type": "string" }, "type": "array", "title": "Stop Sequences" } }, "additionalProperties": false, "type": "object", "title": "PromptAwsInvocationParametersContent" }, "PromptAzureOpenAIInvocationParameters": { "properties": { "type": { "type": "string", "const": "azure_openai", "title": "Type" }, "azure_openai": { "$ref": "#/components/schemas/PromptAzureOpenAIInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "azure_openai" ], "title": "PromptAzureOpenAIInvocationParameters" }, "PromptAzureOpenAIInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptAzureOpenAIInvocationParametersContent" }, "PromptCerebrasInvocationParameters": { "properties": { "type": { "type": "string", "const": "cerebras", "title": "Type" }, "cerebras": { "$ref": "#/components/schemas/PromptCerebrasInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "cerebras" ], "title": "PromptCerebrasInvocationParameters" }, "PromptCerebrasInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptCerebrasInvocationParametersContent" }, "PromptChatTemplate": { "properties": { "type": { "type": "string", "const": "chat", "title": "Type" }, "messages": { "items": { "$ref": "#/components/schemas/PromptMessage" }, "type": "array", "title": "Messages" } }, "additionalProperties": false, "type": "object", "required": [ "type", "messages" ], "title": "PromptChatTemplate" }, "PromptContext": { "properties": { "type": { "type": "string", "const": "prompt", "title": "Type" }, "promptNodeId": { "type": "string", "title": "Promptnodeid" } }, "type": "object", "required": [ "type", "promptNodeId" ], "title": "PromptContext", "description": "Prompt the user is currently viewing." }, "PromptData": { "properties": { "name": { "$ref": "#/components/schemas/Identifier" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "source_prompt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Prompt Id" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "name" ], "title": "PromptData" }, "PromptDeepSeekInvocationParameters": { "properties": { "type": { "type": "string", "const": "deepseek", "title": "Type" }, "deepseek": { "$ref": "#/components/schemas/PromptDeepSeekInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "deepseek" ], "title": "PromptDeepSeekInvocationParameters" }, "PromptDeepSeekInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptDeepSeekInvocationParametersContent" }, "PromptFireworksInvocationParameters": { "properties": { "type": { "type": "string", "const": "fireworks", "title": "Type" }, "fireworks": { "$ref": "#/components/schemas/PromptFireworksInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "fireworks" ], "title": "PromptFireworksInvocationParameters" }, "PromptFireworksInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptFireworksInvocationParametersContent" }, "PromptGoogleInvocationParameters": { "properties": { "type": { "type": "string", "const": "google", "title": "Type" }, "google": { "$ref": "#/components/schemas/PromptGoogleInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "google" ], "title": "PromptGoogleInvocationParameters" }, "PromptGoogleInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_output_tokens": { "type": "integer", "title": "Max Output Tokens" }, "stop_sequences": { "items": { "type": "string" }, "type": "array", "title": "Stop Sequences" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "top_k": { "type": "integer", "title": "Top K" }, "thinking_config": { "$ref": "#/components/schemas/PromptGoogleThinkingConfig" } }, "additionalProperties": false, "type": "object", "title": "PromptGoogleInvocationParametersContent" }, "PromptGoogleThinkingConfig": { "properties": { "thinking_budget": { "type": "integer", "title": "Thinking Budget" }, "thinking_level": { "type": "string", "enum": [ "minimal", "low", "medium", "high" ], "title": "Thinking Level" }, "include_thoughts": { "type": "boolean", "title": "Include Thoughts" } }, "additionalProperties": false, "type": "object", "title": "PromptGoogleThinkingConfig" }, "PromptGroqInvocationParameters": { "properties": { "type": { "type": "string", "const": "groq", "title": "Type" }, "groq": { "$ref": "#/components/schemas/PromptGroqInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "groq" ], "title": "PromptGroqInvocationParameters" }, "PromptGroqInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptGroqInvocationParametersContent" }, "PromptMessage": { "properties": { "role": { "type": "string", "enum": [ "user", "assistant", "model", "ai", "tool", "system", "developer" ], "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "items": { "oneOf": [ { "$ref": "#/components/schemas/TextContentPart" }, { "$ref": "#/components/schemas/ToolCallContentPart" }, { "$ref": "#/components/schemas/ToolResultContentPart" } ], "discriminator": { "propertyName": "type", "mapping": { "text": "#/components/schemas/TextContentPart", "tool_call": "#/components/schemas/ToolCallContentPart", "tool_result": "#/components/schemas/ToolResultContentPart" } } }, "type": "array", "minItems": 1 } ], "title": "Content" } }, "additionalProperties": false, "type": "object", "required": [ "role", "content" ], "title": "PromptMessage" }, "PromptMoonshotInvocationParameters": { "properties": { "type": { "type": "string", "const": "moonshot", "title": "Type" }, "moonshot": { "$ref": "#/components/schemas/PromptMoonshotInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "moonshot" ], "title": "PromptMoonshotInvocationParameters" }, "PromptMoonshotInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptMoonshotInvocationParametersContent" }, "PromptOllamaInvocationParameters": { "properties": { "type": { "type": "string", "const": "ollama", "title": "Type" }, "ollama": { "$ref": "#/components/schemas/PromptOllamaInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "ollama" ], "title": "PromptOllamaInvocationParameters" }, "PromptOllamaInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptOllamaInvocationParametersContent" }, "PromptOpenAIInvocationParameters": { "properties": { "type": { "type": "string", "const": "openai", "title": "Type" }, "openai": { "$ref": "#/components/schemas/PromptOpenAIInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "openai" ], "title": "PromptOpenAIInvocationParameters" }, "PromptOpenAIInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptOpenAIInvocationParametersContent" }, "PromptPerplexityInvocationParameters": { "properties": { "type": { "type": "string", "const": "perplexity", "title": "Type" }, "perplexity": { "$ref": "#/components/schemas/PromptPerplexityInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "perplexity" ], "title": "PromptPerplexityInvocationParameters" }, "PromptPerplexityInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptPerplexityInvocationParametersContent" }, "PromptResponseFormatJSONSchema": { "properties": { "type": { "type": "string", "const": "json_schema", "title": "Type" }, "json_schema": { "$ref": "#/components/schemas/PromptResponseFormatJSONSchemaDefinition" } }, "additionalProperties": false, "type": "object", "required": [ "type", "json_schema" ], "title": "PromptResponseFormatJSONSchema" }, "PromptResponseFormatJSONSchemaDefinition": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "schema": { "additionalProperties": true, "type": "object", "title": "Schema" }, "strict": { "type": "boolean", "title": "Strict" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "PromptResponseFormatJSONSchemaDefinition" }, "PromptStringTemplate": { "properties": { "type": { "type": "string", "const": "string", "title": "Type" }, "template": { "type": "string", "title": "Template" } }, "additionalProperties": false, "type": "object", "required": [ "type", "template" ], "title": "PromptStringTemplate" }, "PromptTemplateFormat": { "type": "string", "enum": [ "MUSTACHE", "F_STRING", "NONE" ], "title": "PromptTemplateFormat" }, "PromptTemplateType": { "type": "string", "enum": [ "STR", "CHAT" ], "title": "PromptTemplateType" }, "PromptTogetherInvocationParameters": { "properties": { "type": { "type": "string", "const": "together", "title": "Type" }, "together": { "$ref": "#/components/schemas/PromptTogetherInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "together" ], "title": "PromptTogetherInvocationParameters" }, "PromptTogetherInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptTogetherInvocationParametersContent" }, "PromptToolChoiceNone": { "properties": { "type": { "type": "string", "const": "none", "title": "Type" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "PromptToolChoiceNone" }, "PromptToolChoiceOneOrMore": { "properties": { "type": { "type": "string", "const": "one_or_more", "title": "Type" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "PromptToolChoiceOneOrMore" }, "PromptToolChoiceSpecificFunctionTool": { "properties": { "type": { "type": "string", "const": "specific_function", "title": "Type" }, "function_name": { "type": "string", "title": "Function Name" } }, "additionalProperties": false, "type": "object", "required": [ "type", "function_name" ], "title": "PromptToolChoiceSpecificFunctionTool" }, "PromptToolChoiceZeroOrMore": { "properties": { "type": { "type": "string", "const": "zero_or_more", "title": "Type" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "PromptToolChoiceZeroOrMore" }, "PromptToolFunction": { "properties": { "type": { "type": "string", "const": "function", "title": "Type" }, "function": { "$ref": "#/components/schemas/PromptToolFunctionDefinition" } }, "additionalProperties": false, "type": "object", "required": [ "type", "function" ], "title": "PromptToolFunction" }, "PromptToolFunctionDefinition": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" }, "strict": { "type": "boolean", "title": "Strict" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "PromptToolFunctionDefinition" }, "PromptToolRaw": { "properties": { "type": { "type": "string", "const": "raw", "title": "Type" }, "raw": { "additionalProperties": true, "type": "object", "title": "Raw" } }, "additionalProperties": false, "type": "object", "required": [ "type", "raw" ], "title": "PromptToolRaw" }, "PromptTools": { "properties": { "type": { "type": "string", "const": "tools", "title": "Type" }, "tools": { "items": { "oneOf": [ { "$ref": "#/components/schemas/PromptToolFunction" }, { "$ref": "#/components/schemas/PromptToolRaw" } ], "discriminator": { "propertyName": "type", "mapping": { "function": "#/components/schemas/PromptToolFunction", "raw": "#/components/schemas/PromptToolRaw" } } }, "type": "array", "minItems": 1, "title": "Tools" }, "tool_choice": { "oneOf": [ { "$ref": "#/components/schemas/PromptToolChoiceNone" }, { "$ref": "#/components/schemas/PromptToolChoiceZeroOrMore" }, { "$ref": "#/components/schemas/PromptToolChoiceOneOrMore" }, { "$ref": "#/components/schemas/PromptToolChoiceSpecificFunctionTool" } ], "title": "Tool Choice", "discriminator": { "propertyName": "type", "mapping": { "none": "#/components/schemas/PromptToolChoiceNone", "one_or_more": "#/components/schemas/PromptToolChoiceOneOrMore", "specific_function": "#/components/schemas/PromptToolChoiceSpecificFunctionTool", "zero_or_more": "#/components/schemas/PromptToolChoiceZeroOrMore" } } }, "disable_parallel_tool_calls": { "type": "boolean", "title": "Disable Parallel Tool Calls" } }, "additionalProperties": false, "type": "object", "required": [ "type", "tools" ], "title": "PromptTools" }, "PromptVersion": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "model_provider": { "$ref": "#/components/schemas/ModelProvider" }, "model_name": { "type": "string", "title": "Model Name" }, "template": { "oneOf": [ { "$ref": "#/components/schemas/PromptChatTemplate" }, { "$ref": "#/components/schemas/PromptStringTemplate" } ], "title": "Template", "discriminator": { "propertyName": "type", "mapping": { "chat": "#/components/schemas/PromptChatTemplate", "string": "#/components/schemas/PromptStringTemplate" } } }, "template_type": { "$ref": "#/components/schemas/PromptTemplateType" }, "template_format": { "$ref": "#/components/schemas/PromptTemplateFormat" }, "invocation_parameters": { "oneOf": [ { "$ref": "#/components/schemas/PromptOpenAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptAzureOpenAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptAnthropicInvocationParameters" }, { "$ref": "#/components/schemas/PromptGoogleInvocationParameters" }, { "$ref": "#/components/schemas/PromptDeepSeekInvocationParameters" }, { "$ref": "#/components/schemas/PromptXAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptOllamaInvocationParameters" }, { "$ref": "#/components/schemas/PromptAwsInvocationParameters" }, { "$ref": "#/components/schemas/PromptCerebrasInvocationParameters" }, { "$ref": "#/components/schemas/PromptFireworksInvocationParameters" }, { "$ref": "#/components/schemas/PromptGroqInvocationParameters" }, { "$ref": "#/components/schemas/PromptMoonshotInvocationParameters" }, { "$ref": "#/components/schemas/PromptPerplexityInvocationParameters" }, { "$ref": "#/components/schemas/PromptTogetherInvocationParameters" } ], "title": "Invocation Parameters", "discriminator": { "propertyName": "type", "mapping": { "anthropic": "#/components/schemas/PromptAnthropicInvocationParameters", "aws": "#/components/schemas/PromptAwsInvocationParameters", "azure_openai": "#/components/schemas/PromptAzureOpenAIInvocationParameters", "cerebras": "#/components/schemas/PromptCerebrasInvocationParameters", "deepseek": "#/components/schemas/PromptDeepSeekInvocationParameters", "fireworks": "#/components/schemas/PromptFireworksInvocationParameters", "google": "#/components/schemas/PromptGoogleInvocationParameters", "groq": "#/components/schemas/PromptGroqInvocationParameters", "moonshot": "#/components/schemas/PromptMoonshotInvocationParameters", "ollama": "#/components/schemas/PromptOllamaInvocationParameters", "openai": "#/components/schemas/PromptOpenAIInvocationParameters", "perplexity": "#/components/schemas/PromptPerplexityInvocationParameters", "together": "#/components/schemas/PromptTogetherInvocationParameters", "xai": "#/components/schemas/PromptXAIInvocationParameters" } } }, "tools": { "anyOf": [ { "$ref": "#/components/schemas/PromptTools" }, { "type": "null" } ] }, "response_format": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/PromptResponseFormatJSONSchema" } ], "discriminator": { "propertyName": "type", "mapping": { "json_schema": "#/components/schemas/PromptResponseFormatJSONSchema" } } }, { "type": "null" } ], "title": "Response Format" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "model_provider", "model_name", "template", "template_type", "template_format", "invocation_parameters", "id" ], "title": "PromptVersion" }, "PromptVersionContext": { "properties": { "type": { "type": "string", "const": "prompt_version", "title": "Type" }, "promptNodeId": { "type": "string", "title": "Promptnodeid" }, "promptVersionNodeId": { "type": "string", "title": "Promptversionnodeid" } }, "type": "object", "required": [ "type", "promptNodeId", "promptVersionNodeId" ], "title": "PromptVersionContext", "description": "Prompt version the user is currently viewing." }, "PromptVersionData": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "model_provider": { "$ref": "#/components/schemas/ModelProvider" }, "model_name": { "type": "string", "title": "Model Name" }, "template": { "oneOf": [ { "$ref": "#/components/schemas/PromptChatTemplate" }, { "$ref": "#/components/schemas/PromptStringTemplate" } ], "title": "Template", "discriminator": { "propertyName": "type", "mapping": { "chat": "#/components/schemas/PromptChatTemplate", "string": "#/components/schemas/PromptStringTemplate" } } }, "template_type": { "$ref": "#/components/schemas/PromptTemplateType" }, "template_format": { "$ref": "#/components/schemas/PromptTemplateFormat" }, "invocation_parameters": { "oneOf": [ { "$ref": "#/components/schemas/PromptOpenAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptAzureOpenAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptAnthropicInvocationParameters" }, { "$ref": "#/components/schemas/PromptGoogleInvocationParameters" }, { "$ref": "#/components/schemas/PromptDeepSeekInvocationParameters" }, { "$ref": "#/components/schemas/PromptXAIInvocationParameters" }, { "$ref": "#/components/schemas/PromptOllamaInvocationParameters" }, { "$ref": "#/components/schemas/PromptAwsInvocationParameters" }, { "$ref": "#/components/schemas/PromptCerebrasInvocationParameters" }, { "$ref": "#/components/schemas/PromptFireworksInvocationParameters" }, { "$ref": "#/components/schemas/PromptGroqInvocationParameters" }, { "$ref": "#/components/schemas/PromptMoonshotInvocationParameters" }, { "$ref": "#/components/schemas/PromptPerplexityInvocationParameters" }, { "$ref": "#/components/schemas/PromptTogetherInvocationParameters" } ], "title": "Invocation Parameters", "discriminator": { "propertyName": "type", "mapping": { "anthropic": "#/components/schemas/PromptAnthropicInvocationParameters", "aws": "#/components/schemas/PromptAwsInvocationParameters", "azure_openai": "#/components/schemas/PromptAzureOpenAIInvocationParameters", "cerebras": "#/components/schemas/PromptCerebrasInvocationParameters", "deepseek": "#/components/schemas/PromptDeepSeekInvocationParameters", "fireworks": "#/components/schemas/PromptFireworksInvocationParameters", "google": "#/components/schemas/PromptGoogleInvocationParameters", "groq": "#/components/schemas/PromptGroqInvocationParameters", "moonshot": "#/components/schemas/PromptMoonshotInvocationParameters", "ollama": "#/components/schemas/PromptOllamaInvocationParameters", "openai": "#/components/schemas/PromptOpenAIInvocationParameters", "perplexity": "#/components/schemas/PromptPerplexityInvocationParameters", "together": "#/components/schemas/PromptTogetherInvocationParameters", "xai": "#/components/schemas/PromptXAIInvocationParameters" } } }, "tools": { "anyOf": [ { "$ref": "#/components/schemas/PromptTools" }, { "type": "null" } ] }, "response_format": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/PromptResponseFormatJSONSchema" } ], "discriminator": { "propertyName": "type", "mapping": { "json_schema": "#/components/schemas/PromptResponseFormatJSONSchema" } } }, { "type": "null" } ], "title": "Response Format" } }, "type": "object", "required": [ "model_provider", "model_name", "template", "template_type", "template_format", "invocation_parameters" ], "title": "PromptVersionData" }, "PromptVersionTag": { "properties": { "name": { "$ref": "#/components/schemas/Identifier" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "name", "id" ], "title": "PromptVersionTag" }, "PromptVersionTagData": { "properties": { "name": { "$ref": "#/components/schemas/Identifier" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name" ], "title": "PromptVersionTagData" }, "PromptXAIInvocationParameters": { "properties": { "type": { "type": "string", "const": "xai", "title": "Type" }, "xai": { "$ref": "#/components/schemas/PromptXAIInvocationParametersContent" } }, "additionalProperties": false, "type": "object", "required": [ "type", "xai" ], "title": "PromptXAIInvocationParameters" }, "PromptXAIInvocationParametersContent": { "properties": { "temperature": { "type": "number", "title": "Temperature" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_completion_tokens": { "type": "integer", "title": "Max Completion Tokens" }, "frequency_penalty": { "type": "number", "title": "Frequency Penalty" }, "presence_penalty": { "type": "number", "title": "Presence Penalty" }, "top_p": { "type": "number", "title": "Top P" }, "seed": { "type": "integer", "title": "Seed" }, "stop": { "items": { "type": "string" }, "type": "array", "title": "Stop" }, "reasoning_effort": { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ], "title": "Reasoning Effort" }, "extra_body": { "additionalProperties": true, "type": "object", "title": "Extra Body" } }, "additionalProperties": false, "type": "object", "title": "PromptXAIInvocationParametersContent" }, "ReasoningUIPart": { "properties": { "type": { "type": "string", "const": "reasoning", "title": "Type", "default": "reasoning" }, "text": { "type": "string", "title": "Text" }, "state": { "anyOf": [ { "type": "string", "enum": [ "streaming", "done" ] }, { "type": "null" } ], "title": "State" }, "providerMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Providermetadata" } }, "additionalProperties": false, "type": "object", "required": [ "text" ], "title": "ReasoningUIPart", "description": "A reasoning part of a message." }, "ResponseBody_UpsertOrDeleteSecretsResult_": { "properties": { "data": { "$ref": "#/components/schemas/UpsertOrDeleteSecretsResult" } }, "type": "object", "required": [ "data" ], "title": "ResponseBody[UpsertOrDeleteSecretsResult]" }, "SecretKeyValue": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Value", "description": "Provide a string to create or update the secret, or explicit null to delete it. This field is required; omitting it returns 422." } }, "type": "object", "required": [ "key", "value" ], "title": "SecretKeyValue", "description": "A single secret entry specifying a key and a required nullable value." }, "SessionAnnotation": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "type": "string", "enum": [ "API", "APP" ], "title": "Source" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "session_id": { "type": "string", "title": "Session Id", "description": "Session ID" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "source", "user_id", "name", "annotator_kind", "session_id" ], "title": "SessionAnnotation" }, "SessionAnnotationData": { "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "session_id": { "type": "string", "title": "Session Id", "description": "Session ID" } }, "type": "object", "required": [ "name", "annotator_kind", "session_id" ], "title": "SessionAnnotationData" }, "SessionAnnotationsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SessionAnnotation" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "SessionAnnotationsResponseBody" }, "SessionContext": { "properties": { "type": { "type": "string", "const": "session", "title": "Type" }, "projectNodeId": { "type": "string", "title": "Projectnodeid" }, "sessionNodeId": { "type": "string", "title": "Sessionnodeid" } }, "type": "object", "required": [ "type", "projectNodeId", "sessionNodeId" ], "title": "SessionContext", "description": "Session the user is currently viewing." }, "SessionData": { "properties": { "id": { "type": "string", "title": "Id" }, "session_id": { "type": "string", "title": "Session Id" }, "project_id": { "type": "string", "title": "Project Id" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time" }, "traces": { "items": { "$ref": "#/components/schemas/SessionTraceData" }, "type": "array", "title": "Traces" }, "token_count_prompt": { "type": "integer", "title": "Token Count Prompt", "description": "Cumulative prompt token count across all spans in the session.", "default": 0 }, "token_count_completion": { "type": "integer", "title": "Token Count Completion", "description": "Cumulative completion token count across all spans in the session.", "default": 0 }, "token_count_total": { "type": "integer", "title": "Token Count Total", "description": "Cumulative total token count across all spans in the session (prompt + completion).", "default": 0 } }, "type": "object", "required": [ "id", "session_id", "project_id", "start_time", "end_time", "traces" ], "title": "SessionData" }, "SessionNoteData": { "properties": { "session_id": { "type": "string", "minLength": 1, "title": "Session Id", "description": "Session ID" }, "note": { "type": "string", "minLength": 1, "title": "Note", "description": "The note text to add to the session" }, "identifier": { "type": "string", "title": "Identifier", "description": "Optional caller-supplied identifier. When non-empty, the note is upserted on (session_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note. When omitted or empty, the server stamps a unique 'px-session-note:' identifier so each call appends a new note.", "default": "" } }, "type": "object", "required": [ "session_id", "note" ], "title": "SessionNoteData" }, "SessionTraceData": { "properties": { "id": { "type": "string", "title": "Id" }, "trace_id": { "type": "string", "title": "Trace Id" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time" } }, "type": "object", "required": [ "id", "trace_id", "start_time", "end_time" ], "title": "SessionTraceData" }, "SetDatasetLabelsForDatasetResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/DatasetLabel" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "SetDatasetLabelsForDatasetResponseBody" }, "SetDatasetLabelsRequestBody": { "properties": { "dataset_label_ids": { "items": { "type": "string" }, "type": "array", "title": "Dataset Label Ids", "description": "The complete set of dataset label GlobalIDs to apply to the dataset. Labels not in this list are removed from the dataset; an empty list removes all labels." } }, "type": "object", "title": "SetDatasetLabelsRequestBody" }, "SetProjectAnnotationConfigsRequestBody": { "properties": { "annotation_config_ids": { "items": { "type": "string" }, "type": "array", "title": "Annotation Config Ids", "description": "The complete set of annotation configuration GlobalIDs that should be assigned to the project. Configs not in this list are unassigned; an empty list clears all assignments." } }, "type": "object", "required": [ "annotation_config_ids" ], "title": "SetProjectAnnotationConfigsRequestBody" }, "SetProjectAnnotationConfigsResponseBody": { "properties": { "data": { "items": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "SetProjectAnnotationConfigsResponseBody" }, "SourceDocumentUIPart": { "properties": { "type": { "type": "string", "const": "source-document", "title": "Type", "default": "source-document" }, "sourceId": { "type": "string", "title": "Sourceid" }, "mediaType": { "type": "string", "title": "Mediatype" }, "title": { "type": "string", "title": "Title" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "providerMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Providermetadata" } }, "additionalProperties": false, "type": "object", "required": [ "sourceId", "mediaType", "title" ], "title": "SourceDocumentUIPart", "description": "A document source part of a message." }, "SourceUrlUIPart": { "properties": { "type": { "type": "string", "const": "source-url", "title": "Type", "default": "source-url" }, "sourceId": { "type": "string", "title": "Sourceid" }, "url": { "type": "string", "title": "Url" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "providerMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Providermetadata" } }, "additionalProperties": false, "type": "object", "required": [ "sourceId", "url" ], "title": "SourceUrlUIPart", "description": "A source part of a message." }, "Span": { "properties": { "id": { "type": "string", "title": "Id", "description": "Span Global ID, distinct from the OpenTelemetry span ID", "default": "" }, "name": { "type": "string", "title": "Name", "description": "Name of the span operation" }, "context": { "$ref": "#/components/schemas/SpanContext", "description": "Span context containing trace_id and span_id" }, "span_kind": { "type": "string", "title": "Span Kind", "description": "Type of work that the span encapsulates" }, "parent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Id", "description": "OpenTelemetry span ID of the parent span" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "Start time of the span (must be timezone-aware)" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "End time of the span (must be timezone-aware)" }, "status_code": { "type": "string", "title": "Status Code", "description": "Status code of the span" }, "status_message": { "type": "string", "title": "Status Message", "description": "Status message", "default": "" }, "attributes": { "additionalProperties": true, "type": "object", "title": "Attributes", "description": "Span attributes" }, "events": { "items": { "$ref": "#/components/schemas/SpanEvent" }, "type": "array", "title": "Events", "description": "Span events" } }, "type": "object", "required": [ "name", "context", "span_kind", "start_time", "end_time", "status_code" ], "title": "Span", "examples": [ { "attributes": { "llm.model_name": "gpt-4", "llm.token_count.completion": 50, "llm.token_count.prompt": 100 }, "context": { "span_id": "1a2b3c4d5e6f7a8b", "trace_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4" }, "end_time": "2024-01-01T12:00:01Z", "events": [], "name": "llm_call", "span_kind": "LLM", "start_time": "2024-01-01T12:00:00Z", "status_code": "OK", "status_message": "" } ] }, "SpanAnnotation": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "type": "string", "enum": [ "API", "APP" ], "title": "Source" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "span_id": { "type": "string", "title": "Span Id", "description": "OpenTelemetry Span ID (hex format w/o 0x prefix)" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "source", "user_id", "name", "annotator_kind", "span_id" ], "title": "SpanAnnotation" }, "SpanAnnotationData": { "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "span_id": { "type": "string", "title": "Span Id", "description": "OpenTelemetry Span ID (hex format w/o 0x prefix)" } }, "type": "object", "required": [ "name", "annotator_kind", "span_id" ], "title": "SpanAnnotationData" }, "SpanAnnotationsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/SpanAnnotation" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "SpanAnnotationsResponseBody" }, "SpanContext": { "properties": { "trace_id": { "type": "string", "title": "Trace Id", "description": "OpenTelemetry trace ID" }, "span_id": { "type": "string", "title": "Span Id", "description": "OpenTelemetry span ID" } }, "type": "object", "required": [ "trace_id", "span_id" ], "title": "SpanContext", "examples": [ { "span_id": "1a2b3c4d5e6f7a8b", "trace_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4" } ] }, "SpanDocumentAnnotationData": { "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "span_id": { "type": "string", "title": "Span Id", "description": "OpenTelemetry Span ID (hex format w/o 0x prefix)" }, "document_position": { "type": "integer", "title": "Document Position", "description": "A 0 based index of the document. E.x. the first document during retrieval is 0" } }, "type": "object", "required": [ "name", "annotator_kind", "span_id", "document_position" ], "title": "SpanDocumentAnnotationData" }, "SpanEvent": { "properties": { "name": { "type": "string", "title": "Name", "description": "Name of the event" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "When the event occurred (must be timezone-aware)" }, "attributes": { "additionalProperties": true, "type": "object", "title": "Attributes", "description": "Event attributes" } }, "type": "object", "required": [ "name", "timestamp" ], "title": "SpanEvent", "examples": [ { "attributes": { "exception.message": "Connection refused" }, "name": "exception", "timestamp": "2024-01-01T12:00:00Z" } ] }, "SpanNoteData": { "properties": { "span_id": { "type": "string", "minLength": 1, "title": "Span Id", "description": "OpenTelemetry Span ID (hex format w/o 0x prefix)" }, "note": { "type": "string", "minLength": 1, "title": "Note", "description": "The note text to add to the span" }, "identifier": { "type": "string", "title": "Identifier", "description": "Optional caller-supplied identifier. When non-empty, the note is upserted on (span_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note. When omitted or empty, the server stamps a unique 'px-span-note:' identifier so each call appends a new note.", "default": "" } }, "type": "object", "required": [ "span_id", "note" ], "title": "SpanNoteData" }, "SpansResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/Span" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "SpansResponseBody" }, "StepStartUIPart": { "properties": { "type": { "type": "string", "const": "step-start", "title": "Type", "default": "step-start" } }, "additionalProperties": false, "type": "object", "title": "StepStartUIPart", "description": "A step boundary part of a message." }, "SubagentsContext": { "properties": { "type": { "type": "string", "const": "subagents", "title": "Type" }, "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "type", "enabled" ], "title": "SubagentsContext", "description": "User's per-turn request to expose the subagent-spawning tool." }, "TextContentPart": { "properties": { "type": { "type": "string", "const": "text", "title": "Type" }, "text": { "type": "string", "title": "Text" } }, "additionalProperties": false, "type": "object", "required": [ "type", "text" ], "title": "TextContentPart" }, "TextUIPart": { "properties": { "type": { "type": "string", "const": "text", "title": "Type", "default": "text" }, "text": { "type": "string", "title": "Text" }, "state": { "anyOf": [ { "type": "string", "enum": [ "streaming", "done" ] }, { "type": "null" } ], "title": "State" }, "providerMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Providermetadata" } }, "additionalProperties": false, "type": "object", "required": [ "text" ], "title": "TextUIPart", "description": "A text part of a message." }, "ToolApprovalRequested": { "properties": { "id": { "type": "string", "title": "Id" } }, "additionalProperties": false, "type": "object", "required": [ "id" ], "title": "ToolApprovalRequested", "description": "Tool approval in requested state (awaiting user response)." }, "ToolApprovalRequestedPart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "approval-requested", "title": "State", "default": "approval-requested" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolApprovalRequestedPart", "description": "Tool part in approval-requested state (awaiting user decision)." }, "ToolApprovalResponded": { "properties": { "id": { "type": "string", "title": "Id" }, "approved": { "type": "boolean", "title": "Approved" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "additionalProperties": false, "type": "object", "required": [ "id", "approved" ], "title": "ToolApprovalResponded", "description": "Tool approval in responded state (user has approved or denied)." }, "ToolApprovalRespondedPart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "approval-responded", "title": "State", "default": "approval-responded" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolApprovalRespondedPart", "description": "Tool part in approval-responded state (user approved/denied, execution pending)." }, "ToolCallContentPart": { "properties": { "type": { "type": "string", "const": "tool_call", "title": "Type" }, "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "tool_call": { "oneOf": [ { "$ref": "#/components/schemas/ToolCallFunction" } ], "title": "Tool Call", "discriminator": { "propertyName": "type", "mapping": { "function": "#/components/schemas/ToolCallFunction" } } } }, "additionalProperties": false, "type": "object", "required": [ "type", "tool_call_id", "tool_call" ], "title": "ToolCallContentPart" }, "ToolCallFunction": { "properties": { "type": { "type": "string", "const": "function", "title": "Type" }, "name": { "type": "string", "title": "Name" }, "arguments": { "type": "string", "title": "Arguments" } }, "additionalProperties": false, "type": "object", "required": [ "type", "name", "arguments" ], "title": "ToolCallFunction" }, "ToolInputAvailablePart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "input-available", "title": "State", "default": "input-available" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolInputAvailablePart", "description": "Tool part in input-available state." }, "ToolInputStreamingPart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "input-streaming", "title": "State", "default": "input-streaming" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolInputStreamingPart", "description": "Tool part in input-streaming state." }, "ToolOutputAvailablePart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-available", "title": "State", "default": "output-available" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "output": { "anyOf": [ {}, { "type": "null" } ], "title": "Output" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "preliminary": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Preliminary" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolOutputAvailablePart", "description": "Tool part in output-available state." }, "ToolOutputDeniedPart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-denied", "title": "State", "default": "output-denied" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId" ], "title": "ToolOutputDeniedPart", "description": "Tool part in output-denied state (tool was denied, terminal state)." }, "ToolOutputErrorPart": { "properties": { "type": { "type": "string", "pattern": "^tool-", "title": "Type" }, "toolCallId": { "type": "string", "title": "Toolcallid" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "state": { "type": "string", "const": "output-error", "title": "State", "default": "output-error" }, "input": { "anyOf": [ {}, { "type": "null" } ], "title": "Input" }, "rawInput": { "anyOf": [ {}, { "type": "null" } ], "title": "Rawinput" }, "errorText": { "type": "string", "title": "Errortext" }, "providerExecuted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Providerexecuted" }, "callProviderMetadata": { "anyOf": [ { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Callprovidermetadata" }, "approval": { "anyOf": [ { "$ref": "#/components/schemas/ToolApprovalRequested" }, { "$ref": "#/components/schemas/ToolApprovalResponded" }, { "type": "null" } ], "title": "Approval" } }, "additionalProperties": false, "type": "object", "required": [ "type", "toolCallId", "errorText" ], "title": "ToolOutputErrorPart", "description": "Tool part in output-error state." }, "ToolResultContentPart": { "properties": { "type": { "type": "string", "const": "tool_result", "title": "Type" }, "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "tool_result": { "anyOf": [ { "type": "boolean" }, { "type": "integer" }, { "type": "number" }, { "type": "string" }, { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Tool Result" } }, "additionalProperties": false, "type": "object", "required": [ "type", "tool_call_id", "tool_result" ], "title": "ToolResultContentPart" }, "TraceAnnotation": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "type": "string", "enum": [ "API", "APP" ], "title": "Source" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "trace_id": { "type": "string", "title": "Trace Id", "description": "OpenTelemetry Trace ID (hex format w/o 0x prefix)" } }, "type": "object", "required": [ "id", "created_at", "updated_at", "source", "user_id", "name", "annotator_kind", "trace_id" ], "title": "TraceAnnotation" }, "TraceAnnotationData": { "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the annotation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the annotation" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnnotationResult" }, { "type": "null" } ], "description": "The result of the annotation" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the annotation" }, "identifier": { "type": "string", "title": "Identifier", "description": "The identifier of the annotation. If provided, the annotation will be updated if it already exists.", "default": "" }, "trace_id": { "type": "string", "title": "Trace Id", "description": "OpenTelemetry Trace ID (hex format w/o 0x prefix)" } }, "type": "object", "required": [ "name", "annotator_kind", "trace_id" ], "title": "TraceAnnotationData" }, "TraceAnnotationsResponseBody": { "properties": { "data": { "items": { "$ref": "#/components/schemas/TraceAnnotation" }, "type": "array", "title": "Data" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "data", "next_cursor" ], "title": "TraceAnnotationsResponseBody" }, "TraceContext": { "properties": { "type": { "type": "string", "const": "trace", "title": "Type" }, "projectNodeId": { "type": "string", "title": "Projectnodeid" }, "otelTraceId": { "type": "string", "title": "Oteltraceid" } }, "type": "object", "required": [ "type", "projectNodeId", "otelTraceId" ], "title": "TraceContext" }, "TraceData": { "properties": { "id": { "type": "string", "title": "Id" }, "trace_id": { "type": "string", "title": "Trace Id" }, "project_id": { "type": "string", "title": "Project Id" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time" }, "token_count_prompt": { "type": "integer", "title": "Token Count Prompt", "description": "Cumulative prompt token count across all spans in the trace.", "default": 0 }, "token_count_completion": { "type": "integer", "title": "Token Count Completion", "description": "Cumulative completion token count across all spans in the trace.", "default": 0 }, "token_count_total": { "type": "integer", "title": "Token Count Total", "description": "Cumulative total token count across all spans in the trace (prompt + completion).", "default": 0 }, "spans": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TraceSpanData" }, "type": "array" }, { "type": "null" } ], "title": "Spans" } }, "type": "object", "required": [ "id", "trace_id", "project_id", "start_time", "end_time" ], "title": "TraceData" }, "TraceNoteData": { "properties": { "trace_id": { "type": "string", "minLength": 1, "title": "Trace Id", "description": "OpenTelemetry Trace ID (hex format w/o 0x prefix)" }, "note": { "type": "string", "minLength": 1, "title": "Note", "description": "The note text to add to the trace" }, "identifier": { "type": "string", "title": "Identifier", "description": "Optional caller-supplied identifier. When non-empty, the note is upserted on (trace_id, name='note', identifier) \u2014 repeated calls with the same identifier overwrite the existing note. When omitted or empty, the server stamps a unique 'px-trace-note:' identifier so each call appends a new note.", "default": "" } }, "type": "object", "required": [ "trace_id", "note" ], "title": "TraceNoteData" }, "TraceSpanData": { "properties": { "id": { "type": "string", "title": "Id" }, "span_id": { "type": "string", "title": "Span Id" }, "parent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Id" }, "name": { "type": "string", "title": "Name" }, "span_kind": { "type": "string", "title": "Span Kind" }, "status_code": { "type": "string", "title": "Status Code" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time" } }, "type": "object", "required": [ "id", "span_id", "parent_id", "name", "span_kind", "status_code", "start_time", "end_time" ], "title": "TraceSpanData" }, "TurnTraceContext": { "properties": { "traceId": { "type": "string", "pattern": "^[0-9a-f]{32}$", "title": "Traceid" }, "rootSpanId": { "type": "string", "pattern": "^[0-9a-f]{16}$", "title": "Rootspanid" }, "startedAt": { "type": "string", "format": "date-time", "title": "Startedat" } }, "type": "object", "required": [ "traceId", "rootSpanId", "startedAt" ], "title": "TurnTraceContext" }, "UIMessage": { "properties": { "id": { "type": "string", "title": "Id" }, "role": { "type": "string", "enum": [ "system", "user", "assistant" ], "title": "Role" }, "metadata": { "anyOf": [ {}, { "type": "null" } ], "title": "Metadata" }, "parts": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TextUIPart" }, { "$ref": "#/components/schemas/ReasoningUIPart" }, { "$ref": "#/components/schemas/ToolInputStreamingPart" }, { "$ref": "#/components/schemas/ToolInputAvailablePart" }, { "$ref": "#/components/schemas/ToolOutputAvailablePart" }, { "$ref": "#/components/schemas/ToolOutputErrorPart" }, { "$ref": "#/components/schemas/ToolApprovalRequestedPart" }, { "$ref": "#/components/schemas/ToolApprovalRespondedPart" }, { "$ref": "#/components/schemas/ToolOutputDeniedPart" }, { "$ref": "#/components/schemas/DynamicToolInputStreamingPart" }, { "$ref": "#/components/schemas/DynamicToolInputAvailablePart" }, { "$ref": "#/components/schemas/DynamicToolOutputAvailablePart" }, { "$ref": "#/components/schemas/DynamicToolOutputErrorPart" }, { "$ref": "#/components/schemas/DynamicToolApprovalRequestedPart" }, { "$ref": "#/components/schemas/DynamicToolApprovalRespondedPart" }, { "$ref": "#/components/schemas/DynamicToolOutputDeniedPart" }, { "$ref": "#/components/schemas/SourceUrlUIPart" }, { "$ref": "#/components/schemas/SourceDocumentUIPart" }, { "$ref": "#/components/schemas/FileUIPart" }, { "$ref": "#/components/schemas/DataUIPart" }, { "$ref": "#/components/schemas/StepStartUIPart" } ] }, "type": "array", "title": "Parts" } }, "additionalProperties": false, "type": "object", "required": [ "id", "role", "parts" ], "title": "UIMessage", "description": "A message as displayed in the UI by Vercel AI Elements." }, "UpdateAnnotationConfigResponseBody": { "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CategoricalAnnotationConfig" }, { "$ref": "#/components/schemas/ContinuousAnnotationConfig" }, { "$ref": "#/components/schemas/FreeformAnnotationConfig" } ], "title": "Data", "discriminator": { "propertyName": "type", "mapping": { "CATEGORICAL": "#/components/schemas/CategoricalAnnotationConfig", "CONTINUOUS": "#/components/schemas/ContinuousAnnotationConfig", "FREEFORM": "#/components/schemas/FreeformAnnotationConfig" } } } }, "type": "object", "required": [ "data" ], "title": "UpdateAnnotationConfigResponseBody" }, "UpdateDatasetLabelRequestBody": { "properties": { "name": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Name", "description": "New name for the label (null is rejected; name is required)" }, "color": { "anyOf": [ { "type": "string", "pattern": "^#([0-9a-f]{6})$", "description": "A lowercase six-digit hex color code (e.g. '#00cc88')" }, { "type": "null" } ], "title": "Color", "description": "New lowercase hex color code for the label (null is rejected)" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "New description for the label (null clears the description)" } }, "type": "object", "title": "UpdateDatasetLabelRequestBody", "description": "Fields to update on a dataset label. Omit a field to leave it unchanged." }, "UpdateDatasetLabelResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/DatasetLabel" } }, "type": "object", "required": [ "data" ], "title": "UpdateDatasetLabelResponseBody" }, "UpdateExperimentRequestBody": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "New name for the experiment (null is rejected; name is required)" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "New description for the experiment (null clears the description)" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "New metadata object for the experiment (replaces the existing metadata as a whole; null is rejected)" } }, "type": "object", "title": "UpdateExperimentRequestBody", "description": "Fields to update on an experiment. Omit a field to leave it unchanged." }, "UpdateExperimentResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Experiment" } }, "type": "object", "required": [ "data" ], "title": "UpdateExperimentResponseBody" }, "UpdateProjectRequestBody": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "UpdateProjectRequestBody" }, "UpdateProjectResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/Project" } }, "type": "object", "required": [ "data" ], "title": "UpdateProjectResponseBody" }, "UploadDatasetData": { "properties": { "dataset_id": { "type": "string", "title": "Dataset Id" }, "version_id": { "type": "string", "title": "Version Id" }, "num_created_examples": { "type": "integer", "title": "Num Created Examples" }, "num_updated_examples": { "type": "integer", "title": "Num Updated Examples" }, "num_deleted_examples": { "type": "integer", "title": "Num Deleted Examples" } }, "type": "object", "required": [ "dataset_id", "version_id", "num_created_examples", "num_updated_examples", "num_deleted_examples" ], "title": "UploadDatasetData" }, "UploadDatasetResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/UploadDatasetData" } }, "type": "object", "required": [ "data" ], "title": "UploadDatasetResponseBody" }, "UpsertExperimentEvaluationRequestBody": { "properties": { "experiment_run_id": { "type": "string", "title": "Experiment Run Id", "description": "The ID of the experiment run being evaluated" }, "name": { "type": "string", "title": "Name", "description": "The name of the evaluation" }, "annotator_kind": { "type": "string", "enum": [ "LLM", "CODE", "HUMAN" ], "title": "Annotator Kind", "description": "The kind of annotator used for the evaluation" }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "The start time of the evaluation in ISO format" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "The end time of the evaluation in ISO format" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/ExperimentEvaluationResult" }, { "type": "null" } ], "description": "The result of the evaluation. Either result or error must be provided." }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error", "description": "Error message if the evaluation encountered an error. Either result or error must be provided." }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Metadata for the evaluation" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id", "description": "Optional trace ID for tracking" } }, "type": "object", "required": [ "experiment_run_id", "name", "annotator_kind", "start_time", "end_time" ], "title": "UpsertExperimentEvaluationRequestBody" }, "UpsertExperimentEvaluationResponseBody": { "properties": { "data": { "$ref": "#/components/schemas/UpsertExperimentEvaluationResponseBodyData" } }, "type": "object", "required": [ "data" ], "title": "UpsertExperimentEvaluationResponseBody" }, "UpsertExperimentEvaluationResponseBodyData": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the upserted experiment evaluation" } }, "type": "object", "required": [ "id" ], "title": "UpsertExperimentEvaluationResponseBodyData" }, "UpsertOrDeleteSecretsRequest": { "properties": { "secrets": { "items": { "$ref": "#/components/schemas/SecretKeyValue" }, "type": "array", "title": "Secrets" } }, "type": "object", "required": [ "secrets" ], "title": "UpsertOrDeleteSecretsRequest", "description": "Request body for the PUT /secrets endpoint." }, "UpsertOrDeleteSecretsResult": { "properties": { "upserted_keys": { "items": { "type": "string" }, "type": "array", "title": "Upserted Keys" }, "deleted_keys": { "items": { "type": "string" }, "type": "array", "title": "Deleted Keys" } }, "type": "object", "required": [ "upserted_keys", "deleted_keys" ], "title": "UpsertOrDeleteSecretsResult", "description": "Result payload listing which keys were upserted and which were deleted." }, "UserApiKey": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "user": { "$ref": "#/components/schemas/ApiKeyUser" } }, "type": "object", "required": [ "id", "name", "created_at", "user" ], "title": "UserApiKey" }, "UserMessageMetadata": { "properties": { "type": { "type": "string", "const": "user", "title": "Type", "default": "user" }, "currentDateTime": { "type": "string", "maxLength": 128, "title": "Currentdatetime" }, "timeZone": { "type": "string", "maxLength": 128, "title": "Timezone" } }, "type": "object", "required": [ "currentDateTime", "timeZone" ], "title": "UserMessageMetadata", "description": "Wire schema for metadata the browser attaches to outgoing user messages." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WebAccessContext": { "properties": { "type": { "type": "string", "const": "web_access", "title": "Type" }, "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "type", "enabled" ], "title": "WebAccessContext", "description": "User's per-turn request to expose web search / fetch tools." }, "_SummarizeRequest": { "properties": { "ingestTraces": { "type": "boolean", "title": "Ingesttraces", "default": false }, "exportRemoteTraces": { "type": "boolean", "title": "Exportremotetraces", "default": false }, "attachUserId": { "type": "boolean", "title": "Attachuserid", "description": "When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.", "default": false }, "messages": { "items": { "$ref": "#/components/schemas/UIMessage" }, "type": "array", "title": "Messages" }, "model": { "oneOf": [ { "$ref": "#/components/schemas/CustomProviderModelSelection" }, { "$ref": "#/components/schemas/BuiltInProviderModelSelection" } ], "title": "Model", "discriminator": { "propertyName": "providerType", "mapping": { "builtin": "#/components/schemas/BuiltInProviderModelSelection", "custom": "#/components/schemas/CustomProviderModelSelection" } } } }, "type": "object", "required": [ "messages", "model" ], "title": "_SummarizeRequest", "description": "Body for POST /agents/{agent_id}/sessions/{session_id}/summary.\n\nCarries the Vercel-style messages array; the backend owns the prompt and\nthe structured-output tool schema." }, "_SummarizeResponse": { "properties": { "summary": { "type": "string", "title": "Summary" } }, "type": "object", "required": [ "summary" ], "title": "_SummarizeResponse" }, "ToolCallCallbackProviderMetadata": { "additionalProperties": false, "description": "Shape of the ``phoenix`` namespace the browser returns in\n``callProviderMetadata`` on resolved tool parts: the server-stamped fields\nplus browser-recorded execution timings.", "properties": { "tool_execution_environment": { "enum": [ "client", "server" ], "title": "Tool Execution Environment", "type": "string" }, "tool_input_emitted_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tool Input Emitted At" }, "client_started_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Client Started At" }, "client_ended_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Client Ended At" } }, "required": [ "tool_execution_environment" ], "title": "ToolCallCallbackProviderMetadata", "type": "object" }, "ToolCallProviderMetadata": { "additionalProperties": false, "description": "Payload Phoenix stamps under the ``phoenix`` namespace of Vercel AI\n``providerMetadata`` on tool-call chunks (``tool-input-start`` and\n``tool-input-available``).", "properties": { "tool_execution_environment": { "enum": [ "client", "server" ], "title": "Tool Execution Environment", "type": "string" }, "tool_input_emitted_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tool Input Emitted At" } }, "required": [ "tool_execution_environment" ], "title": "ToolCallProviderMetadata", "type": "object" } } } }