> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-api/models.md).

# Models

## The Body\_createSkillV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"Body_createSkillV2":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","description":"Bundle files; each part's filename is its relative POSIX path inside the bundle (optionally under one shared root folder). A single .zip is accepted as an alternative."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Skill name (form mode); a changed name renames the skill when published."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Skill description (form mode)."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"SKILL.md body (form mode)."},"actions":{"items":{"type":"string"},"type":"array","title":"Actions","description":"Action refs; repeat the field per item."}},"type":"object","title":"Body_createSkillV2"}}}}
```

## The Body\_createSkillVersionV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"Body_createSkillVersionV2":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","description":"Bundle files; each part's filename is its relative POSIX path inside the bundle (optionally under one shared root folder). A single .zip is accepted as an alternative."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Skill name (form mode); a changed name renames the skill when published."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Skill description (form mode)."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"SKILL.md body (form mode)."},"actions":{"items":{"type":"string"},"type":"array","title":"Actions","description":"Action refs; repeat the field per item."},"carry_paths":{"items":{"type":"string"},"type":"array","title":"Carry Paths","description":"File paths to carry over unchanged from the current files; repeat the field per item."},"base_version":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Base Version","description":"Version to copy carry_paths from; defaults to the current version."}},"type":"object","title":"Body_createSkillVersionV2"}}}}
```

## The Body\_uploadKnowledgeBaseResource object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"Body_uploadKnowledgeBaseResource":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"The file to upload to the knowledge base"}},"type":"object","required":["file"],"title":"Body_uploadKnowledgeBaseResource"}}}}
```

## The Body\_uploadKnowledgeBaseResourceV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"Body_uploadKnowledgeBaseResourceV2":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"The file to upload to the knowledge base"}},"type":"object","required":["file"],"title":"Body_uploadKnowledgeBaseResourceV2"}}}}
```

## The BooleanProperty object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"BooleanProperty":{"properties":{"type":{"type":"string","const":"boolean","title":"Type","default":"boolean"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"BooleanProperty"}}}}
```

## The CacheMeasurement object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CacheMeasurement":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"read_input_tokens":{"type":"integer","minimum":0,"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens"}},"type":"object","required":["read_input_tokens","observed_input_tokens"],"title":"CacheMeasurement","description":"A measured subset of provider input, excluding unobserved calls."}}}}
```

## The CacheMetrics object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CacheMetrics":{"properties":{"read_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens","default":0},"known_input_tokens":{"type":"integer","minimum":0,"title":"Known Input Tokens","default":0},"missing_input_usage_records":{"type":"integer","minimum":0,"title":"Missing Input Usage Records","default":0},"cached_input_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Percent","description":"Return cache-read share for precisely the measured subset.","readOnly":true},"input_coverage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Coverage Percent","description":"Return observed share of recorded input, not provider-attempt coverage.","readOnly":true}},"type":"object","required":["cached_input_percent","input_coverage_percent"],"title":"CacheMetrics","description":"Weighted cache reads over measured input, including writes but excluding output."}}}}
```

## The ChunkerType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"}}}}
```

## The ConnectionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ConnectionResponseV2":{"properties":{"connection_id":{"type":"string","format":"uuid","title":"Connection Id"},"provider_id":{"type":"string","title":"Provider Id"},"auth_method":{"type":"string","title":"Auth Method"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"$ref":"#/components/schemas/ConnectionStatusV2"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["connection_id","provider_id","auth_method","name","status","expires_at","created_at","updated_at"],"title":"ConnectionResponse","description":"A connection on the public v2 surface, deliberately credential-free."},"ConnectionStatusV2":{"type":"string","enum":["active","needs_reconnection"],"title":"ConnectionStatusV2","description":"Public connection status: healthy vs. needing a reconnect."}}}}
```

## The ConnectionStatusV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ConnectionStatusV2":{"type":"string","enum":["active","needs_reconnection"],"title":"ConnectionStatusV2","description":"Public connection status: healthy vs. needing a reconnect."}}}}
```

## The CreateKnowledgeBaseEmbeddingParams object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."}}}}
```

## The CreateKnowledgeBaseRequest object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CreateKnowledgeBaseRequest":{"properties":{"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled","default":false},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseIndexingParamsRequest"},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseRequest","description":"Payload to create a new knowledge base."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseIndexingParamsRequest":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/CreateKnowledgeBaseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","title":"KnowledgeBaseIndexingParamsRequest","description":"Parameters that control how documents are indexed into a knowledge base."},"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The CreateKnowledgeBaseRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CreateKnowledgeBaseRequestV2":{"properties":{"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled","default":false},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseIndexingParamsRequest"},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseRequest","description":"Payload to create a new knowledge base."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseIndexingParamsRequest":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/CreateKnowledgeBaseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","title":"KnowledgeBaseIndexingParamsRequest","description":"Parameters that control how documents are indexed into a knowledge base."},"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The CreateWebhookSubscriptionRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CreateWebhookSubscriptionRequestV2":{"properties":{"url":{"type":"string","title":"Url","description":"The HTTPS endpoint that receives the signed event payloads."},"event_types":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array","title":"Event Types","description":"Event types this subscription receives, for example `run.succeeded`."}},"additionalProperties":false,"type":"object","required":["url","event_types"],"title":"CreateWebhookSubscriptionRequest","description":"A new webhook subscription on the public v2 surface."},"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The CursorPaginatedResponse\_EvalMonitorSampledRunResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CursorPaginatedResponse_EvalMonitorSampledRunResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalMonitorSampledRunResponseV2"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"current_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Cursor"}},"type":"object","title":"CursorPaginatedResponse[EvalMonitorSampledRunResponseV2]"},"EvalMonitorSampledRunResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"scores":{"items":{"$ref":"#/components/schemas/EvalScoreResponseV2"},"type":"array","title":"Scores"}},"type":"object","required":["run_id","created_at","input_snapshot","output_snapshot","scores"],"title":"EvalMonitorSampledRun"},"EvalScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at"],"title":"EvalScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The CursorPaginatedResponse\_EvalRunScoreResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CursorPaginatedResponse_EvalRunScoreResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalRunScoreResponseV2"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"current_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Cursor"}},"type":"object","title":"CursorPaginatedResponse[EvalRunScoreResponseV2]"},"EvalRunScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at","evaluator_name"],"title":"EvalRunScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The CursorPaginatedResponse\_KnowledgeBaseFileResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CursorPaginatedResponse_KnowledgeBaseFileResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileResponseV2"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"current_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Cursor"}},"type":"object","title":"CursorPaginatedResponse[KnowledgeBaseFileResponseV2]"},"KnowledgeBaseFileResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"},"indexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Indexed At"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"resource_path":{"type":"string","minLength":1,"title":"Resource Path"},"acl_target_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl Target Path"},"dataloader_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Dataloader Metadata"},"user_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"User Metadata"},"content_hash":{"type":"string","minLength":1,"title":"Content Hash"},"content_mime":{"type":"string","minLength":1,"title":"Content Mime"},"size":{"type":"integer","minimum":0,"title":"Size"},"status":{"$ref":"#/components/schemas/StackFileStatusEnum"},"effective_permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Effective Permissions"}},"type":"object","required":["knowledge_base_id","created_at","modified_at","resource_id","resource_path","content_hash","content_mime","size","status"],"title":"KnowledgeBaseFileResponse","description":"A file stored in a knowledge base."},"StackFileStatusEnum":{"type":"string","enum":["resource","parsed","indexed","pending","pending_delete","deleted","error"],"title":"StackFileStatusEnum","description":"Processing status of a file in a knowledge base."}}}}
```

## The CursorPaginatedResponse\_KnowledgeBaseResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CursorPaginatedResponse_KnowledgeBaseResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/KnowledgeBaseResponseV2"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"current_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Cursor"}},"type":"object","title":"CursorPaginatedResponse[KnowledgeBaseResponseV2]"},"KnowledgeBaseResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled"},"connection_provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Provider Type"},"is_empty":{"type":"boolean","title":"Is Empty","default":true},"total_size":{"type":"integer","title":"Total Size","default":0},"total_files":{"type":"integer","title":"Total Files","default":0},"total_indexed_files":{"type":"integer","title":"Total Indexed Files","default":0},"total_error_files":{"type":"integer","title":"Total Error Files","default":0},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseIndexingParams"},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]},"role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"type":"object","required":["knowledge_base_id","connection_id","created_at","updated_at","connection_source_ids","website_sources","source_file_authorization_enabled","indexing_params"],"title":"KnowledgeBaseResponse","description":"A knowledge base on the public v2 surface."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseResponseIndexingParams":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","required":["embedding_params"],"title":"KnowledgeBaseResponseIndexingParams","description":"Indexing configuration of a knowledge base."},"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The CursorPaginatedResponse\_RunSummaryResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"CursorPaginatedResponse_RunSummaryResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/RunSummaryResponseV2"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"current_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Cursor"}},"type":"object","title":"CursorPaginatedResponse[RunSummaryResponseV2]"},"RunSummaryResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the run."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project the run executed. Null for legacy runs."},"project_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version","description":"Project version used for this run: -1 for a draft execution, a non-negative integer for a numbered version, or null when the version could not be determined."},"status":{"$ref":"#/components/schemas/RunStatusV2","description":"Lifecycle status of the run."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure message. Null when the run did not fail."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was recorded."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started. Null when unknown or not yet started."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished. Null when unknown or not yet finished."},"run_type":{"anyOf":[{"$ref":"#/components/schemas/RunTypeV2"},{"type":"null"}],"description":"How the run was started. Null when not recorded."},"created_by":{"anyOf":[{"$ref":"#/components/schemas/RunCreatedByV2"},{"type":"null"}],"description":"Principal that started the run. Null when not recorded."},"usage":{"$ref":"#/components/schemas/RunUsageV2","description":"Token usage for the run."},"parent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Run Id","description":"Run that started this one. Null unless this is a sub-workflow run."},"parent_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Id","description":"Project of the parent run. Null unless this is a sub-workflow run."}},"additionalProperties":false,"type":"object","required":["run_id","project_id","status","error","created_at","started_at","completed_at","run_type","created_by","usage","parent_run_id","parent_project_id"],"title":"RunSummaryResponse","description":"A list row without its unbounded input, output, or citations."},"RunStatusV2":{"type":"string","enum":["queued","running","paused","succeeded","failed","cancelled"],"title":"RunStatusV2","description":"Lifecycle status exposed by the Runs v2 API."},"RunTypeV2":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval","unknown"],"title":"RunTypeV2","description":"How the run was started. Unrecognized types appear as `unknown`."},"RunCreatedByV2":{"properties":{"type":{"$ref":"#/components/schemas/RunCreatedByTypeV2","description":"Kind of principal that started the run."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of the principal identified by `type`: the user ID for `user` and `personal_api_key`, the organization ID for `org_api_key`, the end-user ID for `end_user`. Null if no ID is available."}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"RunCreatedBy","description":"Who or what started the run."},"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."},"RunUsageV2":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens","description":"Tokens used across every model call in the run."},"details":{"items":{"$ref":"#/components/schemas/RunUsageDetailV2"},"type":"array","title":"Details","description":"Usage aggregated per model and connection; models may appear more than once."}},"additionalProperties":false,"type":"object","required":["total_tokens","details"],"title":"RunUsage","description":"Total and per-model token usage for a run."},"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."}}}}
```

## The DateProperty object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"DateProperty":{"properties":{"type":{"type":"string","const":"date","title":"Type","default":"date"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"DateProperty"}}}}
```

## The DeploymentStage object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"DeploymentStage":{"type":"string","enum":["draft","development","staging","production"],"title":"DeploymentStage","description":"Stages a workflow passes through before production."}}}}
```

## The EvalAlertEffectiveConfigResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalAlertEffectiveConfigResponseV2":{"properties":{"threshold":{"type":"number","title":"Threshold"},"warning_threshold":{"type":"number","title":"Warning Threshold"},"min_samples":{"type":"integer","title":"Min Samples"},"window_max_runs":{"type":"integer","title":"Window Max Runs"},"window_hours":{"type":"integer","title":"Window Hours"},"min_effect_size":{"type":"number","title":"Min Effect Size"},"recovery_threshold":{"type":"number","title":"Recovery Threshold"},"renotify_hours":{"type":"integer","title":"Renotify Hours"}},"type":"object","required":["threshold","warning_threshold","min_samples","window_max_runs","window_hours","min_effect_size","recovery_threshold","renotify_hours"],"title":"EvalAlertEffectiveConfig"}}}}
```

## The EvalAlertSeverity object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalAlertSeverity":{"type":"string","enum":["unknown","ok","warning","alert"],"title":"EvalAlertSeverity","description":"Per-(monitor, evaluator) alert state; notifications fire on transitions, not levels."}}}}
```

## The EvalChoiceSegmentResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalChoiceSegment"}}}}
```

## The EvalDatasetCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetCreateRequestV2":{"properties":{"project_id":{"type":"string","minLength":1,"title":"Project Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractRequestV2"}},"additionalProperties":false,"type":"object","required":["project_id","name","node_contract"],"title":"EvalDatasetCreateRequest"},"EvalNodeContractRequestV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Output Node Ids"}},"additionalProperties":false,"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContractRequest"}}}}
```

## The EvalDatasetImportRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetImportRequestV2":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Run Ids","description":"Finished runs of the dataset's project to import as rows: inputs and expected output are extracted from each run trace under the dataset contract and source_run_id is set. Any run without a usable trace rejects the whole batch with a 422 naming it. Requires evals.update and analytics.read."}},"additionalProperties":false,"type":"object","required":["run_ids"],"title":"EvalDatasetImportRequest"}}}}
```

## The EvalDatasetListItemResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetListItemResponseV2":{"properties":{"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"max_rows":{"type":"integer","title":"Max Rows"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_id","project_id","name","description","node_contract","max_rows","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetListItem"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The EvalDatasetResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetResponseV2":{"properties":{"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"max_rows":{"type":"integer","title":"Max Rows"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["dataset_id","project_id","name","description","node_contract","max_rows","created_by","updated_by","created_at","updated_at"],"title":"EvalDataset"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The EvalDatasetRowDraftRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetRowDraftRequestV2":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"}},"additionalProperties":false,"type":"object","required":["inputs"],"title":"EvalDatasetRowDraftRequest"}}}}
```

## The EvalDatasetRowResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetRowResponseV2":{"properties":{"dataset_row_id":{"type":"string","format":"uuid","title":"Dataset Row Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"url":{"type":"string","title":"Url"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_row_id","dataset_id","url","position","inputs","expected_output","source_run_id","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetRow"}}}}
```

## The EvalDatasetRowUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetRowUpdateRequestV2":{"properties":{"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs","description":"Replacement input object. Omit or send null to keep the current inputs."},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output","description":"Replacement expected output. Omit to keep the current value; send null or an empty object to clear it to null. Example: `{\"expected_output\": null}`."}},"additionalProperties":false,"type":"object","title":"EvalDatasetRowUpdateRequest"}}}}
```

## The EvalDatasetRowsAddRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetRowsAddRequestV2":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/EvalDatasetRowDraftRequestV2"},"type":"array","maxItems":100,"minItems":1,"title":"Rows","description":"Rows to append as given. Use the dataset imports endpoint for run traces."}},"additionalProperties":false,"type":"object","required":["rows"],"title":"EvalDatasetRowsAddRequest"},"EvalDatasetRowDraftRequestV2":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"}},"additionalProperties":false,"type":"object","required":["inputs"],"title":"EvalDatasetRowDraftRequest"}}}}
```

## The EvalDatasetUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalDatasetUpdateRequestV2":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"New name. Omit or send null to keep the current name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description. Omit to keep the current description; send null to clear it. Example: `{\"description\": null}`."},"node_contract":{"anyOf":[{"$ref":"#/components/schemas/EvalNodeContractRequestV2"},{"type":"null"}],"description":"Replacement contract. Omit or send null to keep the current contract. Renaming input or output keys also renames those keys in existing dataset rows in the same atomic update."}},"additionalProperties":false,"type":"object","title":"EvalDatasetUpdateRequest"},"EvalNodeContractRequestV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Output Node Ids"}},"additionalProperties":false,"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContractRequest"}}}}
```

## The EvalExperimentAggregateCardResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentAggregateCardResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"has_scores":{"type":"boolean","title":"Has Scores"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalExperimentChoiceSegmentResponseV2"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","required":["evaluator_id","name","aggregate","scored_count","judge_failed_count","has_scores","segments"],"title":"EvalExperimentAggregateCard"},"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"}}}}
```

## The EvalExperimentAggregateResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentAggregateResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"choice_counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Choice Counts"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate","scored_count","judge_failed_count","choice_counts"],"title":"EvalExperimentAggregate"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The EvalExperimentChoiceSegmentResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"}}}}
```

## The EvalExperimentCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentCreateRequestV2":{"properties":{"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["dataset_id","project_version_id"],"title":"EvalExperimentCreateRequest"}}}}
```

## The EvalExperimentCreateResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentCreateResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"warnings":{"$ref":"#/components/schemas/EvalExperimentWarningsResponseV2"}},"type":"object","required":["experiment","warnings"],"title":"EvalExperimentCreateResponseV2"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentWarningsResponseV2":{"properties":{"draft_version":{"type":"boolean","title":"Draft Version","default":false},"rows_without_expected_output":{"type":"integer","title":"Rows Without Expected Output","default":0}},"type":"object","title":"EvalExperimentWarnings"}}}}
```

## The EvalExperimentDetailResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentDetailResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"latest_job":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobResponseV2"},{"type":"null"}]},"job_status_available":{"type":"boolean","title":"Job Status Available"},"status_counts":{"$ref":"#/components/schemas/EvalExperimentStatusCountsResponseV2"},"aggregate_cards":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateCardResponseV2"},"type":"array","title":"Aggregate Cards"},"evaluators":{"items":{"$ref":"#/components/schemas/EvaluatorResponseV2"},"type":"array","title":"Evaluators"},"run_stats":{"$ref":"#/components/schemas/EvalExperimentRunStatsResponseV2"}},"type":"object","required":["experiment","latest_job","job_status_available","status_counts","aggregate_cards","evaluators","run_stats"],"title":"EvalExperimentDetail"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"},"EvalExperimentStatusCountsResponseV2":{"properties":{"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["pending","running","completed","failed","total","done"],"title":"EvalExperimentStatusCounts"},"EvalExperimentAggregateCardResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"has_scores":{"type":"boolean","title":"Has Scores"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalExperimentChoiceSegmentResponseV2"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","required":["evaluator_id","name","aggregate","scored_count","judge_failed_count","has_scores","segments"],"title":"EvalExperimentAggregateCard"},"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"},"EvaluatorResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"version_number":{"type":"integer","title":"Version Number"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"uses_input":{"type":"boolean","title":"Uses Input"},"uses_expected_output":{"type":"boolean","title":"Uses Expected Output"},"judge_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Provider"},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["evaluator_id","project_id","name","description","evaluator_type","version_number","node_contract","config","score_kind","uses_input","uses_expected_output","judge_provider","judge_model_id","created_by","updated_by","created_at","updated_at"],"title":"Evaluator"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalExperimentRunStatsResponseV2":{"properties":{"avg_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Seconds"},"avg_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Tokens"}},"type":"object","required":["avg_latency_seconds","avg_tokens"],"title":"EvalExperimentRunStats"}}}}
```

## The EvalExperimentJobAcceptedResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobAcceptedResponseV2":{"properties":{"status":{"type":"string","const":"accepted","title":"Status","description":"The request was accepted. Poll the job for its current state.","default":"accepted"},"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"ID of the job that was created. Poll the job route with it."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment the job works on."},"status_url":{"type":"string","title":"Status Url","description":"Relative URL of the job, the same value as the Location header. Poll it until the job reaches a final status."}},"type":"object","required":["job_id","experiment_id","status_url"],"title":"EvalExperimentJobAccepted"}}}}
```

## The EvalExperimentJobCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobCreateRequestV2":{"properties":{"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode"},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"}},"additionalProperties":false,"type":"object","required":["mode"],"title":"EvalExperimentJobCreateRequest"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."}}}}
```

## The EvalExperimentJobErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"}}}}
```

## The EvalExperimentJobMode object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."}}}}
```

## The EvalExperimentJobResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"}}}}
```

## The EvalExperimentJobStatus object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."}}}}
```

## The EvalExperimentResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The EvalExperimentRowResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentRowResponseV2":{"properties":{"experiment_row_id":{"type":"string","format":"uuid","title":"Experiment Row Id"},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"dataset_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dataset Row Id"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Expected Output"},"generated_output":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Generated Output"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"status":{"$ref":"#/components/schemas/EvalExperimentRowStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Seconds"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"scores":{"items":{"$ref":"#/components/schemas/EvalScoreResponseV2"},"type":"array","title":"Scores"}},"type":"object","required":["experiment_row_id","experiment_id","dataset_row_id","position","inputs","expected_output","generated_output","run_id","status","error","latency_seconds","total_tokens","created_at","updated_at"],"title":"EvalExperimentRow"},"JsonValue":{},"EvalExperimentRowStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"EvalExperimentRowStatus","description":"Generation (workflow) lifecycle of an experiment row; judge failures live on scores."},"EvalScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at"],"title":"EvalScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvalExperimentRowStatus object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentRowStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"EvalExperimentRowStatus","description":"Generation (workflow) lifecycle of an experiment row; judge failures live on scores."}}}}
```

## The EvalExperimentRunStatsResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentRunStatsResponseV2":{"properties":{"avg_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Seconds"},"avg_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Tokens"}},"type":"object","required":["avg_latency_seconds","avg_tokens"],"title":"EvalExperimentRunStats"}}}}
```

## The EvalExperimentStatusCountsResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentStatusCountsResponseV2":{"properties":{"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["pending","running","completed","failed","total","done"],"title":"EvalExperimentStatusCounts"}}}}
```

## The EvalExperimentStatusResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentStatusResponseV2":{"properties":{"latest_job":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobResponseV2"},{"type":"null"}]},"job_status_available":{"type":"boolean","title":"Job Status Available"},"status_counts":{"$ref":"#/components/schemas/EvalExperimentStatusCountsResponseV2"},"aggregate_cards":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateCardResponseV2"},"type":"array","title":"Aggregate Cards"}},"type":"object","required":["latest_job","job_status_available","status_counts","aggregate_cards"],"title":"EvalExperimentStatus"},"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"},"EvalExperimentStatusCountsResponseV2":{"properties":{"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["pending","running","completed","failed","total","done"],"title":"EvalExperimentStatusCounts"},"EvalExperimentAggregateCardResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"has_scores":{"type":"boolean","title":"Has Scores"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalExperimentChoiceSegmentResponseV2"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","required":["evaluator_id","name","aggregate","scored_count","judge_failed_count","has_scores","segments"],"title":"EvalExperimentAggregateCard"},"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"}}}}
```

## The EvalExperimentSummaryResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentSummaryResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"aggregates":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateResponseV2"},"type":"array","title":"Aggregates"},"run_stats":{"$ref":"#/components/schemas/EvalExperimentRunStatsResponseV2"}},"type":"object","required":["experiment","aggregates","run_stats"],"title":"EvalExperimentSummary"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentAggregateResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"choice_counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Choice Counts"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate","scored_count","judge_failed_count","choice_counts"],"title":"EvalExperimentAggregate"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalExperimentRunStatsResponseV2":{"properties":{"avg_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Seconds"},"avg_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Tokens"}},"type":"object","required":["avg_latency_seconds","avg_tokens"],"title":"EvalExperimentRunStats"}}}}
```

## The EvalExperimentUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentUpdateRequestV2":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"EvalExperimentUpdateRequest"}}}}
```

## The EvalExperimentWarningsResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalExperimentWarningsResponseV2":{"properties":{"draft_version":{"type":"boolean","title":"Draft Version","default":false},"rows_without_expected_output":{"type":"integer","title":"Rows Without Expected Output","default":0}},"type":"object","title":"EvalExperimentWarnings"}}}}
```

## The EvalMonitorAlertResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorAlertResponseV2":{"properties":{"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"warning_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Warning Threshold"},"min_samples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Samples"},"window_max_runs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Max Runs"},"window_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Hours"},"min_effect_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Effect Size"},"recovery_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Threshold"},"renotify_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renotify Hours"},"notifications_enabled":{"type":"boolean","title":"Notifications Enabled"},"severity":{"$ref":"#/components/schemas/EvalAlertSeverity"},"effective":{"$ref":"#/components/schemas/EvalAlertEffectiveConfigResponseV2"},"defaults":{"$ref":"#/components/schemas/EvalAlertEffectiveConfigResponseV2"}},"type":"object","required":["threshold","warning_threshold","min_samples","window_max_runs","window_hours","min_effect_size","recovery_threshold","renotify_hours","notifications_enabled","severity","effective","defaults"],"title":"EvalMonitorAlertView"},"EvalAlertSeverity":{"type":"string","enum":["unknown","ok","warning","alert"],"title":"EvalAlertSeverity","description":"Per-(monitor, evaluator) alert state; notifications fire on transitions, not levels."},"EvalAlertEffectiveConfigResponseV2":{"properties":{"threshold":{"type":"number","title":"Threshold"},"warning_threshold":{"type":"number","title":"Warning Threshold"},"min_samples":{"type":"integer","title":"Min Samples"},"window_max_runs":{"type":"integer","title":"Window Max Runs"},"window_hours":{"type":"integer","title":"Window Hours"},"min_effect_size":{"type":"number","title":"Min Effect Size"},"recovery_threshold":{"type":"number","title":"Recovery Threshold"},"renotify_hours":{"type":"integer","title":"Renotify Hours"}},"type":"object","required":["threshold","warning_threshold","min_samples","window_max_runs","window_hours","min_effect_size","recovery_threshold","renotify_hours"],"title":"EvalAlertEffectiveConfig"}}}}
```

## The EvalMonitorAlertUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorAlertUpdateRequestV2":{"properties":{"threshold":{"anyOf":[{"type":"number","maximum":1,"exclusiveMinimum":0},{"type":"null"}],"title":"Threshold"},"warning_threshold":{"anyOf":[{"type":"number","maximum":1,"exclusiveMinimum":0},{"type":"null"}],"title":"Warning Threshold"},"min_samples":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Min Samples"},"window_max_runs":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Window Max Runs"},"window_hours":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Window Hours"},"min_effect_size":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Min Effect Size"},"recovery_threshold":{"anyOf":[{"type":"number","maximum":1,"exclusiveMinimum":0},{"type":"null"}],"title":"Recovery Threshold"},"renotify_hours":{"anyOf":[{"type":"integer","maximum":2147483647,"minimum":1},{"type":"null"}],"title":"Renotify Hours"},"notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notifications Enabled"}},"additionalProperties":false,"type":"object","title":"EvalMonitorAlertUpdateRequest"}}}}
```

## The EvalMonitorCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorCreateRequestV2":{"properties":{"project_id":{"type":"string","minLength":1,"title":"Project Id"},"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"notifications_enabled":{"type":"boolean","title":"Notifications Enabled","default":true},"sampling_rate":{"type":"number","maximum":0.3,"exclusiveMinimum":0,"title":"Sampling Rate","default":0.3},"max_runs_daily":{"type":"integer","maximum":1000,"minimum":1,"title":"Max Runs Daily","default":1000}},"additionalProperties":false,"type":"object","required":["project_id","evaluator_id"],"title":"EvalMonitorCreateRequest"}}}}
```

## The EvalMonitorEvaluatorRollupResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorEvaluatorRollupResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate"],"title":"EvalMonitorEvaluatorRollup"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The EvalMonitorEvaluatorTrendResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorEvaluatorTrendResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"window_aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Window Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"},"buckets":{"items":{"$ref":"#/components/schemas/EvalMonitorTrendBucketResponseV2"},"type":"array","title":"Buckets"},"choice_segments":{"items":{"$ref":"#/components/schemas/EvalChoiceSegmentResponseV2"},"type":"array","title":"Choice Segments"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","window_aggregate","scored_count","failed_count","buckets","choice_segments"],"title":"EvalMonitorEvaluatorTrend"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalMonitorTrendBucketResponseV2":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["bucket_start","aggregate","scored_count","failed_count"],"title":"EvalMonitorTrendBucket"},"EvalChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalChoiceSegment"}}}}
```

## The EvalMonitorLimitsResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorLimitsResponseV2":{"properties":{"sampling_rate_limit":{"type":"number","title":"Sampling Rate Limit","default":0.3},"max_runs_daily_limit":{"type":"integer","title":"Max Runs Daily Limit","default":1000},"sampling_rate_default":{"type":"number","title":"Sampling Rate Default","default":0.3},"max_runs_daily_default":{"type":"integer","title":"Max Runs Daily Default","default":1000}},"type":"object","title":"EvalMonitorLimits"}}}}
```

## The EvalMonitorListItemResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorListItemResponseV2":{"properties":{"monitor":{"$ref":"#/components/schemas/EvalMonitorResponseV2"},"severity":{"$ref":"#/components/schemas/EvalAlertSeverity"},"runs_scored_in_window":{"type":"integer","title":"Runs Scored In Window"},"runs_enqueued_today":{"type":"integer","title":"Runs Enqueued Today"},"evaluators":{"items":{"$ref":"#/components/schemas/EvalMonitorEvaluatorRollupResponseV2"},"type":"array","title":"Evaluators"}},"type":"object","required":["monitor","severity","runs_scored_in_window","runs_enqueued_today","evaluators"],"title":"EvalMonitorListItem"},"EvalMonitorResponseV2":{"properties":{"monitor_id":{"type":"string","format":"uuid","title":"Monitor Id"},"project_id":{"type":"string","title":"Project Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"sampling_rate":{"type":"number","title":"Sampling Rate"},"max_runs_daily":{"type":"integer","title":"Max Runs Daily"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["monitor_id","project_id","evaluator_id","name","description","enabled","sampling_rate","max_runs_daily","created_by","updated_by","created_at","updated_at"],"title":"EvalMonitor"},"EvalAlertSeverity":{"type":"string","enum":["unknown","ok","warning","alert"],"title":"EvalAlertSeverity","description":"Per-(monitor, evaluator) alert state; notifications fire on transitions, not levels."},"EvalMonitorEvaluatorRollupResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate"],"title":"EvalMonitorEvaluatorRollup"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The EvalMonitorResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorResponseV2":{"properties":{"monitor_id":{"type":"string","format":"uuid","title":"Monitor Id"},"project_id":{"type":"string","title":"Project Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"sampling_rate":{"type":"number","title":"Sampling Rate"},"max_runs_daily":{"type":"integer","title":"Max Runs Daily"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["monitor_id","project_id","evaluator_id","name","description","enabled","sampling_rate","max_runs_daily","created_by","updated_by","created_at","updated_at"],"title":"EvalMonitor"}}}}
```

## The EvalMonitorSampledRunResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorSampledRunResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"scores":{"items":{"$ref":"#/components/schemas/EvalScoreResponseV2"},"type":"array","title":"Scores"}},"type":"object","required":["run_id","created_at","input_snapshot","output_snapshot","scores"],"title":"EvalMonitorSampledRun"},"EvalScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at"],"title":"EvalScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvalMonitorScoreStatsResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorScoreStatsResponseV2":{"properties":{"pending_count":{"type":"integer","title":"Pending Count"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"},"runs_enqueued_today":{"type":"integer","title":"Runs Enqueued Today"},"evaluators":{"items":{"$ref":"#/components/schemas/EvalMonitorEvaluatorTrendResponseV2"},"type":"array","title":"Evaluators"}},"type":"object","required":["pending_count","scored_count","failed_count","runs_enqueued_today","evaluators"],"title":"EvalMonitorScoreStats"},"EvalMonitorEvaluatorTrendResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"window_aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Window Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"},"buckets":{"items":{"$ref":"#/components/schemas/EvalMonitorTrendBucketResponseV2"},"type":"array","title":"Buckets"},"choice_segments":{"items":{"$ref":"#/components/schemas/EvalChoiceSegmentResponseV2"},"type":"array","title":"Choice Segments"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","window_aggregate","scored_count","failed_count","buckets","choice_segments"],"title":"EvalMonitorEvaluatorTrend"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalMonitorTrendBucketResponseV2":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["bucket_start","aggregate","scored_count","failed_count"],"title":"EvalMonitorTrendBucket"},"EvalChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalChoiceSegment"}}}}
```

## The EvalMonitorTrendBucketResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorTrendBucketResponseV2":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["bucket_start","aggregate","scored_count","failed_count"],"title":"EvalMonitorTrendBucket"}}}}
```

## The EvalMonitorUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalMonitorUpdateRequestV2":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"sampling_rate":{"anyOf":[{"type":"number","maximum":0.3,"exclusiveMinimum":0},{"type":"null"}],"title":"Sampling Rate"},"max_runs_daily":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"title":"Max Runs Daily"}},"additionalProperties":false,"type":"object","title":"EvalMonitorUpdateRequest"}}}}
```

## The EvalNodeContractRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalNodeContractRequestV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Output Node Ids"}},"additionalProperties":false,"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContractRequest"}}}}
```

## The EvalNodeContractV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The EvalPreviewSampleRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalPreviewSampleRequestV2":{"properties":{"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs"},"generated_output":{"additionalProperties":true,"type":"object","title":"Generated Output"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"}},"additionalProperties":false,"type":"object","required":["generated_output"],"title":"EvalPreviewSampleRequest"}}}}
```

## The EvalRunScoreCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalRunScoreCreateRequestV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"}},"additionalProperties":false,"type":"object","required":["evaluator_id"],"title":"EvalRunScoreCreateRequest"}}}}
```

## The EvalRunScoreResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalRunScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at","evaluator_name"],"title":"EvalRunScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvalScoreKind object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The EvalScoreResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at"],"title":"EvalScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvalScoreStatus object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvaluatorCreateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorCreateRequestV2":{"properties":{"project_id":{"type":"string","minLength":1,"title":"Project Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"judge_provider":{"anyOf":[{"$ref":"#/components/schemas/LLMProviderEnum"},{"type":"null"}]},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractRequestV2"}},"additionalProperties":false,"type":"object","required":["project_id","name","evaluator_type","config","node_contract"],"title":"EvaluatorCreateRequest"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."},"EvalNodeContractRequestV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Output Node Ids"}},"additionalProperties":false,"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContractRequest"}}}}
```

## The EvaluatorPreviewRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorPreviewRequestV2":{"properties":{"project_id":{"type":"string","minLength":1,"title":"Project Id"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"judge_provider":{"anyOf":[{"$ref":"#/components/schemas/LLMProviderEnum"},{"type":"null"}]},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"samples":{"items":{"$ref":"#/components/schemas/EvalPreviewSampleRequestV2"},"type":"array","maxItems":3,"minItems":1,"title":"Samples"}},"additionalProperties":false,"type":"object","required":["project_id","evaluator_type","config","samples"],"title":"EvaluatorPreviewRequest"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."},"EvalPreviewSampleRequestV2":{"properties":{"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs"},"generated_output":{"additionalProperties":true,"type":"object","title":"Generated Output"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"}},"additionalProperties":false,"type":"object","required":["generated_output"],"title":"EvalPreviewSampleRequest"}}}}
```

## The EvaluatorPreviewResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorPreviewResponseV2":{"properties":{"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["score_kind","score","choice_label","feedback","status","error"],"title":"EvaluatorPreview"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The EvaluatorResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"version_number":{"type":"integer","title":"Version Number"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"uses_input":{"type":"boolean","title":"Uses Input"},"uses_expected_output":{"type":"boolean","title":"Uses Expected Output"},"judge_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Provider"},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["evaluator_id","project_id","name","description","evaluator_type","version_number","node_contract","config","score_kind","uses_input","uses_expected_output","judge_provider","judge_model_id","created_by","updated_by","created_at","updated_at"],"title":"Evaluator"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The EvaluatorTemplateResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorTemplateResponseV2":{"properties":{"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["template_id","name","evaluator_type","config"],"title":"EvaluatorTemplate"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."}}}}
```

## The EvaluatorType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."}}}}
```

## The EvaluatorUpdateRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"EvaluatorUpdateRequestV2":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"New name. Omit or send null to keep the current name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description. Omit to keep the current description; send null to clear it. Example: `{\"description\": null}`."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Replaces the entire evaluator configuration. Omit or send null to keep the current configuration."},"judge_provider":{"anyOf":[{"$ref":"#/components/schemas/LLMProviderEnum"},{"type":"null"}],"description":"LLM judge provider override. Omit to keep it; send null to clear it. Any existing judge_model_id override must also be cleared when removing the provider. Example: `{\"judge_provider\": null, \"judge_model_id\": null}`."},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id","description":"LLM judge model override. Omit to keep it; send null to clear it. A model override requires a provider override in the resulting configuration. Example: `{\"judge_model_id\": null}`."},"node_contract":{"anyOf":[{"$ref":"#/components/schemas/EvalNodeContractRequestV2"},{"type":"null"}],"description":"Replacement evaluator contract. Omit or send null to keep the current contract. A changed contract creates a new evaluator version."}},"additionalProperties":false,"type":"object","title":"EvaluatorUpdateRequest"},"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."},"EvalNodeContractRequestV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"Output Node Ids"}},"additionalProperties":false,"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContractRequest"}}}}
```

## The ExecutionMode object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ExecutionMode":{"type":"string","enum":["in-memory","remote"],"title":"ExecutionMode","description":"Workflow execution modes.\n\nThese are implementation-agnostic names exposed to clients."}}}}
```

## The HTTPValidationError object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## The HitlResponseType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"HitlResponseType":{"type":"string","enum":["text","approval","choice"],"title":"HitlResponseType","description":"Response types accepted by the public ask_human resume API.\n\nMirrors the ask_human action's own ``Literal[\"text\", \"approval\", \"choice\"]`` (defined in\nstackflow); kept as a separate enum because apps cannot reuse that stackflow Literal."}}}}
```

## The JsonValue object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"JsonValue":{}}}}
```

## The KnowledgeBaseChunkerParams object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"}}}}
```

## The KnowledgeBaseFileResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseFileResponse":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"},"indexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Indexed At"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"resource_path":{"type":"string","minLength":1,"title":"Resource Path"},"dataloader_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Dataloader Metadata"},"user_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"User Metadata"},"content_hash":{"type":"string","minLength":1,"title":"Content Hash"},"content_mime":{"type":"string","minLength":1,"title":"Content Mime"},"size":{"type":"integer","minimum":0,"title":"Size"},"status":{"$ref":"#/components/schemas/StackFileStatusEnum"},"effective_permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Effective Permissions","description":"Viewer's effective permissions for this file; null when not computed."}},"type":"object","required":["knowledge_base_id","created_at","modified_at","resource_id","resource_path","content_hash","content_mime","size","status"],"title":"KnowledgeBaseFileResponse","description":"A file stored in a knowledge base."},"StackFileStatusEnum":{"type":"string","enum":["resource","parsed","indexed","pending","pending_delete","deleted","error"],"title":"StackFileStatusEnum","description":"Processing status of a file in a knowledge base."}}}}
```

## The KnowledgeBaseFileResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseFileResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"},"indexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Indexed At"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"resource_path":{"type":"string","minLength":1,"title":"Resource Path"},"acl_target_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl Target Path"},"dataloader_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Dataloader Metadata"},"user_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"User Metadata"},"content_hash":{"type":"string","minLength":1,"title":"Content Hash"},"content_mime":{"type":"string","minLength":1,"title":"Content Mime"},"size":{"type":"integer","minimum":0,"title":"Size"},"status":{"$ref":"#/components/schemas/StackFileStatusEnum"},"effective_permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Effective Permissions"}},"type":"object","required":["knowledge_base_id","created_at","modified_at","resource_id","resource_path","content_hash","content_mime","size","status"],"title":"KnowledgeBaseFileResponse","description":"A file stored in a knowledge base."},"StackFileStatusEnum":{"type":"string","enum":["resource","parsed","indexed","pending","pending_delete","deleted","error"],"title":"StackFileStatusEnum","description":"Processing status of a file in a knowledge base."}}}}
```

## The KnowledgeBaseIndexingParamsRequest object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseIndexingParamsRequest":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/CreateKnowledgeBaseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","title":"KnowledgeBaseIndexingParamsRequest","description":"Parameters that control how documents are indexed into a knowledge base."},"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"}}}}
```

## The KnowledgeBaseMetadataSchemasResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseMetadataSchemasResponseV2":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchemaResponseV2"},{"type":"null"}]},"dataloader":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchemaResponseV2"},{"type":"null"}]}},"type":"object","required":["user","dataloader"],"title":"KnowledgeBaseMetadataSchemas","description":"The user and dataloader metadata schemas for a knowledge base on the public v2 surface."},"MetadataSchemaResponseV2":{"properties":{"properties":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"oneOf":[{"$ref":"#/components/schemas/MetadataStringPropertyResponseV2"},{"$ref":"#/components/schemas/MetadataPropertyBaseResponseV2"},{"$ref":"#/components/schemas/MetadataStringListPropertyResponseV2"}],"discriminator":{"propertyName":"type","mapping":{"boolean":"#/components/schemas/MetadataPropertyBaseResponseV2","date":"#/components/schemas/MetadataPropertyBaseResponseV2","number":"#/components/schemas/MetadataPropertyBaseResponseV2","string":"#/components/schemas/MetadataStringPropertyResponseV2","string_list":"#/components/schemas/MetadataStringListPropertyResponseV2"}}}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Properties"}},"type":"object","required":["properties"],"title":"MetadataSchema","description":"A metadata schema (user or dataloader) on the public v2 surface."},"MetadataStringPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum"}},"type":"object","required":["description","order","subtype"],"title":"MetadataStringPropertyResponse","description":"A string-valued metadata property on the public v2 surface."},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"},"MetadataPropertyBaseResponseV2":{"properties":{"type":{"type":"string","enum":["number","boolean","date"],"title":"Type"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["type","description","order"],"title":"MetadataPropertyResponse","description":"Shared fields for every metadata property on the public v2 surface.\n\nUsed directly for property types that add no extra fields (number, boolean,\ndate); string and string-list subclass it below for their extra fields."},"MetadataStringListPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"options":{"items":{"$ref":"#/components/schemas/MetadataStringListOptionResponseV2"},"type":"array","title":"Options"}},"type":"object","required":["description","order","options"],"title":"MetadataStringListPropertyResponse","description":"A string-list-valued metadata property on the public v2 surface."},"MetadataStringListOptionResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"color":{"$ref":"#/components/schemas/StringListOptionColor"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","label","description","color","order"],"title":"MetadataStringListOptionResponse","description":"A selectable option for a string-list metadata property."},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The KnowledgeBaseQueryRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseQueryRequestV2":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"The search query to run against the knowledge base."},"top_k":{"type":"integer","maximum":20,"minimum":1,"title":"Top K","description":"Number of top results to return.","default":10},"strategy":{"$ref":"#/components/schemas/KnowledgeBaseQueryStrategyV2","description":"Retrieval strategy to use for the search.","default":"semantic"},"retrieval_type":{"$ref":"#/components/schemas/RetrievalType","description":"Type of retrieval to use for the search.","default":"chunks"}},"additionalProperties":false,"type":"object","required":["query"],"title":"KnowledgeBaseQueryRequest","description":"A query against a knowledge base on the public v2 surface."},"KnowledgeBaseQueryStrategyV2":{"type":"string","enum":["semantic","keyword","hybrid"],"title":"KnowledgeBaseQueryStrategyV2","description":"Retrieval strategy for a public v2 knowledge base query."},"RetrievalType":{"type":"string","enum":["docs","pages","chunks"],"title":"RetrievalType","description":"Retrieval type."}}}}
```

## The KnowledgeBaseQueryResultV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseQueryResultV2":{"properties":{"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score","default":0},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"}},"type":"object","required":["content","resource_id"],"title":"KnowledgeBaseQueryResult","description":"A single retrieved result on the public v2 surface."}}}}
```

## The KnowledgeBaseQueryStrategyV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseQueryStrategyV2":{"type":"string","enum":["semantic","keyword","hybrid"],"title":"KnowledgeBaseQueryStrategyV2","description":"Retrieval strategy for a public v2 knowledge base query."}}}}
```

## The KnowledgeBaseResourcesResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseResourcesResponse":{"additionalProperties":true,"type":"object"}}}}
```

## The KnowledgeBaseResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseResponse":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled"},"connection_provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Provider Type"},"is_empty":{"type":"boolean","title":"Is Empty","default":true},"total_size":{"type":"integer","title":"Total Size","description":"Total size of all files in the knowledge base, in bytes.","default":0},"total_files":{"type":"integer","title":"Total Files","description":"Total number of files in the knowledge base.","default":0},"total_indexed_files":{"type":"integer","title":"Total Indexed Files","description":"Total number of successfully indexed files.","default":0},"total_error_files":{"type":"integer","title":"Total Error Files","description":"Total number of files that failed indexing.","default":0},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At","description":"Timestamp when the knowledge base was last successfully synced from its source"},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseIndexingParams"},"org_id":{"type":"string","title":"Org Id"},"role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]},"user_metadata_schema":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchema"},{"type":"null"}]},"dataloader_metadata_schema":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchema"},{"type":"null"}]}},"type":"object","required":["knowledge_base_id","connection_id","created_at","updated_at","connection_source_ids","website_sources","source_file_authorization_enabled","indexing_params","org_id"],"title":"KnowledgeBaseResponse","description":"A knowledge base."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseResponseIndexingParams":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","required":["embedding_params"],"title":"KnowledgeBaseResponseIndexingParams","description":"Indexing configuration of a knowledge base."},"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."},"MetadataSchema":{"properties":{"properties":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{"$ref":"#/components/schemas/StringProperty"},{"$ref":"#/components/schemas/NumberProperty"},{"$ref":"#/components/schemas/BooleanProperty"},{"$ref":"#/components/schemas/DateProperty"},{"$ref":"#/components/schemas/StringListProperty"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Properties"}},"type":"object","required":["properties"],"title":"MetadataSchema"},"StringProperty":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum","default":"plain"}},"type":"object","title":"StringProperty"},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"},"NumberProperty":{"properties":{"type":{"type":"string","const":"number","title":"Type","default":"number"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"NumberProperty"},"BooleanProperty":{"properties":{"type":{"type":"string","const":"boolean","title":"Type","default":"boolean"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"BooleanProperty"},"DateProperty":{"properties":{"type":{"type":"string","const":"date","title":"Type","default":"date"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"DateProperty"},"StringListProperty":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"options":{"items":{"$ref":"#/components/schemas/StringListOption"},"type":"array","title":"Options"}},"type":"object","title":"StringListProperty","description":"A property that contains a list of strings. Can be used to store tags as well."},"StringListOption":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"color":{"$ref":"#/components/schemas/StringListOptionColor","default":"gray"},"order":{"type":"integer","maximum":10000000,"minimum":0,"title":"Order","default":0}},"type":"object","required":["label"],"title":"StringListOption"},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The KnowledgeBaseResponseEmbeddingParams object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."}}}}
```

## The KnowledgeBaseResponseIndexingParams object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseResponseIndexingParams":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","required":["embedding_params"],"title":"KnowledgeBaseResponseIndexingParams","description":"Indexing configuration of a knowledge base."},"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"}}}}
```

## The KnowledgeBaseResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled"},"connection_provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Provider Type"},"is_empty":{"type":"boolean","title":"Is Empty","default":true},"total_size":{"type":"integer","title":"Total Size","default":0},"total_files":{"type":"integer","title":"Total Files","default":0},"total_indexed_files":{"type":"integer","title":"Total Indexed Files","default":0},"total_error_files":{"type":"integer","title":"Total Error Files","default":0},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseIndexingParams"},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]},"role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"type":"object","required":["knowledge_base_id","connection_id","created_at","updated_at","connection_source_ids","website_sources","source_file_authorization_enabled","indexing_params"],"title":"KnowledgeBaseResponse","description":"A knowledge base on the public v2 surface."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseResponseIndexingParams":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","required":["embedding_params"],"title":"KnowledgeBaseResponseIndexingParams","description":"Indexing configuration of a knowledge base."},"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The KnowledgeBaseRole object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The KnowledgeBaseSyncResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseSyncResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human-readable description of the started task."},"status":{"type":"string","const":"accepted","title":"Status","description":"Task status.","default":"accepted"}},"type":"object","required":["message"],"title":"KnowledgeBaseSyncResponse","description":"Result of a knowledge base sync or reindex request."}}}}
```

## The KnowledgeBaseSyncResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"KnowledgeBaseSyncResponseV2":{"properties":{"message":{"type":"string","title":"Message"},"status":{"type":"string","const":"accepted","title":"Status","default":"accepted"}},"type":"object","required":["message"],"title":"KnowledgeBaseSyncResponse","description":"Acknowledgement that a sync or reindex task was accepted."}}}}
```

## The LLMConnectionOrigin object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"LLMConnectionOrigin":{"type":"string","enum":["stack_ai","external_db","external_ephemeral"],"title":"LLMConnectionOrigin"}}}}
```

## The LLMProviderEnum object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."}}}}
```

## The LLMUsageData object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"LLMUsageData":{"properties":{"cache_metrics":{"anyOf":[{"$ref":"#/components/schemas/CacheMetrics"},{"type":"null"}]},"provider":{"$ref":"#/components/schemas/LLMProviderEnum"},"model_id":{"type":"string","title":"Model Id"},"tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Tokens"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Input Tokens","description":"Total prompt tokens processed, INCLUDING any prompt-cache writes and reads (Anthropic reports those outside its raw input counter; they are folded back in before this record is built)."},"output_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Output Tokens"},"cache_creation_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Cache Creation Input Tokens","description":"Subset of input_tokens written to the provider prompt cache this call. Kept separate so billing can later discount cache traffic (writes bill at a premium, reads at a fraction). None when the provider reported no cache counters."},"cache_read_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Cache Read Input Tokens","description":"Subset of input_tokens served from the provider prompt cache this call. None when the provider reported no cache counters."},"cache_measurement":{"anyOf":[{"$ref":"#/components/schemas/CacheMeasurement"},{"type":"null"}]},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_origin":{"anyOf":[{"$ref":"#/components/schemas/LLMConnectionOrigin"},{"type":"null"}]},"is_local_model":{"type":"boolean","title":"Is Local Model","description":"Whether this usage record is from a local model.","readOnly":true},"should_charge":{"type":"boolean","title":"Should Charge","description":"Whether this usage record should be charged.","readOnly":true}},"type":"object","required":["provider","model_id","is_local_model","should_charge"],"title":"LLMUsageData","description":"Token usage for a single LLM call within a run."},"CacheMetrics":{"properties":{"read_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens","default":0},"known_input_tokens":{"type":"integer","minimum":0,"title":"Known Input Tokens","default":0},"missing_input_usage_records":{"type":"integer","minimum":0,"title":"Missing Input Usage Records","default":0},"cached_input_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Percent","description":"Return cache-read share for precisely the measured subset.","readOnly":true},"input_coverage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Coverage Percent","description":"Return observed share of recorded input, not provider-attempt coverage.","readOnly":true}},"type":"object","required":["cached_input_percent","input_coverage_percent"],"title":"CacheMetrics","description":"Weighted cache reads over measured input, including writes but excluding output."},"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."},"CacheMeasurement":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"read_input_tokens":{"type":"integer","minimum":0,"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens"}},"type":"object","required":["read_input_tokens","observed_input_tokens"],"title":"CacheMeasurement","description":"A measured subset of provider input, excluding unobserved calls."},"LLMConnectionOrigin":{"type":"string","enum":["stack_ai","external_db","external_ephemeral"],"title":"LLMConnectionOrigin"}}}}
```

## The MetadataPropertyBaseResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataPropertyBaseResponseV2":{"properties":{"type":{"type":"string","enum":["number","boolean","date"],"title":"Type"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["type","description","order"],"title":"MetadataPropertyResponse","description":"Shared fields for every metadata property on the public v2 surface.\n\nUsed directly for property types that add no extra fields (number, boolean,\ndate); string and string-list subclass it below for their extra fields."}}}}
```

## The MetadataSchema object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataSchema":{"properties":{"properties":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{"$ref":"#/components/schemas/StringProperty"},{"$ref":"#/components/schemas/NumberProperty"},{"$ref":"#/components/schemas/BooleanProperty"},{"$ref":"#/components/schemas/DateProperty"},{"$ref":"#/components/schemas/StringListProperty"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Properties"}},"type":"object","required":["properties"],"title":"MetadataSchema"},"StringProperty":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum","default":"plain"}},"type":"object","title":"StringProperty"},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"},"NumberProperty":{"properties":{"type":{"type":"string","const":"number","title":"Type","default":"number"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"NumberProperty"},"BooleanProperty":{"properties":{"type":{"type":"string","const":"boolean","title":"Type","default":"boolean"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"BooleanProperty"},"DateProperty":{"properties":{"type":{"type":"string","const":"date","title":"Type","default":"date"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"DateProperty"},"StringListProperty":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"options":{"items":{"$ref":"#/components/schemas/StringListOption"},"type":"array","title":"Options"}},"type":"object","title":"StringListProperty","description":"A property that contains a list of strings. Can be used to store tags as well."},"StringListOption":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"color":{"$ref":"#/components/schemas/StringListOptionColor","default":"gray"},"order":{"type":"integer","maximum":10000000,"minimum":0,"title":"Order","default":0}},"type":"object","required":["label"],"title":"StringListOption"},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The MetadataSchemaResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataSchemaResponseV2":{"properties":{"properties":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"oneOf":[{"$ref":"#/components/schemas/MetadataStringPropertyResponseV2"},{"$ref":"#/components/schemas/MetadataPropertyBaseResponseV2"},{"$ref":"#/components/schemas/MetadataStringListPropertyResponseV2"}],"discriminator":{"propertyName":"type","mapping":{"boolean":"#/components/schemas/MetadataPropertyBaseResponseV2","date":"#/components/schemas/MetadataPropertyBaseResponseV2","number":"#/components/schemas/MetadataPropertyBaseResponseV2","string":"#/components/schemas/MetadataStringPropertyResponseV2","string_list":"#/components/schemas/MetadataStringListPropertyResponseV2"}}}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Properties"}},"type":"object","required":["properties"],"title":"MetadataSchema","description":"A metadata schema (user or dataloader) on the public v2 surface."},"MetadataStringPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum"}},"type":"object","required":["description","order","subtype"],"title":"MetadataStringPropertyResponse","description":"A string-valued metadata property on the public v2 surface."},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"},"MetadataPropertyBaseResponseV2":{"properties":{"type":{"type":"string","enum":["number","boolean","date"],"title":"Type"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["type","description","order"],"title":"MetadataPropertyResponse","description":"Shared fields for every metadata property on the public v2 surface.\n\nUsed directly for property types that add no extra fields (number, boolean,\ndate); string and string-list subclass it below for their extra fields."},"MetadataStringListPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"options":{"items":{"$ref":"#/components/schemas/MetadataStringListOptionResponseV2"},"type":"array","title":"Options"}},"type":"object","required":["description","order","options"],"title":"MetadataStringListPropertyResponse","description":"A string-list-valued metadata property on the public v2 surface."},"MetadataStringListOptionResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"color":{"$ref":"#/components/schemas/StringListOptionColor"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","label","description","color","order"],"title":"MetadataStringListOptionResponse","description":"A selectable option for a string-list metadata property."},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The MetadataStringListOptionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataStringListOptionResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"color":{"$ref":"#/components/schemas/StringListOptionColor"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","label","description","color","order"],"title":"MetadataStringListOptionResponse","description":"A selectable option for a string-list metadata property."},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The MetadataStringListPropertyResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataStringListPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"options":{"items":{"$ref":"#/components/schemas/MetadataStringListOptionResponseV2"},"type":"array","title":"Options"}},"type":"object","required":["description","order","options"],"title":"MetadataStringListPropertyResponse","description":"A string-list-valued metadata property on the public v2 surface."},"MetadataStringListOptionResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"color":{"$ref":"#/components/schemas/StringListOptionColor"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","label","description","color","order"],"title":"MetadataStringListOptionResponse","description":"A selectable option for a string-list metadata property."},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The MetadataStringPropertyResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"MetadataStringPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum"}},"type":"object","required":["description","order","subtype"],"title":"MetadataStringPropertyResponse","description":"A string-valued metadata property on the public v2 surface."},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"}}}}
```

## The NumberProperty object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"NumberProperty":{"properties":{"type":{"type":"string","const":"number","title":"Type","default":"number"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0}},"type":"object","title":"NumberProperty"}}}}
```

## The OffsetBasedPaginationResponse\_ConnectionResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_ConnectionResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/ConnectionResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[ConnectionResponseV2]"},"ConnectionResponseV2":{"properties":{"connection_id":{"type":"string","format":"uuid","title":"Connection Id"},"provider_id":{"type":"string","title":"Provider Id"},"auth_method":{"type":"string","title":"Auth Method"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"$ref":"#/components/schemas/ConnectionStatusV2"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["connection_id","provider_id","auth_method","name","status","expires_at","created_at","updated_at"],"title":"ConnectionResponse","description":"A connection on the public v2 surface, deliberately credential-free."},"ConnectionStatusV2":{"type":"string","enum":["active","needs_reconnection"],"title":"ConnectionStatusV2","description":"Public connection status: healthy vs. needing a reconnect."}}}}
```

## The OffsetBasedPaginationResponse\_EvalDatasetListItemResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvalDatasetListItemResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalDatasetListItemResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvalDatasetListItemResponseV2]"},"EvalDatasetListItemResponseV2":{"properties":{"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"max_rows":{"type":"integer","title":"Max Rows"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_id","project_id","name","description","node_contract","max_rows","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetListItem"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The OffsetBasedPaginationResponse\_EvalDatasetRowResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvalDatasetRowResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalDatasetRowResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvalDatasetRowResponseV2]"},"EvalDatasetRowResponseV2":{"properties":{"dataset_row_id":{"type":"string","format":"uuid","title":"Dataset Row Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"url":{"type":"string","title":"Url"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_row_id","dataset_id","url","position","inputs","expected_output","source_run_id","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetRow"}}}}
```

## The OffsetBasedPaginationResponse\_EvalExperimentRowResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvalExperimentRowResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalExperimentRowResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvalExperimentRowResponseV2]"},"EvalExperimentRowResponseV2":{"properties":{"experiment_row_id":{"type":"string","format":"uuid","title":"Experiment Row Id"},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"dataset_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dataset Row Id"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Expected Output"},"generated_output":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Generated Output"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"status":{"$ref":"#/components/schemas/EvalExperimentRowStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Seconds"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"scores":{"items":{"$ref":"#/components/schemas/EvalScoreResponseV2"},"type":"array","title":"Scores"}},"type":"object","required":["experiment_row_id","experiment_id","dataset_row_id","position","inputs","expected_output","generated_output","run_id","status","error","latency_seconds","total_tokens","created_at","updated_at"],"title":"EvalExperimentRow"},"JsonValue":{},"EvalExperimentRowStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"EvalExperimentRowStatus","description":"Generation (workflow) lifecycle of an experiment row; judge failures live on scores."},"EvalScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at"],"title":"EvalScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The OffsetBasedPaginationResponse\_EvalExperimentSummaryResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvalExperimentSummaryResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalExperimentSummaryResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvalExperimentSummaryResponseV2]"},"EvalExperimentSummaryResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"aggregates":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateResponseV2"},"type":"array","title":"Aggregates"},"run_stats":{"$ref":"#/components/schemas/EvalExperimentRunStatsResponseV2"}},"type":"object","required":["experiment","aggregates","run_stats"],"title":"EvalExperimentSummary"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentAggregateResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"choice_counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Choice Counts"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate","scored_count","judge_failed_count","choice_counts"],"title":"EvalExperimentAggregate"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalExperimentRunStatsResponseV2":{"properties":{"avg_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Seconds"},"avg_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Tokens"}},"type":"object","required":["avg_latency_seconds","avg_tokens"],"title":"EvalExperimentRunStats"}}}}
```

## The OffsetBasedPaginationResponse\_EvalMonitorListItemResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvalMonitorListItemResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalMonitorListItemResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvalMonitorListItemResponseV2]"},"EvalMonitorListItemResponseV2":{"properties":{"monitor":{"$ref":"#/components/schemas/EvalMonitorResponseV2"},"severity":{"$ref":"#/components/schemas/EvalAlertSeverity"},"runs_scored_in_window":{"type":"integer","title":"Runs Scored In Window"},"runs_enqueued_today":{"type":"integer","title":"Runs Enqueued Today"},"evaluators":{"items":{"$ref":"#/components/schemas/EvalMonitorEvaluatorRollupResponseV2"},"type":"array","title":"Evaluators"}},"type":"object","required":["monitor","severity","runs_scored_in_window","runs_enqueued_today","evaluators"],"title":"EvalMonitorListItem"},"EvalMonitorResponseV2":{"properties":{"monitor_id":{"type":"string","format":"uuid","title":"Monitor Id"},"project_id":{"type":"string","title":"Project Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"sampling_rate":{"type":"number","title":"Sampling Rate"},"max_runs_daily":{"type":"integer","title":"Max Runs Daily"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["monitor_id","project_id","evaluator_id","name","description","enabled","sampling_rate","max_runs_daily","created_by","updated_by","created_at","updated_at"],"title":"EvalMonitor"},"EvalAlertSeverity":{"type":"string","enum":["unknown","ok","warning","alert"],"title":"EvalAlertSeverity","description":"Per-(monitor, evaluator) alert state; notifications fire on transitions, not levels."},"EvalMonitorEvaluatorRollupResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","aggregate"],"title":"EvalMonitorEvaluatorRollup"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The OffsetBasedPaginationResponse\_EvaluatorResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_EvaluatorResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvaluatorResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[EvaluatorResponseV2]"},"EvaluatorResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"version_number":{"type":"integer","title":"Version Number"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"uses_input":{"type":"boolean","title":"Uses Input"},"uses_expected_output":{"type":"boolean","title":"Uses Expected Output"},"judge_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Provider"},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["evaluator_id","project_id","name","description","evaluator_type","version_number","node_contract","config","score_kind","uses_input","uses_expected_output","judge_provider","judge_model_id","created_by","updated_by","created_at","updated_at"],"title":"Evaluator"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The OffsetBasedPaginationResponse\_ProviderActionSummaryResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_ProviderActionSummaryResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/ProviderActionSummaryResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[ProviderActionSummaryResponseV2]"},"ProviderActionSummaryResponseV2":{"properties":{"action_id":{"type":"string","title":"Action Id"},"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"deprecated":{"type":"boolean","title":"Deprecated","default":false},"deprecation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Message"}},"type":"object","required":["action_id","provider_id","name","description"],"title":"ProviderActionSummaryResponse","description":"A provider action's identity and metadata, without its input/output parameters.\n\nServes the actions-list endpoint. A catalog list is intentionally lean — identity and\nmetadata to scan and pick from, not the full resource — matching how iPaaS platforms expose\naction catalogs (browse the list, then fetch one action for its fields). Callers fetch a\nsingle action's detail (`ProviderActionResponseV2`) for its `input_parameters`/`output_parameters`."}}}}
```

## The OffsetBasedPaginationResponse\_ProviderResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_ProviderResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/ProviderResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[ProviderResponseV2]"},"ProviderResponseV2":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon_url":{"type":"string","title":"Icon Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"action_count":{"type":"integer","title":"Action Count","default":0},"trigger_count":{"type":"integer","title":"Trigger Count","default":0},"deprecation":{"anyOf":[{"$ref":"#/components/schemas/ProviderDeprecationV2"},{"type":"null"}]}},"type":"object","required":["provider_id","name","description","icon_url"],"title":"ProviderResponse","description":"An integration provider on the public v2 catalog. Serves both list and detail."},"ProviderDeprecationV2":{"properties":{"removal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removal Date"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["removal_date","instructions"],"title":"ProviderDeprecation","description":"Deprecation metadata for a provider on the public v2 surface."}}}}
```

## The OffsetBasedPaginationResponse\_ProviderTriggerSummaryResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_ProviderTriggerSummaryResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/ProviderTriggerSummaryResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[ProviderTriggerSummaryResponseV2]"},"ProviderTriggerSummaryResponseV2":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"},"provider_id":{"type":"string","title":"Provider Id"},"trigger_type":{"$ref":"#/components/schemas/TriggerTypeV2"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["trigger_id","provider_id","trigger_type","name","description"],"title":"ProviderTriggerSummaryResponse","description":"A provider trigger's identity and metadata, without its parameters."},"TriggerTypeV2":{"type":"string","enum":["polling","webhook","scheduled"],"title":"TriggerTypeV2","description":"The trigger types exposed by the public Providers catalog."}}}}
```

## The OffsetBasedPaginationResponse\_SkillListItemResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_SkillListItemResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/SkillListItemResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[SkillListItemResponseV2]"},"SkillListItemResponseV2":{"properties":{"skill_id":{"type":"string","format":"uuid","title":"Skill Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"version":{"type":"integer","title":"Version"},"is_builtin":{"type":"boolean","title":"Is Builtin"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_by_org":{"$ref":"#/components/schemas/SkillOrganizationResponseV2"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["skill_id","name","description","version","is_builtin","actions","created_by_user_profile","created_by_org","created_at","updated_at"],"title":"SkillListItemResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillOrganizationResponseV2":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["org_id","org_name"],"title":"SkillOrganizationResponse"}}}}
```

## The OffsetBasedPaginationResponse\_SkillVersionListItemResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_SkillVersionListItemResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/SkillVersionListItemResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[SkillVersionListItemResponseV2]"},"SkillVersionListItemResponseV2":{"properties":{"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["version","description","created_by_user_profile","created_at"],"title":"SkillVersionListItemResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"}}}}
```

## The OffsetBasedPaginationResponse\_WebhookSubscriptionResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"OffsetBasedPaginationResponse_WebhookSubscriptionResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/WebhookSubscriptionResponseV2"},"type":"array","title":"Data"},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0},"limit":{"type":"integer","minimum":0,"title":"Limit","default":50},"total":{"type":"integer","minimum":0,"title":"Total","default":0}},"type":"object","title":"OffsetBasedPaginationResponse[WebhookSubscriptionResponseV2]"},"WebhookSubscriptionResponseV2":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array","title":"Event Types"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["subscription_id","url","event_types","created_at"],"title":"WebhookSubscriptionResponse","description":"A webhook subscription on the public v2 surface.\n\nNo `status` field: the surface only ever returns active subscriptions, so the value\ncould never vary."},"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The PaginationDirection object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"PaginationDirection":{"type":"string","enum":["next","prev"],"title":"PaginationDirection","description":"Direction for cursor-based pagination."}}}}
```

## The PauseContext object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"PauseContext":{"properties":{"run_id":{"type":"string","title":"Run Id"},"node_id":{"type":"string","title":"Node Id"},"question":{"type":"string","title":"Question","default":""},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"response_type":{"type":"string","title":"Response Type","default":"text"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices"},"resume_token":{"type":"string","title":"Resume Token"},"resume_endpoint":{"type":"string","title":"Resume Endpoint"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the resume token expires (decoded unverified for display; resume re-verifies).","readOnly":true},"response_schema":{"additionalProperties":true,"type":"object","title":"Response Schema","description":"Minimal JSON Schema describing the answer this pause expects.","readOnly":true}},"type":"object","required":["run_id","node_id","resume_token","resume_endpoint","expires_at","response_schema"],"title":"PauseContext","description":"What a paused run is waiting on, plus how to resume it."}}}}
```

## The ProjectIoParameterResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProjectIoParameterResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProjectIoParameter"}}}}
```

## The ProjectIoSchemaResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProjectIoSchemaResponseV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"inputs":{"items":{"$ref":"#/components/schemas/ProjectIoParameterResponseV2"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/ProjectIoParameterResponseV2"},"type":"array","title":"Outputs"}},"type":"object","required":["input_kind","inputs","outputs"],"title":"ProjectIoSchema"},"ProjectIoParameterResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProjectIoParameter"}}}}
```

## The ProjectRunSummary object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProjectRunSummary":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"date":{"type":"string","format":"date-time","title":"Date"},"is_flow_successful":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Flow Successful"},"state":{"anyOf":[{"$ref":"#/components/schemas/WorkflowState"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency"},"total_tokens":{"type":"integer","title":"Total Tokens"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"inputs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputs"},"llms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llms"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"cache_metrics":{"anyOf":[{"$ref":"#/components/schemas/CacheMetrics"},{"type":"null"}]},"llm_usage":{"items":{"$ref":"#/components/schemas/LLMUsageData"},"type":"array","title":"Llm Usage"},"run_type":{"anyOf":[{"$ref":"#/components/schemas/RunType"},{"type":"null"}],"description":"How the run was initiated."},"ran_by_type":{"anyOf":[{"$ref":"#/components/schemas/RanByType"},{"type":"null"}],"description":"Who authenticated the run."},"ran_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ran By Id","description":"Principal the run is attributed to: profiles.id for user and personal_api_key (the key owner), organizations.org_id for org_api_key, end_users.id for end_user. NULL for system runs and legacy rows."},"ran_by_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ran By Display Name","description":"Display name of the principal: the profile email for user and personal_api_key runs, the organization name for org_api_key runs."},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id","description":"Project version that executed the run. Non-positive values mean the draft."},"base_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Version Id","description":"For draft runs, the project's published version at run time. Lets the UI label a draft against the version it was based on (e.g. 'Draft (v3)')."},"deployment_stage":{"anyOf":[{"$ref":"#/components/schemas/DeploymentStage"},{"type":"null"}],"description":"Stage the run executed against (draft/development/staging/production). Lets the UI tell a preview run (draft) from a deployed run for form and batch runs, which otherwise share the same project_version_id sentinel."},"parent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Run Id","description":"Run ID of the parent workflow for sub-workflow runs."},"parent_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Id","description":"Project ID of the parent workflow for sub-workflow runs."},"parent_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Name","description":"Name of the parent project for sub-workflow runs."}},"type":"object","required":["run_id","date","is_flow_successful","state","error","latency","total_tokens","user_id","inputs","outputs","llms","feedback"],"title":"ProjectRunSummary","description":"Summary of a single workflow run."},"WorkflowState":{"type":"string","enum":["PENDING","RUNNING","PAUSED","RESUMED","COMPLETED","FAILED","CANCELLED"],"title":"WorkflowState","description":"Enum representing the possible states of a workflow."},"CacheMetrics":{"properties":{"read_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens","default":0},"known_input_tokens":{"type":"integer","minimum":0,"title":"Known Input Tokens","default":0},"missing_input_usage_records":{"type":"integer","minimum":0,"title":"Missing Input Usage Records","default":0},"cached_input_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Percent","description":"Return cache-read share for precisely the measured subset.","readOnly":true},"input_coverage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Coverage Percent","description":"Return observed share of recorded input, not provider-attempt coverage.","readOnly":true}},"type":"object","required":["cached_input_percent","input_coverage_percent"],"title":"CacheMetrics","description":"Weighted cache reads over measured input, including writes but excluding output."},"LLMUsageData":{"properties":{"cache_metrics":{"anyOf":[{"$ref":"#/components/schemas/CacheMetrics"},{"type":"null"}]},"provider":{"$ref":"#/components/schemas/LLMProviderEnum"},"model_id":{"type":"string","title":"Model Id"},"tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Tokens"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Input Tokens","description":"Total prompt tokens processed, INCLUDING any prompt-cache writes and reads (Anthropic reports those outside its raw input counter; they are folded back in before this record is built)."},"output_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Output Tokens"},"cache_creation_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Cache Creation Input Tokens","description":"Subset of input_tokens written to the provider prompt cache this call. Kept separate so billing can later discount cache traffic (writes bill at a premium, reads at a fraction). None when the provider reported no cache counters."},"cache_read_input_tokens":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Cache Read Input Tokens","description":"Subset of input_tokens served from the provider prompt cache this call. None when the provider reported no cache counters."},"cache_measurement":{"anyOf":[{"$ref":"#/components/schemas/CacheMeasurement"},{"type":"null"}]},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_origin":{"anyOf":[{"$ref":"#/components/schemas/LLMConnectionOrigin"},{"type":"null"}]},"is_local_model":{"type":"boolean","title":"Is Local Model","description":"Whether this usage record is from a local model.","readOnly":true},"should_charge":{"type":"boolean","title":"Should Charge","description":"Whether this usage record should be charged.","readOnly":true}},"type":"object","required":["provider","model_id","is_local_model","should_charge"],"title":"LLMUsageData","description":"Token usage for a single LLM call within a run."},"LLMProviderEnum":{"type":"string","enum":["Anthropic","Azure","Baseten","Bedrock","Cerebras","Core42","FireworksAI","Google","Google_service_account","Groq","Local","Meta","Mistral","Modular","OpenAI","OpenRouter","Perplexity","Replicate","TogetherAI","XAI"],"title":"LLMProviderEnum","description":"LLM provider identifiers."},"CacheMeasurement":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"read_input_tokens":{"type":"integer","minimum":0,"title":"Read Input Tokens"},"observed_input_tokens":{"type":"integer","minimum":0,"title":"Observed Input Tokens"}},"type":"object","required":["read_input_tokens","observed_input_tokens"],"title":"CacheMeasurement","description":"A measured subset of provider input, excluding unobserved calls."},"LLMConnectionOrigin":{"type":"string","enum":["stack_ai","external_db","external_ephemeral"],"title":"LLMConnectionOrigin"},"RunType":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval"],"title":"RunType","description":"How a workflow run was initiated."},"RanByType":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user"],"title":"RanByType","description":"Who or what authenticated the run."},"DeploymentStage":{"type":"string","enum":["draft","development","staging","production"],"title":"DeploymentStage","description":"Stages a workflow passes through before production."}}}}
```

## The ProviderActionInputParameterV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionInputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"default":{"title":"Default"},"options":{"items":{"$ref":"#/components/schemas/ProviderActionParameterOptionV2"},"type":"array","title":"Options"},"has_dynamic_options":{"type":"boolean","title":"Has Dynamic Options","default":false},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"minimum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionInputParameter","description":"One input parameter of an action; `name` is the key used in the run `inputs` map."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."},"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."}}}}
```

## The ProviderActionOutputParameterV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionOutputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionOutputParameter","description":"One output parameter of an action."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."}}}}
```

## The ProviderActionParameterOptionV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."}}}}
```

## The ProviderActionParameterTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."}}}}
```

## The ProviderActionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionResponseV2":{"properties":{"action_id":{"type":"string","title":"Action Id"},"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"deprecated":{"type":"boolean","title":"Deprecated","default":false},"deprecation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Message"},"input_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionInputParameterV2"},"type":"array","title":"Input Parameters"},"output_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionOutputParameterV2"},"type":"array","title":"Output Parameters"}},"type":"object","required":["action_id","provider_id","name","description"],"title":"ProviderActionResponse","description":"A provider action on the public v2 catalog, with its input and output parameters.\n\nServes the action-detail endpoint only. The parameters come from the provider cache — the\nsame snapshot as the rest of the catalog — not from a live registry crawl: the cache already\ncarries each action's flattened parameter metadata, so detail is a pure cache read. Output\nparameters are one level deep (nested object shapes surface as `type: \"object\"` without\ntheir sub-fields), which the cached representation does not expand."},"ProviderActionInputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"default":{"title":"Default"},"options":{"items":{"$ref":"#/components/schemas/ProviderActionParameterOptionV2"},"type":"array","title":"Options"},"has_dynamic_options":{"type":"boolean","title":"Has Dynamic Options","default":false},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"minimum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionInputParameter","description":"One input parameter of an action; `name` is the key used in the run `inputs` map."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."},"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."},"ProviderActionOutputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionOutputParameter","description":"One output parameter of an action."}}}}
```

## The ProviderActionSummaryResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderActionSummaryResponseV2":{"properties":{"action_id":{"type":"string","title":"Action Id"},"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"deprecated":{"type":"boolean","title":"Deprecated","default":false},"deprecation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Message"}},"type":"object","required":["action_id","provider_id","name","description"],"title":"ProviderActionSummaryResponse","description":"A provider action's identity and metadata, without its input/output parameters.\n\nServes the actions-list endpoint. A catalog list is intentionally lean — identity and\nmetadata to scan and pick from, not the full resource — matching how iPaaS platforms expose\naction catalogs (browse the list, then fetch one action for its fields). Callers fetch a\nsingle action's detail (`ProviderActionResponseV2`) for its `input_parameters`/`output_parameters`."}}}}
```

## The ProviderDeprecationV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderDeprecationV2":{"properties":{"removal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removal Date"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["removal_date","instructions"],"title":"ProviderDeprecation","description":"Deprecation metadata for a provider on the public v2 surface."}}}}
```

## The ProviderResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderResponseV2":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon_url":{"type":"string","title":"Icon Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"action_count":{"type":"integer","title":"Action Count","default":0},"trigger_count":{"type":"integer","title":"Trigger Count","default":0},"deprecation":{"anyOf":[{"$ref":"#/components/schemas/ProviderDeprecationV2"},{"type":"null"}]}},"type":"object","required":["provider_id","name","description","icon_url"],"title":"ProviderResponse","description":"An integration provider on the public v2 catalog. Serves both list and detail."},"ProviderDeprecationV2":{"properties":{"removal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removal Date"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["removal_date","instructions"],"title":"ProviderDeprecation","description":"Deprecation metadata for a provider on the public v2 surface."}}}}
```

## The ProviderTriggerResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderTriggerResponseV2":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"},"provider_id":{"type":"string","title":"Provider Id"},"trigger_type":{"$ref":"#/components/schemas/TriggerTypeV2"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"input_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionInputParameterV2"},"type":"array","title":"Input Parameters"},"output_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionOutputParameterV2"},"type":"array","title":"Output Parameters"}},"type":"object","required":["trigger_id","provider_id","trigger_type","name","description"],"title":"ProviderTriggerResponse","description":"A provider trigger on the public v2 catalog, with its cached parameters."},"TriggerTypeV2":{"type":"string","enum":["polling","webhook","scheduled"],"title":"TriggerTypeV2","description":"The trigger types exposed by the public Providers catalog."},"ProviderActionInputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"default":{"title":"Default"},"options":{"items":{"$ref":"#/components/schemas/ProviderActionParameterOptionV2"},"type":"array","title":"Options"},"has_dynamic_options":{"type":"boolean","title":"Has Dynamic Options","default":false},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"minimum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionInputParameter","description":"One input parameter of an action; `name` is the key used in the run `inputs` map."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."},"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."},"ProviderActionOutputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionOutputParameter","description":"One output parameter of an action."}}}}
```

## The ProviderTriggerSummaryResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ProviderTriggerSummaryResponseV2":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"},"provider_id":{"type":"string","title":"Provider Id"},"trigger_type":{"$ref":"#/components/schemas/TriggerTypeV2"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["trigger_id","provider_id","trigger_type","name","description"],"title":"ProviderTriggerSummaryResponse","description":"A provider trigger's identity and metadata, without its parameters."},"TriggerTypeV2":{"type":"string","enum":["polling","webhook","scheduled"],"title":"TriggerTypeV2","description":"The trigger types exposed by the public Providers catalog."}}}}
```

## The RanByType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RanByType":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user"],"title":"RanByType","description":"Who or what authenticated the run."}}}}
```

## The ResourceDownloadResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ResourceDownloadResponseV2":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Signed URL for direct download; expires."},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["download_url","filename"],"title":"ResourceDownloadResponse","description":"A signed URL to download the original file."}}}}
```

## The ResourceUploadResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ResourceUploadResponse":{"properties":{"message":{"type":"string","title":"Message"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"}},"type":"object","required":["message","resource_id"],"title":"ResourceUploadResponse","description":"Result of a file upload, including the resource ID for status polling."}}}}
```

## The ResourceUploadResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ResourceUploadResponseV2":{"properties":{"message":{"type":"string","title":"Message"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"}},"type":"object","required":["message","resource_id"],"title":"ResourceUploadResponse","description":"Result of a file upload, including the resource ID for status polling."}}}}
```

## The ResumeRunRequest object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ResumeRunRequest":{"properties":{"resume_token":{"type":"string","title":"Resume Token"},"response":{"type":"string","title":"Response"},"response_type":{"anyOf":[{"$ref":"#/components/schemas/HitlResponseType"},{"type":"null"}],"description":"How to interpret `response`, mirroring the pause's `response_type`."}},"type":"object","required":["resume_token","response"],"title":"ResumeRunRequest","description":"Request body to resume a paused run from the public API."},"HitlResponseType":{"type":"string","enum":["text","approval","choice"],"title":"HitlResponseType","description":"Response types accepted by the public ask_human resume API.\n\nMirrors the ask_human action's own ``Literal[\"text\", \"approval\", \"choice\"]`` (defined in\nstackflow); kept as a separate enum because apps cannot reuse that stackflow Literal."}}}}
```

## The RetrievalType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RetrievalType":{"type":"string","enum":["docs","pages","chunks"],"title":"RetrievalType","description":"Retrieval type."}}}}
```

## The RunCitationPositionV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunCitationPositionV2":{"properties":{"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index","description":"Zero-based page the chunk was read from, if recorded."},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Zero-based index of the chunk within the source, if recorded."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page number as printed in the source, if known."}},"additionalProperties":false,"type":"object","required":["page_index","chunk_index","page_number"],"title":"RunCitationPosition","description":"Position of a citation within its source."}}}}
```

## The RunCitationSourceTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunCitationSourceTypeV2":{"type":"string","enum":["knowledge_base","website","document","other"],"title":"RunCitationSourceTypeV2","description":"Type of source cited by the run."}}}}
```

## The RunCitationV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunCitationV2":{"properties":{"knowledge_base_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Knowledge Base Id","description":"Knowledge base the cited source belongs to, if any."},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id","description":"Knowledge base resource that was cited, if any."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"External link to the cited source, if available."},"source_type":{"$ref":"#/components/schemas/RunCitationSourceTypeV2","description":"Kind of source that was cited."},"position":{"anyOf":[{"$ref":"#/components/schemas/RunCitationPositionV2"},{"type":"null"}],"description":"Where in the source the cited chunk sits. Null when not recorded."}},"additionalProperties":false,"type":"object","required":["knowledge_base_id","resource_id","source_url","source_type","position"],"title":"RunCitation","description":"Source cited by a run."},"RunCitationSourceTypeV2":{"type":"string","enum":["knowledge_base","website","document","other"],"title":"RunCitationSourceTypeV2","description":"Type of source cited by the run."},"RunCitationPositionV2":{"properties":{"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index","description":"Zero-based page the chunk was read from, if recorded."},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Zero-based index of the chunk within the source, if recorded."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page number as printed in the source, if known."}},"additionalProperties":false,"type":"object","required":["page_index","chunk_index","page_number"],"title":"RunCitationPosition","description":"Position of a citation within its source."}}}}
```

## The RunCreatedByTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."}}}}
```

## The RunCreatedByV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunCreatedByV2":{"properties":{"type":{"$ref":"#/components/schemas/RunCreatedByTypeV2","description":"Kind of principal that started the run."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of the principal identified by `type`: the user ID for `user` and `personal_api_key`, the organization ID for `org_api_key`, the end-user ID for `end_user`. Null if no ID is available."}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"RunCreatedBy","description":"Who or what started the run."},"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."}}}}
```

## The RunPauseResponseTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunPauseResponseTypeV2":{"type":"string","enum":["text","approval","choice","unknown"],"title":"RunPauseResponseTypeV2","description":"Kind of answer requested by a paused ask-human step."}}}}
```

## The RunPendingInputV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunPendingInputV2":{"properties":{"question":{"type":"string","title":"Question","description":"Question shown to the human responder."},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Additional context, if supplied."},"response_type":{"$ref":"#/components/schemas/RunPauseResponseTypeV2","description":"Expected answer kind."},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices","description":"Ordered choices, when supplied."},"resume_token":{"type":"string","title":"Resume Token","description":"Secret token authorizing this pause's resume."},"resume_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resume Token Expires At","description":"When the resume token expires; this is not the pause timeout."}},"additionalProperties":false,"type":"object","required":["question","context","response_type","choices","resume_token","resume_token_expires_at"],"title":"RunPendingInput","description":"Ask-human input awaiting a response from a caller who may run the project."},"RunPauseResponseTypeV2":{"type":"string","enum":["text","approval","choice","unknown"],"title":"RunPauseResponseTypeV2","description":"Kind of answer requested by a paused ask-human step."}}}}
```

## The RunProviderActionRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunProviderActionRequestV2":{"properties":{"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"}},"additionalProperties":false,"type":"object","required":["inputs"],"title":"RunProviderActionRequest","description":"Body for running a provider action; `inputs` is validated against the action's own schema."}}}}
```

## The RunProviderActionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunProviderActionResponseV2":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"RunProviderActionResponse","description":"The result of running a provider action, keyed by the action's own output parameter names."}}}}
```

## The RunResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the run."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project the run executed. Null for legacy runs."},"project_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version","description":"Project version used for this run: -1 for a draft execution, a non-negative integer for a numbered version, or null when the version could not be determined."},"status":{"$ref":"#/components/schemas/RunStatusV2","description":"Lifecycle status of the run."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure message. Null when the run did not fail."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was recorded."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started. Null when unknown or not yet started."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished. Null when unknown or not yet finished."},"run_type":{"anyOf":[{"$ref":"#/components/schemas/RunTypeV2"},{"type":"null"}],"description":"How the run was started. Null when not recorded."},"created_by":{"anyOf":[{"$ref":"#/components/schemas/RunCreatedByV2"},{"type":"null"}],"description":"Principal that started the run. Null when not recorded."},"usage":{"$ref":"#/components/schemas/RunUsageV2","description":"Token usage for the run."},"parent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Run Id","description":"Run that started this one. Null unless this is a sub-workflow run."},"parent_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Id","description":"Project of the parent run. Null unless this is a sub-workflow run."},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input","description":"Inputs the run was started with."},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"Outputs the run produced."},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunCitationV2"},"type":"array"},{"type":"null"}],"title":"Citations","description":"Sources cited by the run. Null when the run recorded none."},"pending_input":{"anyOf":[{"$ref":"#/components/schemas/RunPendingInputV2"},{"type":"null"}],"description":"Ask-human input for a paused run. Null unless the caller can both read and resume it."}},"additionalProperties":false,"type":"object","required":["run_id","project_id","status","error","created_at","started_at","completed_at","run_type","created_by","usage","parent_run_id","parent_project_id","input","output","citations","pending_input"],"title":"RunResponse","description":"A run with its input, output, citations, and token usage."},"RunStatusV2":{"type":"string","enum":["queued","running","paused","succeeded","failed","cancelled"],"title":"RunStatusV2","description":"Lifecycle status exposed by the Runs v2 API."},"RunTypeV2":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval","unknown"],"title":"RunTypeV2","description":"How the run was started. Unrecognized types appear as `unknown`."},"RunCreatedByV2":{"properties":{"type":{"$ref":"#/components/schemas/RunCreatedByTypeV2","description":"Kind of principal that started the run."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of the principal identified by `type`: the user ID for `user` and `personal_api_key`, the organization ID for `org_api_key`, the end-user ID for `end_user`. Null if no ID is available."}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"RunCreatedBy","description":"Who or what started the run."},"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."},"RunUsageV2":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens","description":"Tokens used across every model call in the run."},"details":{"items":{"$ref":"#/components/schemas/RunUsageDetailV2"},"type":"array","title":"Details","description":"Usage aggregated per model and connection; models may appear more than once."}},"additionalProperties":false,"type":"object","required":["total_tokens","details"],"title":"RunUsage","description":"Total and per-model token usage for a run."},"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."},"RunCitationV2":{"properties":{"knowledge_base_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Knowledge Base Id","description":"Knowledge base the cited source belongs to, if any."},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id","description":"Knowledge base resource that was cited, if any."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"External link to the cited source, if available."},"source_type":{"$ref":"#/components/schemas/RunCitationSourceTypeV2","description":"Kind of source that was cited."},"position":{"anyOf":[{"$ref":"#/components/schemas/RunCitationPositionV2"},{"type":"null"}],"description":"Where in the source the cited chunk sits. Null when not recorded."}},"additionalProperties":false,"type":"object","required":["knowledge_base_id","resource_id","source_url","source_type","position"],"title":"RunCitation","description":"Source cited by a run."},"RunCitationSourceTypeV2":{"type":"string","enum":["knowledge_base","website","document","other"],"title":"RunCitationSourceTypeV2","description":"Type of source cited by the run."},"RunCitationPositionV2":{"properties":{"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index","description":"Zero-based page the chunk was read from, if recorded."},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Zero-based index of the chunk within the source, if recorded."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page number as printed in the source, if known."}},"additionalProperties":false,"type":"object","required":["page_index","chunk_index","page_number"],"title":"RunCitationPosition","description":"Position of a citation within its source."},"RunPendingInputV2":{"properties":{"question":{"type":"string","title":"Question","description":"Question shown to the human responder."},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Additional context, if supplied."},"response_type":{"$ref":"#/components/schemas/RunPauseResponseTypeV2","description":"Expected answer kind."},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices","description":"Ordered choices, when supplied."},"resume_token":{"type":"string","title":"Resume Token","description":"Secret token authorizing this pause's resume."},"resume_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resume Token Expires At","description":"When the resume token expires; this is not the pause timeout."}},"additionalProperties":false,"type":"object","required":["question","context","response_type","choices","resume_token","resume_token_expires_at"],"title":"RunPendingInput","description":"Ask-human input awaiting a response from a caller who may run the project."},"RunPauseResponseTypeV2":{"type":"string","enum":["text","approval","choice","unknown"],"title":"RunPauseResponseTypeV2","description":"Kind of answer requested by a paused ask-human step."}}}}
```

## The RunResumeRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunResumeRequestV2":{"properties":{"resume_token":{"type":"string","title":"Resume Token","description":"Token issued for the paused ask-human step."},"response":{"type":"string","title":"Response","description":"Human response to the paused step."},"response_type":{"anyOf":[{"$ref":"#/components/schemas/RunResumeResponseTypeV2"},{"type":"null"}],"description":"How to interpret the response; defaults to text when omitted."}},"additionalProperties":false,"type":"object","required":["resume_token","response"],"title":"RunResumeRequest","description":"Body for resuming an ask-human pause."},"RunResumeResponseTypeV2":{"type":"string","enum":["text","approval","choice"],"title":"RunResumeResponseTypeV2","description":"Kind of answer sent to a paused ask-human step."}}}}
```

## The RunResumeResponseTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunResumeResponseTypeV2":{"type":"string","enum":["text","approval","choice"],"title":"RunResumeResponseTypeV2","description":"Kind of answer sent to a paused ask-human step."}}}}
```

## The RunStartRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunStartRequestV2":{"properties":{"project_id":{"type":"string","title":"Project Id"},"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Node inputs keyed by node id, matching the project's input schema."},"project_version":{"anyOf":[{"type":"integer","minimum":-1},{"type":"null"}],"title":"Project Version","description":"Project version to run. Omit or use null for the current published version, use -1 for the current draft, or use a non-negative version for an exact snapshot."}},"additionalProperties":false,"type":"object","required":["project_id","input"],"title":"RunStartRequest","description":"Body for starting a project run."}}}}
```

## The RunStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunStatusResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"state":{"anyOf":[{"$ref":"#/components/schemas/WorkflowState"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"pause":{"anyOf":[{"$ref":"#/components/schemas/PauseContext"},{"type":"null"}]}},"type":"object","required":["run_id"],"title":"RunStatusResponse","description":"Public run status, surfacing the pause context when the run is awaiting a response."},"WorkflowState":{"type":"string","enum":["PENDING","RUNNING","PAUSED","RESUMED","COMPLETED","FAILED","CANCELLED"],"title":"WorkflowState","description":"Enum representing the possible states of a workflow."},"PauseContext":{"properties":{"run_id":{"type":"string","title":"Run Id"},"node_id":{"type":"string","title":"Node Id"},"question":{"type":"string","title":"Question","default":""},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"response_type":{"type":"string","title":"Response Type","default":"text"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices"},"resume_token":{"type":"string","title":"Resume Token"},"resume_endpoint":{"type":"string","title":"Resume Endpoint"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the resume token expires (decoded unverified for display; resume re-verifies).","readOnly":true},"response_schema":{"additionalProperties":true,"type":"object","title":"Response Schema","description":"Minimal JSON Schema describing the answer this pause expects.","readOnly":true}},"type":"object","required":["run_id","node_id","resume_token","resume_endpoint","expires_at","response_schema"],"title":"PauseContext","description":"What a paused run is waiting on, plus how to resume it."}}}}
```

## The RunStatusV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunStatusV2":{"type":"string","enum":["queued","running","paused","succeeded","failed","cancelled"],"title":"RunStatusV2","description":"Lifecycle status exposed by the Runs v2 API."}}}}
```

## The RunSummaryResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunSummaryResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the run."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project the run executed. Null for legacy runs."},"project_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version","description":"Project version used for this run: -1 for a draft execution, a non-negative integer for a numbered version, or null when the version could not be determined."},"status":{"$ref":"#/components/schemas/RunStatusV2","description":"Lifecycle status of the run."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure message. Null when the run did not fail."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was recorded."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started. Null when unknown or not yet started."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished. Null when unknown or not yet finished."},"run_type":{"anyOf":[{"$ref":"#/components/schemas/RunTypeV2"},{"type":"null"}],"description":"How the run was started. Null when not recorded."},"created_by":{"anyOf":[{"$ref":"#/components/schemas/RunCreatedByV2"},{"type":"null"}],"description":"Principal that started the run. Null when not recorded."},"usage":{"$ref":"#/components/schemas/RunUsageV2","description":"Token usage for the run."},"parent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Run Id","description":"Run that started this one. Null unless this is a sub-workflow run."},"parent_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Id","description":"Project of the parent run. Null unless this is a sub-workflow run."}},"additionalProperties":false,"type":"object","required":["run_id","project_id","status","error","created_at","started_at","completed_at","run_type","created_by","usage","parent_run_id","parent_project_id"],"title":"RunSummaryResponse","description":"A list row without its unbounded input, output, or citations."},"RunStatusV2":{"type":"string","enum":["queued","running","paused","succeeded","failed","cancelled"],"title":"RunStatusV2","description":"Lifecycle status exposed by the Runs v2 API."},"RunTypeV2":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval","unknown"],"title":"RunTypeV2","description":"How the run was started. Unrecognized types appear as `unknown`."},"RunCreatedByV2":{"properties":{"type":{"$ref":"#/components/schemas/RunCreatedByTypeV2","description":"Kind of principal that started the run."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of the principal identified by `type`: the user ID for `user` and `personal_api_key`, the organization ID for `org_api_key`, the end-user ID for `end_user`. Null if no ID is available."}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"RunCreatedBy","description":"Who or what started the run."},"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."},"RunUsageV2":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens","description":"Tokens used across every model call in the run."},"details":{"items":{"$ref":"#/components/schemas/RunUsageDetailV2"},"type":"array","title":"Details","description":"Usage aggregated per model and connection; models may appear more than once."}},"additionalProperties":false,"type":"object","required":["total_tokens","details"],"title":"RunUsage","description":"Total and per-model token usage for a run."},"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."}}}}
```

## The RunType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunType":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval"],"title":"RunType","description":"How a workflow run was initiated."}}}}
```

## The RunTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunTypeV2":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval","unknown"],"title":"RunTypeV2","description":"How the run was started. Unrecognized types appear as `unknown`."}}}}
```

## The RunUsageDetailV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."}}}}
```

## The RunUsageV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"RunUsageV2":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens","description":"Tokens used across every model call in the run."},"details":{"items":{"$ref":"#/components/schemas/RunUsageDetailV2"},"type":"array","title":"Details","description":"Usage aggregated per model and connection; models may appear more than once."}},"additionalProperties":false,"type":"object","required":["total_tokens","details"],"title":"RunUsage","description":"Total and per-model token usage for a run."},"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."}}}}
```

## The SelectedWebsiteSource object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."}}}}
```

## The SelectedWebsiteSourceType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."}}}}
```

## The SkillCreatorResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"}}}}
```

## The SkillFileResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillFileResponseV2":{"properties":{"path":{"type":"string","title":"Path"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","content_type","size"],"title":"SkillFileResponse"}}}}
```

## The SkillListItemResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillListItemResponseV2":{"properties":{"skill_id":{"type":"string","format":"uuid","title":"Skill Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"version":{"type":"integer","title":"Version"},"is_builtin":{"type":"boolean","title":"Is Builtin"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_by_org":{"$ref":"#/components/schemas/SkillOrganizationResponseV2"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["skill_id","name","description","version","is_builtin","actions","created_by_user_profile","created_by_org","created_at","updated_at"],"title":"SkillListItemResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillOrganizationResponseV2":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["org_id","org_name"],"title":"SkillOrganizationResponse"}}}}
```

## The SkillOrganizationResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillOrganizationResponseV2":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["org_id","org_name"],"title":"SkillOrganizationResponse"}}}}
```

## The SkillResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillResponseV2":{"properties":{"skill_id":{"type":"string","format":"uuid","title":"Skill Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"version":{"type":"integer","title":"Version"},"is_builtin":{"type":"boolean","title":"Is Builtin"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_by_org":{"$ref":"#/components/schemas/SkillOrganizationResponseV2"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"instructions":{"type":"string","title":"Instructions"},"frontmatter":{"additionalProperties":true,"type":"object","title":"Frontmatter"},"files":{"items":{"$ref":"#/components/schemas/SkillFileResponseV2"},"type":"array","title":"Files"}},"type":"object","required":["skill_id","name","description","version","is_builtin","actions","created_by_user_profile","created_by_org","created_at","updated_at","instructions"],"title":"SkillResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillOrganizationResponseV2":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["org_id","org_name"],"title":"SkillOrganizationResponse"},"SkillFileResponseV2":{"properties":{"path":{"type":"string","title":"Path"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","content_type","size"],"title":"SkillFileResponse"}}}}
```

## The SkillVersionListItemResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillVersionListItemResponseV2":{"properties":{"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["version","description","created_by_user_profile","created_at"],"title":"SkillVersionListItemResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"}}}}
```

## The SkillVersionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"SkillVersionResponseV2":{"properties":{"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"instructions":{"type":"string","title":"Instructions"},"frontmatter":{"additionalProperties":true,"type":"object","title":"Frontmatter"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"files":{"items":{"$ref":"#/components/schemas/SkillFileResponseV2"},"type":"array","title":"Files"}},"type":"object","required":["version","description","created_by_user_profile","created_at","instructions"],"title":"SkillVersionResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillFileResponseV2":{"properties":{"path":{"type":"string","title":"Path"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","content_type","size"],"title":"SkillFileResponse"}}}}
```

## The StackAIAPIDataResponse\_EvalDatasetResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalDatasetResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalDatasetResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalDatasetResponseV2]"},"EvalDatasetResponseV2":{"properties":{"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"max_rows":{"type":"integer","title":"Max Rows"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["dataset_id","project_id","name","description","node_contract","max_rows","created_by","updated_by","created_at","updated_at"],"title":"EvalDataset"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The StackAIAPIDataResponse\_EvalDatasetRowResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalDatasetRowResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalDatasetRowResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalDatasetRowResponseV2]"},"EvalDatasetRowResponseV2":{"properties":{"dataset_row_id":{"type":"string","format":"uuid","title":"Dataset Row Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"url":{"type":"string","title":"Url"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_row_id","dataset_id","url","position","inputs","expected_output","source_run_id","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetRow"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentCreateResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentCreateResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentCreateResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentCreateResponseV2]"},"EvalExperimentCreateResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"warnings":{"$ref":"#/components/schemas/EvalExperimentWarningsResponseV2"}},"type":"object","required":["experiment","warnings"],"title":"EvalExperimentCreateResponseV2"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentWarningsResponseV2":{"properties":{"draft_version":{"type":"boolean","title":"Draft Version","default":false},"rows_without_expected_output":{"type":"integer","title":"Rows Without Expected Output","default":0}},"type":"object","title":"EvalExperimentWarnings"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentDetailResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentDetailResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentDetailResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentDetailResponseV2]"},"EvalExperimentDetailResponseV2":{"properties":{"experiment":{"$ref":"#/components/schemas/EvalExperimentResponseV2"},"latest_job":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobResponseV2"},{"type":"null"}]},"job_status_available":{"type":"boolean","title":"Job Status Available"},"status_counts":{"$ref":"#/components/schemas/EvalExperimentStatusCountsResponseV2"},"aggregate_cards":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateCardResponseV2"},"type":"array","title":"Aggregate Cards"},"evaluators":{"items":{"$ref":"#/components/schemas/EvaluatorResponseV2"},"type":"array","title":"Evaluators"},"run_stats":{"$ref":"#/components/schemas/EvalExperimentRunStatsResponseV2"}},"type":"object","required":["experiment","latest_job","job_status_available","status_counts","aggregate_cards","evaluators","run_stats"],"title":"EvalExperimentDetail"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"},"EvalExperimentStatusCountsResponseV2":{"properties":{"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["pending","running","completed","failed","total","done"],"title":"EvalExperimentStatusCounts"},"EvalExperimentAggregateCardResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"has_scores":{"type":"boolean","title":"Has Scores"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalExperimentChoiceSegmentResponseV2"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","required":["evaluator_id","name","aggregate","scored_count","judge_failed_count","has_scores","segments"],"title":"EvalExperimentAggregateCard"},"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"},"EvaluatorResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"version_number":{"type":"integer","title":"Version Number"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"uses_input":{"type":"boolean","title":"Uses Input"},"uses_expected_output":{"type":"boolean","title":"Uses Expected Output"},"judge_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Provider"},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["evaluator_id","project_id","name","description","evaluator_type","version_number","node_contract","config","score_kind","uses_input","uses_expected_output","judge_provider","judge_model_id","created_by","updated_by","created_at","updated_at"],"title":"Evaluator"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalExperimentRunStatsResponseV2":{"properties":{"avg_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Seconds"},"avg_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Tokens"}},"type":"object","required":["avg_latency_seconds","avg_tokens"],"title":"EvalExperimentRunStats"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentJobAcceptedResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentJobAcceptedResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentJobAcceptedResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentJobAcceptedResponseV2]"},"EvalExperimentJobAcceptedResponseV2":{"properties":{"status":{"type":"string","const":"accepted","title":"Status","description":"The request was accepted. Poll the job for its current state.","default":"accepted"},"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"ID of the job that was created. Poll the job route with it."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment the job works on."},"status_url":{"type":"string","title":"Status Url","description":"Relative URL of the job, the same value as the Location header. Poll it until the job reaches a final status."}},"type":"object","required":["job_id","experiment_id","status_url"],"title":"EvalExperimentJobAccepted"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentJobResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentJobResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentJobResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentJobResponseV2]"},"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentResponseV2]"},"EvalExperimentResponseV2":{"properties":{"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"project_version_id":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":0}],"title":"Project Version Id"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["experiment_id","project_id","dataset_id","dataset_name","project_version_id","node_contract","name","notes","created_by","created_at","updated_at"],"title":"EvalExperiment"},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"}}}}
```

## The StackAIAPIDataResponse\_EvalExperimentStatusResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalExperimentStatusResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalExperimentStatusResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalExperimentStatusResponseV2]"},"EvalExperimentStatusResponseV2":{"properties":{"latest_job":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobResponseV2"},{"type":"null"}]},"job_status_available":{"type":"boolean","title":"Job Status Available"},"status_counts":{"$ref":"#/components/schemas/EvalExperimentStatusCountsResponseV2"},"aggregate_cards":{"items":{"$ref":"#/components/schemas/EvalExperimentAggregateCardResponseV2"},"type":"array","title":"Aggregate Cards"}},"type":"object","required":["latest_job","job_status_available","status_counts","aggregate_cards"],"title":"EvalExperimentStatus"},"EvalExperimentJobResponseV2":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Unique ID of this job. Each accepted job request creates a new one."},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id","description":"The experiment this job works on."},"mode":{"$ref":"#/components/schemas/EvalExperimentJobMode","description":"What the job does: generate outputs for the experiment's rows, optionally scoring them, or score existing outputs."},"evaluator_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Evaluator Ids"},"status":{"$ref":"#/components/schemas/EvalExperimentJobStatus","description":"Lifecycle state. queued and running are in progress; completed, completed_with_failures, failed and cancelled are final."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was accepted."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When a worker started the job. Null while the job is queued."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the job reached a final status. Null while queued or running."},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At","description":"Last time the job's state changed."},"error":{"anyOf":[{"$ref":"#/components/schemas/EvalExperimentJobErrorResponse"},{"type":"null"}],"description":"Why the job ended early. Null unless status is failed or cancelled."}},"type":"object","required":["job_id","experiment_id","mode","evaluator_ids","status","created_at","started_at","finished_at","last_activity_at","error"],"title":"EvalExperimentJob"},"EvalExperimentJobMode":{"type":"string","enum":["generate","score"],"title":"EvalExperimentJobMode","description":"What a job does.\n\ngenerate: produce outputs for the experiment's rows, and score them when evaluators were\nselected. score: score existing outputs only; nothing is regenerated."},"EvalExperimentJobStatus":{"type":"string","enum":["queued","running","completed","completed_with_failures","failed","cancelled"],"title":"EvalExperimentJobStatus","description":"Lifecycle of a job.\n\nqueued and running are in progress. completed, completed_with_failures, failed and cancelled\nare final; completed_with_failures means the job finished but some rows or scores failed."},"EvalExperimentJobErrorResponse":{"properties":{"code":{"type":"string","title":"Code","description":"Stable machine-readable reason: job_launch_failed, job_failed, job_cancelled, job_timed_out, job_terminated or job_history_unavailable."},"message":{"type":"string","title":"Message","description":"Short human-readable explanation, safe to show to end users."}},"type":"object","required":["code","message"],"title":"EvalExperimentJobError"},"EvalExperimentStatusCountsResponseV2":{"properties":{"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["pending","running","completed","failed","total","done"],"title":"EvalExperimentStatusCounts"},"EvalExperimentAggregateCardResponseV2":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"judge_failed_count":{"type":"integer","title":"Judge Failed Count"},"has_scores":{"type":"boolean","title":"Has Scores"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalExperimentChoiceSegmentResponseV2"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","required":["evaluator_id","name","aggregate","scored_count","judge_failed_count","has_scores","segments"],"title":"EvalExperimentAggregateCard"},"EvalExperimentChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalExperimentChoiceSegment"}}}}
```

## The StackAIAPIDataResponse\_EvalMonitorAlertResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalMonitorAlertResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalMonitorAlertResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalMonitorAlertResponseV2]"},"EvalMonitorAlertResponseV2":{"properties":{"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"warning_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Warning Threshold"},"min_samples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Samples"},"window_max_runs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Max Runs"},"window_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Hours"},"min_effect_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Effect Size"},"recovery_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Threshold"},"renotify_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renotify Hours"},"notifications_enabled":{"type":"boolean","title":"Notifications Enabled"},"severity":{"$ref":"#/components/schemas/EvalAlertSeverity"},"effective":{"$ref":"#/components/schemas/EvalAlertEffectiveConfigResponseV2"},"defaults":{"$ref":"#/components/schemas/EvalAlertEffectiveConfigResponseV2"}},"type":"object","required":["threshold","warning_threshold","min_samples","window_max_runs","window_hours","min_effect_size","recovery_threshold","renotify_hours","notifications_enabled","severity","effective","defaults"],"title":"EvalMonitorAlertView"},"EvalAlertSeverity":{"type":"string","enum":["unknown","ok","warning","alert"],"title":"EvalAlertSeverity","description":"Per-(monitor, evaluator) alert state; notifications fire on transitions, not levels."},"EvalAlertEffectiveConfigResponseV2":{"properties":{"threshold":{"type":"number","title":"Threshold"},"warning_threshold":{"type":"number","title":"Warning Threshold"},"min_samples":{"type":"integer","title":"Min Samples"},"window_max_runs":{"type":"integer","title":"Window Max Runs"},"window_hours":{"type":"integer","title":"Window Hours"},"min_effect_size":{"type":"number","title":"Min Effect Size"},"recovery_threshold":{"type":"number","title":"Recovery Threshold"},"renotify_hours":{"type":"integer","title":"Renotify Hours"}},"type":"object","required":["threshold","warning_threshold","min_samples","window_max_runs","window_hours","min_effect_size","recovery_threshold","renotify_hours"],"title":"EvalAlertEffectiveConfig"}}}}
```

## The StackAIAPIDataResponse\_EvalMonitorLimitsResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalMonitorLimitsResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalMonitorLimitsResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalMonitorLimitsResponseV2]"},"EvalMonitorLimitsResponseV2":{"properties":{"sampling_rate_limit":{"type":"number","title":"Sampling Rate Limit","default":0.3},"max_runs_daily_limit":{"type":"integer","title":"Max Runs Daily Limit","default":1000},"sampling_rate_default":{"type":"number","title":"Sampling Rate Default","default":0.3},"max_runs_daily_default":{"type":"integer","title":"Max Runs Daily Default","default":1000}},"type":"object","title":"EvalMonitorLimits"}}}}
```

## The StackAIAPIDataResponse\_EvalMonitorResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalMonitorResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalMonitorResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalMonitorResponseV2]"},"EvalMonitorResponseV2":{"properties":{"monitor_id":{"type":"string","format":"uuid","title":"Monitor Id"},"project_id":{"type":"string","title":"Project Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"sampling_rate":{"type":"number","title":"Sampling Rate"},"max_runs_daily":{"type":"integer","title":"Max Runs Daily"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["monitor_id","project_id","evaluator_id","name","description","enabled","sampling_rate","max_runs_daily","created_by","updated_by","created_at","updated_at"],"title":"EvalMonitor"}}}}
```

## The StackAIAPIDataResponse\_EvalMonitorScoreStatsResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalMonitorScoreStatsResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalMonitorScoreStatsResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalMonitorScoreStatsResponseV2]"},"EvalMonitorScoreStatsResponseV2":{"properties":{"pending_count":{"type":"integer","title":"Pending Count"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"},"runs_enqueued_today":{"type":"integer","title":"Runs Enqueued Today"},"evaluators":{"items":{"$ref":"#/components/schemas/EvalMonitorEvaluatorTrendResponseV2"},"type":"array","title":"Evaluators"}},"type":"object","required":["pending_count","scored_count","failed_count","runs_enqueued_today","evaluators"],"title":"EvalMonitorScoreStats"},"EvalMonitorEvaluatorTrendResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"window_aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Window Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"},"buckets":{"items":{"$ref":"#/components/schemas/EvalMonitorTrendBucketResponseV2"},"type":"array","title":"Buckets"},"choice_segments":{"items":{"$ref":"#/components/schemas/EvalChoiceSegmentResponseV2"},"type":"array","title":"Choice Segments"}},"type":"object","required":["evaluator_id","evaluator_name","score_kind","window_aggregate","scored_count","failed_count","buckets","choice_segments"],"title":"EvalMonitorEvaluatorTrend"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalMonitorTrendBucketResponseV2":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"aggregate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate"},"scored_count":{"type":"integer","title":"Scored Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["bucket_start","aggregate","scored_count","failed_count"],"title":"EvalMonitorTrendBucket"},"EvalChoiceSegmentResponseV2":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"type":"object","required":["label","count","value"],"title":"EvalChoiceSegment"}}}}
```

## The StackAIAPIDataResponse\_EvalRunScoreResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvalRunScoreResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvalRunScoreResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvalRunScoreResponseV2]"},"EvalRunScoreResponseV2":{"properties":{"score_id":{"type":"string","format":"uuid","title":"Score Id"},"project_id":{"type":"string","title":"Project Id"},"experiment_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Experiment Row Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"project_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version Id"},"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"input_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Snapshot"},"output_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Snapshot"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"evaluator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Name"}},"type":"object","required":["score_id","project_id","experiment_row_id","run_id","project_version_id","evaluator_id","score_kind","score","choice_label","feedback","status","error","input_snapshot","output_snapshot","created_by","created_at","updated_at","evaluator_name"],"title":"EvalRunScore"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The StackAIAPIDataResponse\_EvaluatorResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_EvaluatorResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/EvaluatorResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[EvaluatorResponseV2]"},"EvaluatorResponseV2":{"properties":{"evaluator_id":{"type":"string","format":"uuid","title":"Evaluator Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"version_number":{"type":"integer","title":"Version Number"},"node_contract":{"$ref":"#/components/schemas/EvalNodeContractV2"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"uses_input":{"type":"boolean","title":"Uses Input"},"uses_expected_output":{"type":"boolean","title":"Uses Expected Output"},"judge_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Provider"},"judge_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["evaluator_id","project_id","name","description","evaluator_type","version_number","node_contract","config","score_kind","uses_input","uses_expected_output","judge_provider","judge_model_id","created_by","updated_by","created_at","updated_at"],"title":"Evaluator"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."},"EvalNodeContractV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"input_keys":{"items":{"type":"string"},"type":"array","title":"Input Keys"},"output_node_ids":{"items":{"type":"string"},"type":"array","title":"Output Node Ids"}},"type":"object","required":["input_kind","input_keys","output_node_ids"],"title":"EvalNodeContract"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."}}}}
```

## The StackAIAPIDataResponse\_KnowledgeBaseFileResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_KnowledgeBaseFileResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/KnowledgeBaseFileResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[KnowledgeBaseFileResponseV2]"},"KnowledgeBaseFileResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"type":"string","format":"date-time","title":"Modified At"},"indexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Indexed At"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"resource_path":{"type":"string","minLength":1,"title":"Resource Path"},"acl_target_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acl Target Path"},"dataloader_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Dataloader Metadata"},"user_metadata":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"anyOf":[{},{"type":"null"}]}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"User Metadata"},"content_hash":{"type":"string","minLength":1,"title":"Content Hash"},"content_mime":{"type":"string","minLength":1,"title":"Content Mime"},"size":{"type":"integer","minimum":0,"title":"Size"},"status":{"$ref":"#/components/schemas/StackFileStatusEnum"},"effective_permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Effective Permissions"}},"type":"object","required":["knowledge_base_id","created_at","modified_at","resource_id","resource_path","content_hash","content_mime","size","status"],"title":"KnowledgeBaseFileResponse","description":"A file stored in a knowledge base."},"StackFileStatusEnum":{"type":"string","enum":["resource","parsed","indexed","pending","pending_delete","deleted","error"],"title":"StackFileStatusEnum","description":"Processing status of a file in a knowledge base."}}}}
```

## The StackAIAPIDataResponse\_KnowledgeBaseMetadataSchemasResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_KnowledgeBaseMetadataSchemasResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/KnowledgeBaseMetadataSchemasResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[KnowledgeBaseMetadataSchemasResponseV2]"},"KnowledgeBaseMetadataSchemasResponseV2":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchemaResponseV2"},{"type":"null"}]},"dataloader":{"anyOf":[{"$ref":"#/components/schemas/MetadataSchemaResponseV2"},{"type":"null"}]}},"type":"object","required":["user","dataloader"],"title":"KnowledgeBaseMetadataSchemas","description":"The user and dataloader metadata schemas for a knowledge base on the public v2 surface."},"MetadataSchemaResponseV2":{"properties":{"properties":{"patternProperties":{"^[^\\t\\n\\r\\f\\v]+$":{"oneOf":[{"$ref":"#/components/schemas/MetadataStringPropertyResponseV2"},{"$ref":"#/components/schemas/MetadataPropertyBaseResponseV2"},{"$ref":"#/components/schemas/MetadataStringListPropertyResponseV2"}],"discriminator":{"propertyName":"type","mapping":{"boolean":"#/components/schemas/MetadataPropertyBaseResponseV2","date":"#/components/schemas/MetadataPropertyBaseResponseV2","number":"#/components/schemas/MetadataPropertyBaseResponseV2","string":"#/components/schemas/MetadataStringPropertyResponseV2","string_list":"#/components/schemas/MetadataStringListPropertyResponseV2"}}}},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","title":"Properties"}},"type":"object","required":["properties"],"title":"MetadataSchema","description":"A metadata schema (user or dataloader) on the public v2 surface."},"MetadataStringPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum"}},"type":"object","required":["description","order","subtype"],"title":"MetadataStringPropertyResponse","description":"A string-valued metadata property on the public v2 surface."},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"},"MetadataPropertyBaseResponseV2":{"properties":{"type":{"type":"string","enum":["number","boolean","date"],"title":"Type"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["type","description","order"],"title":"MetadataPropertyResponse","description":"Shared fields for every metadata property on the public v2 surface.\n\nUsed directly for property types that add no extra fields (number, boolean,\ndate); string and string-list subclass it below for their extra fields."},"MetadataStringListPropertyResponseV2":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order"},"options":{"items":{"$ref":"#/components/schemas/MetadataStringListOptionResponseV2"},"type":"array","title":"Options"}},"type":"object","required":["description","order","options"],"title":"MetadataStringListPropertyResponse","description":"A string-list-valued metadata property on the public v2 surface."},"MetadataStringListOptionResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"color":{"$ref":"#/components/schemas/StringListOptionColor"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","label","description","color","order"],"title":"MetadataStringListOptionResponse","description":"A selectable option for a string-list metadata property."},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The StackAIAPIDataResponse\_KnowledgeBaseResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_KnowledgeBaseResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/KnowledgeBaseResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[KnowledgeBaseResponseV2]"},"KnowledgeBaseResponseV2":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled"},"connection_provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Provider Type"},"is_empty":{"type":"boolean","title":"Is Empty","default":true},"total_size":{"type":"integer","title":"Total Size","default":0},"total_files":{"type":"integer","title":"Total Files","default":0},"total_indexed_files":{"type":"integer","title":"Total Indexed Files","default":0},"total_error_files":{"type":"integer","title":"Total Error Files","default":0},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseIndexingParams"},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]},"role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"type":"object","required":["knowledge_base_id","connection_id","created_at","updated_at","connection_source_ids","website_sources","source_file_authorization_enabled","indexing_params"],"title":"KnowledgeBaseResponse","description":"A knowledge base on the public v2 surface."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseResponseIndexingParams":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/KnowledgeBaseResponseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","required":["embedding_params"],"title":"KnowledgeBaseResponseIndexingParams","description":"Indexing configuration of a knowledge base."},"KnowledgeBaseResponseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["embedding_model"],"title":"KnowledgeBaseResponseEmbeddingParams","description":"Embedding configuration of a knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The StackAIAPIDataResponse\_KnowledgeBaseSyncResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_KnowledgeBaseSyncResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/KnowledgeBaseSyncResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[KnowledgeBaseSyncResponseV2]"},"KnowledgeBaseSyncResponseV2":{"properties":{"message":{"type":"string","title":"Message"},"status":{"type":"string","const":"accepted","title":"Status","default":"accepted"}},"type":"object","required":["message"],"title":"KnowledgeBaseSyncResponse","description":"Acknowledgement that a sync or reindex task was accepted."}}}}
```

## The StackAIAPIDataResponse\_ProjectIoSchemaResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ProjectIoSchemaResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ProjectIoSchemaResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ProjectIoSchemaResponseV2]"},"ProjectIoSchemaResponseV2":{"properties":{"input_kind":{"type":"string","enum":["start_node","legacy_input_nodes"],"title":"Input Kind"},"inputs":{"items":{"$ref":"#/components/schemas/ProjectIoParameterResponseV2"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/ProjectIoParameterResponseV2"},"type":"array","title":"Outputs"}},"type":"object","required":["input_kind","inputs","outputs"],"title":"ProjectIoSchema"},"ProjectIoParameterResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProjectIoParameter"}}}}
```

## The StackAIAPIDataResponse\_ProviderActionResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ProviderActionResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ProviderActionResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ProviderActionResponseV2]"},"ProviderActionResponseV2":{"properties":{"action_id":{"type":"string","title":"Action Id"},"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"deprecated":{"type":"boolean","title":"Deprecated","default":false},"deprecation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Message"},"input_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionInputParameterV2"},"type":"array","title":"Input Parameters"},"output_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionOutputParameterV2"},"type":"array","title":"Output Parameters"}},"type":"object","required":["action_id","provider_id","name","description"],"title":"ProviderActionResponse","description":"A provider action on the public v2 catalog, with its input and output parameters.\n\nServes the action-detail endpoint only. The parameters come from the provider cache — the\nsame snapshot as the rest of the catalog — not from a live registry crawl: the cache already\ncarries each action's flattened parameter metadata, so detail is a pure cache read. Output\nparameters are one level deep (nested object shapes surface as `type: \"object\"` without\ntheir sub-fields), which the cached representation does not expand."},"ProviderActionInputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"default":{"title":"Default"},"options":{"items":{"$ref":"#/components/schemas/ProviderActionParameterOptionV2"},"type":"array","title":"Options"},"has_dynamic_options":{"type":"boolean","title":"Has Dynamic Options","default":false},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"minimum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionInputParameter","description":"One input parameter of an action; `name` is the key used in the run `inputs` map."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."},"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."},"ProviderActionOutputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionOutputParameter","description":"One output parameter of an action."}}}}
```

## The StackAIAPIDataResponse\_ProviderResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ProviderResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ProviderResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ProviderResponseV2]"},"ProviderResponseV2":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon_url":{"type":"string","title":"Icon Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"action_count":{"type":"integer","title":"Action Count","default":0},"trigger_count":{"type":"integer","title":"Trigger Count","default":0},"deprecation":{"anyOf":[{"$ref":"#/components/schemas/ProviderDeprecationV2"},{"type":"null"}]}},"type":"object","required":["provider_id","name","description","icon_url"],"title":"ProviderResponse","description":"An integration provider on the public v2 catalog. Serves both list and detail."},"ProviderDeprecationV2":{"properties":{"removal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Removal Date"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["removal_date","instructions"],"title":"ProviderDeprecation","description":"Deprecation metadata for a provider on the public v2 surface."}}}}
```

## The StackAIAPIDataResponse\_ProviderTriggerResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ProviderTriggerResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ProviderTriggerResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ProviderTriggerResponseV2]"},"ProviderTriggerResponseV2":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"},"provider_id":{"type":"string","title":"Provider Id"},"trigger_type":{"$ref":"#/components/schemas/TriggerTypeV2"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"input_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionInputParameterV2"},"type":"array","title":"Input Parameters"},"output_parameters":{"items":{"$ref":"#/components/schemas/ProviderActionOutputParameterV2"},"type":"array","title":"Output Parameters"}},"type":"object","required":["trigger_id","provider_id","trigger_type","name","description"],"title":"ProviderTriggerResponse","description":"A provider trigger on the public v2 catalog, with its cached parameters."},"TriggerTypeV2":{"type":"string","enum":["polling","webhook","scheduled"],"title":"TriggerTypeV2","description":"The trigger types exposed by the public Providers catalog."},"ProviderActionInputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"default":{"title":"Default"},"options":{"items":{"$ref":"#/components/schemas/ProviderActionParameterOptionV2"},"type":"array","title":"Options"},"has_dynamic_options":{"type":"boolean","title":"Has Dynamic Options","default":false},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"minimum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionInputParameter","description":"One input parameter of an action; `name` is the key used in the run `inputs` map."},"ProviderActionParameterTypeV2":{"type":"string","enum":["string","number","integer","float","boolean","select","secret","secret_multiline","file","binary_file","files","knowledge_base","browser_navigation_replay","browser_navigation_session","connection","textline","textarea","multiple_select","string_array","number_array","date","time","datetime","percentage_slider","object","array","object_array","dict","dict_array","code","expression","file_picker","unknown"],"title":"ProviderActionParameterTypeV2","description":"The public parameter type.\n\nA StackAI-owned copy of the platform's parameter types, kept deliberately decoupled from the\ninternal engine enum (`stackflow`'s `ToolParameterType`) so the public contract does not\nshift when that internal enum changes. An internal type this copy does not list degrades to\n`UNKNOWN` rather than breaking the response."},"ProviderActionParameterOptionV2":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ProviderActionParameterOption","description":"A selectable value for a parameter with a fixed choice list."},"ProviderActionOutputParameterV2":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ProviderActionParameterTypeV2"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","type","label","description"],"title":"ProviderActionOutputParameter","description":"One output parameter of an action."}}}}
```

## The StackAIAPIDataResponse\_ResourceDownloadResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ResourceDownloadResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ResourceDownloadResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ResourceDownloadResponseV2]"},"ResourceDownloadResponseV2":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Signed URL for direct download; expires."},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["download_url","filename"],"title":"ResourceDownloadResponse","description":"A signed URL to download the original file."}}}}
```

## The StackAIAPIDataResponse\_ResourceUploadResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_ResourceUploadResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/ResourceUploadResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[ResourceUploadResponseV2]"},"ResourceUploadResponseV2":{"properties":{"message":{"type":"string","title":"Message"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"}},"type":"object","required":["message","resource_id"],"title":"ResourceUploadResponse","description":"Result of a file upload, including the resource ID for status polling."}}}}
```

## The StackAIAPIDataResponse\_RunProviderActionResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_RunProviderActionResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/RunProviderActionResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[RunProviderActionResponseV2]"},"RunProviderActionResponseV2":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"RunProviderActionResponse","description":"The result of running a provider action, keyed by the action's own output parameter names."}}}}
```

## The StackAIAPIDataResponse\_RunResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_RunResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/RunResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[RunResponseV2]"},"RunResponseV2":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the run."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project the run executed. Null for legacy runs."},"project_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Version","description":"Project version used for this run: -1 for a draft execution, a non-negative integer for a numbered version, or null when the version could not be determined."},"status":{"$ref":"#/components/schemas/RunStatusV2","description":"Lifecycle status of the run."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure message. Null when the run did not fail."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was recorded."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started. Null when unknown or not yet started."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished. Null when unknown or not yet finished."},"run_type":{"anyOf":[{"$ref":"#/components/schemas/RunTypeV2"},{"type":"null"}],"description":"How the run was started. Null when not recorded."},"created_by":{"anyOf":[{"$ref":"#/components/schemas/RunCreatedByV2"},{"type":"null"}],"description":"Principal that started the run. Null when not recorded."},"usage":{"$ref":"#/components/schemas/RunUsageV2","description":"Token usage for the run."},"parent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Run Id","description":"Run that started this one. Null unless this is a sub-workflow run."},"parent_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Project Id","description":"Project of the parent run. Null unless this is a sub-workflow run."},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input","description":"Inputs the run was started with."},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"Outputs the run produced."},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunCitationV2"},"type":"array"},{"type":"null"}],"title":"Citations","description":"Sources cited by the run. Null when the run recorded none."},"pending_input":{"anyOf":[{"$ref":"#/components/schemas/RunPendingInputV2"},{"type":"null"}],"description":"Ask-human input for a paused run. Null unless the caller can both read and resume it."}},"additionalProperties":false,"type":"object","required":["run_id","project_id","status","error","created_at","started_at","completed_at","run_type","created_by","usage","parent_run_id","parent_project_id","input","output","citations","pending_input"],"title":"RunResponse","description":"A run with its input, output, citations, and token usage."},"RunStatusV2":{"type":"string","enum":["queued","running","paused","succeeded","failed","cancelled"],"title":"RunStatusV2","description":"Lifecycle status exposed by the Runs v2 API."},"RunTypeV2":{"type":"string","enum":["workflow_builder","form","batch","chat_assistant","agent_assistant","trigger","scheduled","sub_workflow","api","eval","unknown"],"title":"RunTypeV2","description":"How the run was started. Unrecognized types appear as `unknown`."},"RunCreatedByV2":{"properties":{"type":{"$ref":"#/components/schemas/RunCreatedByTypeV2","description":"Kind of principal that started the run."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID of the principal identified by `type`: the user ID for `user` and `personal_api_key`, the organization ID for `org_api_key`, the end-user ID for `end_user`. Null if no ID is available."}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"RunCreatedBy","description":"Who or what started the run."},"RunCreatedByTypeV2":{"type":"string","enum":["user","personal_api_key","org_api_key","system","end_user","unknown"],"title":"RunCreatedByTypeV2","description":"Type of user, API key, or system that started the run."},"RunUsageV2":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens","description":"Tokens used across every model call in the run."},"details":{"items":{"$ref":"#/components/schemas/RunUsageDetailV2"},"type":"array","title":"Details","description":"Usage aggregated per model and connection; models may appear more than once."}},"additionalProperties":false,"type":"object","required":["total_tokens","details"],"title":"RunUsage","description":"Total and per-model token usage for a run."},"RunUsageDetailV2":{"properties":{"provider":{"type":"string","title":"Provider","description":"Stable lowercase identifier of the model provider, e.g. `openai`."},"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model the provider was called with."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"ID of the connection used for the model calls. Null if no connection ID is available."},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Tokens sent to the model. Null when the provider reported only a total."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Tokens returned by the model. Null when the provider reported only a total."}},"additionalProperties":false,"type":"object","required":["provider","model_id","connection_id","input_tokens","output_tokens"],"title":"RunUsageDetail","description":"Token usage for one provider, model, and connection."},"RunCitationV2":{"properties":{"knowledge_base_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Knowledge Base Id","description":"Knowledge base the cited source belongs to, if any."},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id","description":"Knowledge base resource that was cited, if any."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"External link to the cited source, if available."},"source_type":{"$ref":"#/components/schemas/RunCitationSourceTypeV2","description":"Kind of source that was cited."},"position":{"anyOf":[{"$ref":"#/components/schemas/RunCitationPositionV2"},{"type":"null"}],"description":"Where in the source the cited chunk sits. Null when not recorded."}},"additionalProperties":false,"type":"object","required":["knowledge_base_id","resource_id","source_url","source_type","position"],"title":"RunCitation","description":"Source cited by a run."},"RunCitationSourceTypeV2":{"type":"string","enum":["knowledge_base","website","document","other"],"title":"RunCitationSourceTypeV2","description":"Type of source cited by the run."},"RunCitationPositionV2":{"properties":{"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index","description":"Zero-based page the chunk was read from, if recorded."},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Zero-based index of the chunk within the source, if recorded."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page number as printed in the source, if known."}},"additionalProperties":false,"type":"object","required":["page_index","chunk_index","page_number"],"title":"RunCitationPosition","description":"Position of a citation within its source."},"RunPendingInputV2":{"properties":{"question":{"type":"string","title":"Question","description":"Question shown to the human responder."},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Additional context, if supplied."},"response_type":{"$ref":"#/components/schemas/RunPauseResponseTypeV2","description":"Expected answer kind."},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices","description":"Ordered choices, when supplied."},"resume_token":{"type":"string","title":"Resume Token","description":"Secret token authorizing this pause's resume."},"resume_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resume Token Expires At","description":"When the resume token expires; this is not the pause timeout."}},"additionalProperties":false,"type":"object","required":["question","context","response_type","choices","resume_token","resume_token_expires_at"],"title":"RunPendingInput","description":"Ask-human input awaiting a response from a caller who may run the project."},"RunPauseResponseTypeV2":{"type":"string","enum":["text","approval","choice","unknown"],"title":"RunPauseResponseTypeV2","description":"Kind of answer requested by a paused ask-human step."}}}}
```

## The StackAIAPIDataResponse\_SkillResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_SkillResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/SkillResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[SkillResponseV2]"},"SkillResponseV2":{"properties":{"skill_id":{"type":"string","format":"uuid","title":"Skill Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"version":{"type":"integer","title":"Version"},"is_builtin":{"type":"boolean","title":"Is Builtin"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_by_org":{"$ref":"#/components/schemas/SkillOrganizationResponseV2"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"instructions":{"type":"string","title":"Instructions"},"frontmatter":{"additionalProperties":true,"type":"object","title":"Frontmatter"},"files":{"items":{"$ref":"#/components/schemas/SkillFileResponseV2"},"type":"array","title":"Files"}},"type":"object","required":["skill_id","name","description","version","is_builtin","actions","created_by_user_profile","created_by_org","created_at","updated_at","instructions"],"title":"SkillResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillOrganizationResponseV2":{"properties":{"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["org_id","org_name"],"title":"SkillOrganizationResponse"},"SkillFileResponseV2":{"properties":{"path":{"type":"string","title":"Path"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","content_type","size"],"title":"SkillFileResponse"}}}}
```

## The StackAIAPIDataResponse\_SkillVersionResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_SkillVersionResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/SkillVersionResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[SkillVersionResponseV2]"},"SkillVersionResponseV2":{"properties":{"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"created_by_user_profile":{"anyOf":[{"$ref":"#/components/schemas/SkillCreatorResponseV2"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"instructions":{"type":"string","title":"Instructions"},"frontmatter":{"additionalProperties":true,"type":"object","title":"Frontmatter"},"actions":{"items":{"type":"string"},"type":"array","title":"Actions"},"files":{"items":{"$ref":"#/components/schemas/SkillFileResponseV2"},"type":"array","title":"Files"}},"type":"object","required":["version","description","created_by_user_profile","created_at","instructions"],"title":"SkillVersionResponse"},"SkillCreatorResponseV2":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"SkillCreatorResponse"},"SkillFileResponseV2":{"properties":{"path":{"type":"string","title":"Path"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","content_type","size"],"title":"SkillFileResponse"}}}}
```

## The StackAIAPIDataResponse\_WebhookSubscriptionWithSecretResponseV2\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_WebhookSubscriptionWithSecretResponseV2_":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"$ref":"#/components/schemas/WebhookSubscriptionWithSecretResponseV2","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[WebhookSubscriptionWithSecretResponseV2]"},"WebhookSubscriptionWithSecretResponseV2":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array","title":"Event Types"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"secret":{"type":"string","title":"Secret","description":"The signing secret for verifying deliveries. Shown only in this response and never retrievable afterwards; store it now, or delete the subscription and create a new one to get another secret."}},"type":"object","required":["subscription_id","url","event_types","created_at","secret"],"title":"WebhookSubscriptionWithSecretResponse","description":"A freshly created subscription, carrying its one-time signing secret."},"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The StackAIAPIDataResponse\_list\_EvalDatasetRowResponseV2\_\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_list_EvalDatasetRowResponseV2__":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvalDatasetRowResponseV2"},"type":"array","title":"Data","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[list[EvalDatasetRowResponseV2]]"},"EvalDatasetRowResponseV2":{"properties":{"dataset_row_id":{"type":"string","format":"uuid","title":"Dataset Row Id"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"url":{"type":"string","title":"Url"},"position":{"type":"integer","title":"Position"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"expected_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Output"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["dataset_row_id","dataset_id","url","position","inputs","expected_output","source_run_id","created_by","updated_by","created_at","updated_at"],"title":"EvalDatasetRow"}}}}
```

## The StackAIAPIDataResponse\_list\_EvaluatorPreviewResponseV2\_\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_list_EvaluatorPreviewResponseV2__":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvaluatorPreviewResponseV2"},"type":"array","title":"Data","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[list[EvaluatorPreviewResponseV2]]"},"EvaluatorPreviewResponseV2":{"properties":{"score_kind":{"$ref":"#/components/schemas/EvalScoreKind"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"choice_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Choice Label"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"status":{"$ref":"#/components/schemas/EvalScoreStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["score_kind","score","choice_label","feedback","status","error"],"title":"EvaluatorPreview"},"EvalScoreKind":{"type":"string","enum":["numeric","boolean"],"title":"EvalScoreKind","description":"Drives aggregate rendering: mean for numeric, pass-rate for boolean."},"EvalScoreStatus":{"type":"string","enum":["pending","scoring","scored","failed"],"title":"EvalScoreStatus","description":"Judge/rule outcome for a score row; pending/scoring are the monitor queue states."}}}}
```

## The StackAIAPIDataResponse\_list\_EvaluatorTemplateResponseV2\_\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_list_EvaluatorTemplateResponseV2__":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/EvaluatorTemplateResponseV2"},"type":"array","title":"Data","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[list[EvaluatorTemplateResponseV2]]"},"EvaluatorTemplateResponseV2":{"properties":{"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"evaluator_type":{"$ref":"#/components/schemas/EvaluatorType"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["template_id","name","evaluator_type","config"],"title":"EvaluatorTemplate"},"EvaluatorType":{"type":"string","enum":["llm_judge","builtin_rule"],"title":"EvaluatorType","description":"How an evaluator scores: LLM judge or built-in rule."}}}}
```

## The StackAIAPIDataResponse\_list\_KnowledgeBaseQueryResultV2\_\_ object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIDataResponse_list_KnowledgeBaseQueryResultV2__":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"data":{"items":{"$ref":"#/components/schemas/KnowledgeBaseQueryResultV2"},"type":"array","title":"Data","description":"Data returned by the API service"}},"type":"object","required":["data"],"title":"StackAIAPIDataResponse[list[KnowledgeBaseQueryResultV2]]"},"KnowledgeBaseQueryResultV2":{"properties":{"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score","default":0},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"}},"type":"object","required":["content","resource_id"],"title":"KnowledgeBaseQueryResult","description":"A single retrieved result on the public v2 surface."}}}}
```

## The StackAIAPIError object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIError":{"properties":{"message":{"type":"string","title":"Message","description":"Message describing the error"}},"type":"object","required":["message"],"title":"StackAIAPIError","description":"Error detail model."}}}}
```

## The StackAIAPIErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIErrorResponse":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"errors":{"items":{"$ref":"#/components/schemas/StackAIAPIError"},"type":"array","title":"Errors","description":"List of errors"},"detail":{"items":{"type":"string"},"type":"array","title":"Detail","description":"Human-readable error messages. Use the HTTP status and error metadata to decide how to handle the failure.","readOnly":true}},"type":"object","required":["detail"],"title":"StackAIAPIErrorResponse","description":"Error response model with status code and error list."},"StackAIAPIError":{"properties":{"message":{"type":"string","title":"Message","description":"Message describing the error"}},"type":"object","required":["message"],"title":"StackAIAPIError","description":"Error detail model."}}}}
```

## The StackAIAPIResponse object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackAIAPIResponse":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}}},"type":"object","title":"StackAIAPIResponse","description":"Base response model for StackAI API endpoints.\n\nProvides Pydantic validation and serialization with a helper method\nto convert to FastAPI's JSONResponse when needed.\n\nSerialization contract: `status_code` never reaches the body (it only feeds\n`to_json_response`), and `response_code`/`meta` are omitted when unset so\nsuccess bodies carry no filler. Error handlers that set them keep them."}}}}
```

## The StackFileStatusEnum object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StackFileStatusEnum":{"type":"string","enum":["resource","parsed","indexed","pending","pending_delete","deleted","error"],"title":"StackFileStatusEnum","description":"Processing status of a file in a knowledge base."}}}}
```

## The StringListOption object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StringListOption":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"color":{"$ref":"#/components/schemas/StringListOptionColor","default":"gray"},"order":{"type":"integer","maximum":10000000,"minimum":0,"title":"Order","default":0}},"type":"object","required":["label"],"title":"StringListOption"},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The StringListOptionColor object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The StringListProperty object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StringListProperty":{"properties":{"type":{"type":"string","const":"string_list","title":"Type","default":"string_list"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"options":{"items":{"$ref":"#/components/schemas/StringListOption"},"type":"array","title":"Options"}},"type":"object","title":"StringListProperty","description":"A property that contains a list of strings. Can be used to store tags as well."},"StringListOption":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"color":{"$ref":"#/components/schemas/StringListOptionColor","default":"gray"},"order":{"type":"integer","maximum":10000000,"minimum":0,"title":"Order","default":0}},"type":"object","required":["label"],"title":"StringListOption"},"StringListOptionColor":{"type":"string","enum":["red","green","blue","yellow","purple","gray"],"title":"StringListOptionColor","description":"Store the different colors that can be used for the string list options."}}}}
```

## The StringProperty object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StringProperty":{"properties":{"type":{"type":"string","const":"string","title":"Type","default":"string"},"description":{"type":"string","maxLength":1024,"title":"Description","default":""},"order":{"type":"integer","minimum":0,"title":"Order","description":"Display order of this property within the schema.","default":0},"subtype":{"$ref":"#/components/schemas/StringSubtypeEnum","default":"plain"}},"type":"object","title":"StringProperty"},"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"}}}}
```

## The StringSubtypeEnum object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"StringSubtypeEnum":{"type":"string","enum":["plain","email","url","phone","file_path"],"title":"StringSubtypeEnum"}}}}
```

## The TriggerTypeV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"TriggerTypeV2":{"type":"string","enum":["polling","webhook","scheduled"],"title":"TriggerTypeV2","description":"The trigger types exposed by the public Providers catalog."}}}}
```

## The UpdateKnowledgeBaseRequest object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"UpdateKnowledgeBaseRequest":{"properties":{"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled","default":false},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseIndexingParamsRequest"},{"type":"null"}]},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"UpdateKnowledgeBaseRequest","description":"Updates to apply to an existing knowledge base."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseIndexingParamsRequest":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/CreateKnowledgeBaseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","title":"KnowledgeBaseIndexingParamsRequest","description":"Parameters that control how documents are indexed into a knowledge base."},"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The UpdateKnowledgeBaseRequestV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"UpdateKnowledgeBaseRequestV2":{"properties":{"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"connection_source_ids":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Connection Source Ids"},"website_sources":{"items":{"$ref":"#/components/schemas/SelectedWebsiteSource"},"type":"array","title":"Website Sources"},"source_file_authorization_enabled":{"type":"boolean","title":"Source File Authorization Enabled","default":false},"name":{"type":"string","maxLength":2048,"minLength":1,"title":"Name","default":"Unnamed Knowledge Base"},"description":{"type":"string","maxLength":2048,"title":"Description","default":""},"indexing_params":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseIndexingParamsRequest"},{"type":"null"}]},"org_level_role":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseRole"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"UpdateKnowledgeBaseRequest","description":"Updates to apply to an existing knowledge base."},"SelectedWebsiteSource":{"properties":{"source_type":{"$ref":"#/components/schemas/SelectedWebsiteSourceType","default":"sitemap"},"original_search_term":{"type":"string","title":"Original Search Term"},"selected_resources":{"items":{"type":"string"},"type":"array","title":"Selected Resources"}},"type":"object","required":["original_search_term","selected_resources"],"title":"SelectedWebsiteSource","description":"A set of pages selected for indexing from a website source."},"SelectedWebsiteSourceType":{"type":"string","enum":["sitemap","manual"],"title":"SelectedWebsiteSourceType","description":"The type of website source."},"KnowledgeBaseIndexingParamsRequest":{"properties":{"ocr":{"type":"boolean","title":"Ocr","default":false},"embedding_params":{"$ref":"#/components/schemas/CreateKnowledgeBaseEmbeddingParams"},"chunker_params":{"$ref":"#/components/schemas/KnowledgeBaseChunkerParams"}},"type":"object","title":"KnowledgeBaseIndexingParamsRequest","description":"Parameters that control how documents are indexed into a knowledge base."},"CreateKnowledgeBaseEmbeddingParams":{"properties":{"embedding_model":{"type":"string","title":"Embedding Model","default":"openai.text-embedding-3-small"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"additionalProperties":false,"type":"object","title":"CreateKnowledgeBaseEmbeddingParams","description":"Embedding configuration for a new knowledge base."},"KnowledgeBaseChunkerParams":{"properties":{"chunk_size":{"type":"integer","minimum":1,"title":"Chunk Size","default":1500},"chunk_overlap":{"type":"integer","minimum":0,"title":"Chunk Overlap","default":500},"chunker_type":{"$ref":"#/components/schemas/ChunkerType","default":"sentence"}},"type":"object","title":"KnowledgeBaseChunkerParams","description":"Chunking strategy for splitting documents during indexing."},"ChunkerType":{"type":"string","enum":["naive","sentence"],"title":"ChunkerType"},"KnowledgeBaseRole":{"type":"string","enum":["viewer","editor","admin"],"title":"KnowledgeBaseRole","description":"A user's role within a knowledge base.\n\nOrdered by privilege for Python comparisons. All four ordering operators are\ndefined explicitly because StrEnum subclasses str: its inherited lexicographic\ncomparisons would otherwise apply, so e.g. ``max()`` would pick ``\"viewer\"``\nover ``\"admin\"``. The operators only order Python objects; Postgres enum\nordering is governed by the declaration order above."}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## The WebhookEventType object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The WebhookSubscriptionResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"WebhookSubscriptionResponseV2":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array","title":"Event Types"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["subscription_id","url","event_types","created_at"],"title":"WebhookSubscriptionResponse","description":"A webhook subscription on the public v2 surface.\n\nNo `status` field: the surface only ever returns active subscriptions, so the value\ncould never vary."},"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The WebhookSubscriptionWithSecretResponseV2 object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"WebhookSubscriptionWithSecretResponseV2":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array","title":"Event Types"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"secret":{"type":"string","title":"Secret","description":"The signing secret for verifying deliveries. Shown only in this response and never retrievable afterwards; store it now, or delete the subscription and create a new one to get another secret."}},"type":"object","required":["subscription_id","url","event_types","created_at","secret"],"title":"WebhookSubscriptionWithSecretResponse","description":"A freshly created subscription, carrying its one-time signing secret."},"WebhookEventType":{"type":"string","enum":["run.started","run.step.succeeded","run.step.failed","run.succeeded","run.failed","run.cancelled"],"title":"WebhookEventType","description":"Event types a subscription may register for; producers emit these (runs producer lands separately)."}}}}
```

## The WorkflowState object

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"components":{"schemas":{"WorkflowState":{"type":"string","enum":["PENDING","RUNNING","PAUSED","RESUMED","COMPLETED","FAILED","CANCELLED"],"title":"WorkflowState","description":"Enum representing the possible states of a workflow."}}}}
```


---

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

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-api/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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

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