{"openapi":"3.1.0","info":{"title":"Fastino API","description":"Fastino API for datasets, fine-tuning, evaluation, and inference.","version":"2.0.0"},"paths":{"/v1/feature-flags":{"get":{"tags":["feature-flags"],"summary":"Get Feature Flags","description":"Return resolved feature flags for the requesting user.\n\nUses ``FlexibleAuth`` (not ``get_current_user_with_client``) because the\nJWT path inside ``_authenticate_with_jwt`` resolves the billing team and\ncalls ``set_session_team_scope`` — required for per-team Datadog targeting\nrules to take effect on this evaluation.\n\nReturns:\n    ``FeatureFlagsResponse`` with each flag's resolved boolean value.","operationId":"get_feature_flags_v1_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}}}}},"/v1/users/me/data-export":{"post":{"tags":["users"],"summary":"Create User Data Export","description":"Kick off a GDPR Subject Access Request (SAR) export for the caller.\n\nEnqueues a background worker that zips the caller's personal data into\nthe user-exports S3 bucket. One non-expired export per user per 24h; a\nrequest inside that window returns 429 with ``Retry-After`` set from\nthe existing job.\n\nArgs:\n    auth: Authenticated user context.\n\nReturns:\n    202 Accepted with the job id and initial ``pending`` status.\n\nRaises:\n    HTTPException: 429 inside the 24h rate-limit window; 500 on failure.","operationId":"create_user_data_export_v1_users_me_data_export_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataExportResponse"}}}}}}},"/v1/users/me/data-export/{job_id}":{"get":{"tags":["users"],"summary":"Get User Data Export","description":"Return the current state of ``job_id`` for the authenticated user.\n\n``job_id`` is typed :class:`~uuid.UUID` so FastAPI answers 422 at the\nboundary; raw text would instead reach a Postgres ``uuid`` comparison\nand surface as a driver conversion error (HTTP 500).\n\nArgs:\n    job_id: UUID of the export job to poll.\n    auth: Authenticated user context.\n\nReturns:\n    The job's lifecycle state plus (when ``ready``) a presigned URL\n    minted on this poll, so a repeated poll never sees a stale\n    signature. Its lifetime is far shorter than the archive's 24h\n    retention — see ``DOWNLOAD_URL_TTL_SECONDS``.\n\nRaises:\n    HTTPException: 404 when ``job_id`` is unknown or another user's\n        (collapsed to avoid leaking existence); 500 on failure.","operationId":"get_user_data_export_v1_users_me_data_export__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me/weights-deletion-request":{"post":{"tags":["users"],"summary":"Create Weights Deletion Request","description":"Record a request to delete weights trained on the caller's data.\n\n201 rather than 202: nothing is queued and nothing runs later. The request\nis recorded and decided in the same call, and the response body carries\nthe written basis — which is the Art. 12(4) reply, not a receipt for one.\n\nArgs:\n    body: The request, with an optional explanatory note.\n    auth: Authenticated user context.\n\nReturns:\n    201 Created with the recorded request and its decision.\n\nRaises:\n    HTTPException: 500 if the request could not be recorded.","operationId":"create_weights_deletion_request_v1_users_me_weights_deletion_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWeightsDeletionRequestBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightsDeletionRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/register-web":{"post":{"tags":["users"],"summary":"Register User","description":"Register the caller's Google OAuth connection.\n\nArgs:\n    http_request: Incoming request.\n    request: Registration payload.\n    auth: Authenticated caller.\n    service: User service.\n\nReturns:\n    Registration response.\n\nRaises:\n    HTTPException: If captcha, token, encryption, or identity validation fails.","operationId":"register_user_v1_register_web_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me":{"get":{"tags":["users"],"summary":"Get User Profile","description":"Get the caller's profile.\n\nArgs:\n    auth: Authenticated caller.\n    service: User service.\n\nReturns:\n    User profile.","operationId":"get_user_profile_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}}}},"patch":{"tags":["users"],"summary":"Update User Profile","description":"Update the caller's profile.\n\nArgs:\n    request: Profile update payload.\n    auth: Authenticated caller.\n    service: User service.\n\nReturns:\n    Update confirmation.","operationId":"update_user_profile_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me/active-team":{"post":{"tags":["users"],"summary":"Set Active Team Endpoint","description":"Switch the caller's active team.\n\nArgs:\n    request: Target team payload.\n    auth: Authenticated caller.\n    service: User service.\n\nReturns:\n    Activated team.\n\nRaises:\n    HTTPException: If membership is revoked.","operationId":"set_active_team_endpoint_v1_users_me_active_team_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetActiveTeamRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me/attribution":{"post":{"tags":["users"],"summary":"Record Signup Attribution","description":"Record first-touch signup attribution.\n\nArgs:\n    request: Attribution payload.\n    auth: Authenticated caller.\n    service: User service.\n\nReturns:\n    Attribution result.","operationId":"record_signup_attribution_v1_users_me_attribution_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAttributionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAttributionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/delete_user_account":{"post":{"tags":["users"],"summary":"Delete User Account","description":"Delete the caller's account.\n\nArgs:\n    auth: Authenticated caller.\n    service: User service.\n    request: Optional feedback and ownership transfers.\n\nReturns:\n    Deletion confirmation.\n\nRaises:\n    HTTPException: If deletion is blocked or fails.","operationId":"delete_user_account_v1_delete_user_account_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeleteAccountRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/support/contact":{"post":{"tags":["support"],"summary":"Submit Support Request","description":"Forward an in-app support request to Intercom as a conversation.\n\nArgs:\n    request: FastAPI request (required by the rate limiter).\n    body: The submitted support form fields.\n    auth: Authenticated caller; ``auth.email`` resolves (or creates) the\n        submitter's Intercom contact so the conversation is attributed\n        to them.\n\nReturns:\n    A success envelope once the Intercom conversation has been created.","operationId":"submit_support_request_v1_support_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/check-domain-limit":{"post":{"tags":["domain-limit"],"summary":"Check Domain Limit","description":"Check whether admitting an address would break the domain signup rules.\n\nIn order: an excluded domain bans, an included domain admits, an existing\naccount for the submitted address admits, else members are counted against\nSIGNUP_DOMAIN_LIMIT. That third rule makes an over-cap domain answer\nwhether the address has an account; the IP rate limit is what bounds it.\n\nArgs:\n    request: Incoming request, required by the rate limiter.\n    body: Submitted address, as a full ``email`` or a bare ``domain``.\n\nReturns:\n    Whether another signup is allowed, and whether the domain is banned.\n\nRaises:\n    HTTPException: 400 if the domain is empty or malformed.","operationId":"check_domain_limit_v1_auth_check_domain_limit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainLimitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/auth/check-email-canonical":{"post":{"tags":["domain-limit"],"summary":"Check Email Canonical","description":"Check whether a Gmail address is a dot-trick duplicate of another account.\n\nOnly meaningful for ``@gmail.com`` / ``@googlemail.com``; every other\ndomain answers ``duplicate: false``, as does the submitter's own address\n— a returning user is not their own duplicate. The unauthenticated route\nis IP-rate-limited.\n\nArgs:\n    request: Incoming request, required by the rate limiter.\n    body: Full address submitted at signup.\n\nReturns:\n    Whether a different address canonicalises to the submitted one.","operationId":"check_email_canonical_v1_auth_check_email_canonical_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCanonicalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCanonicalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/auth/report-blocked-domain":{"post":{"tags":["domain-limit"],"summary":"Report Blocked Domain","description":"Reject the retired in-app blocked-domain appeal.\n\nThe path is kept rather than deleted because it is *unauthenticated* --\nanything on the internet could be calling it, so a 404 would read as a\nmistyped URL rather than a withdrawal. Unlike its two live siblings this\nhandler takes no body and carries no rate limit: it raises before doing\nany work, and a 429 would tell a caller to retry something that will\nnever succeed again.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"report_blocked_domain_auth_report_blocked_domain_post","responses":{"410":{"description":"In-app blocked-domain reporting is retired.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"}},"type":"object","required":["detail"]}}}}},"deprecated":true,"security":[]}},"/v1/create-api-key":{"post":{"tags":["api-keys"],"summary":"Create Api Key","description":"Create a new API key for the authenticated user.\n\nOnly JWT-authenticated (browser session) requests are permitted — API key\ncreation via an existing API key is blocked to prevent credential chaining.\n\nNothing here waits on Stripe — see\n:func:`_schedule_stripe_customer_backfill`.\n\nArgs:\n    request: The incoming FastAPI request (used by SlowAPI rate limiter).\n    body: The API key creation request payload.\n    auth: The authenticated user context.\n\nReturns:\n    CreateAPIKeyResponse with the secret key (shown only once).\n\nRaises:\n    HTTPException: 403 if called via API key or the active team's key cap\n        is zero, 409 if the cap is already reached or the name is taken,\n        500 for unexpected failures.","operationId":"create_api_key_v1_create_api_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/delete-api-key":{"delete":{"tags":["api-keys"],"summary":"Delete Api Key","description":"Delete an API key belonging to the caller's active team.\n\nKeys are team-bound and shared, but managing them is gated by the team\nrole matrix: only members holding ``CREATE_API_KEYS`` (owner, admin,\neditor) may delete a team key. Viewer and billing members are rejected\nwith 403.","operationId":"delete_api_key_v1_delete_api_key_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAPIKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/list-api-keys":{"get":{"tags":["api-keys"],"summary":"List Api Keys","description":"List all API keys for the caller's active team with usage statistics.\n\nKeys are team-bound and shared, so every member sees the same set. Does\nnot return the actual key values.","operationId":"list_api_keys_v1_list_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAPIKeysResponse"}}}}}}},"/v1/teams/{team_id}/mcp/access-mode":{"get":{"tags":["mcp-access"],"summary":"Read Access Mode","description":"Return the team's MCP access mode, the caller's manage rights, and the endpoint URL.","operationId":"read_access_mode_v1_teams__team_id__mcp_access_mode_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPAccessModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["mcp-access"],"summary":"Update Access Mode","description":"Set the team's MCP access mode. Requires ``MANAGE_TEAM``.","operationId":"update_access_mode_v1_teams__team_id__mcp_access_mode_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMCPAccessModeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPAccessModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/mcp/bindings":{"get":{"tags":["mcp-access"],"summary":"List Team Bindings","description":"List pending and active MCP client bindings for the team.","operationId":"list_team_bindings_v1_teams__team_id__mcp_bindings_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMCPBindingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/mcp/bindings/{binding_id}/confirm":{"post":{"tags":["mcp-access"],"summary":"Confirm Team Binding","description":"Confirm a pending binding under the team's access mode.","operationId":"confirm_team_binding_v1_teams__team_id__mcp_bindings__binding_id__confirm_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPBindingInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/mcp/bindings/{binding_id}/revoke":{"post":{"tags":["mcp-access"],"summary":"Revoke Team Binding","description":"Revoke a binding (requesting member or a ``MANAGE_TEAM`` human).","operationId":"revoke_team_binding_v1_teams__team_id__mcp_bindings__binding_id__revoke_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPBindingInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/billing-status":{"get":{"tags":["billing"],"summary":"Get Billing Status","description":"Get billing status for the authenticated user.\n\nReturns:\n    - The authoritative spendable credit balance and admission result\n    - Whether user has a payment method on file\n    - Stripe customer ID\n    - List of payment methods","operationId":"get_billing_status_v1_billing_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}}}},"/v1/billing/usage-history":{"post":{"tags":["billing"],"summary":"Get Usage History","description":"Get usage history for the authenticated user.\n\nArgs:\n    request: Optional start_date and end_date filters\n    auth: Authenticated user context\n\nReturns:\n    Usage summary with detailed request history","operationId":"get_usage_history_v1_billing_usage_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/remove-payment-method":{"delete":{"tags":["billing"],"summary":"Remove Payment Method","description":"Cancel the user's active subscription and remove the stored payment method.\n\nThis endpoint is retained for frontend compatibility, but its behavior is\nsubscription-centric:\n1. Cancels the user's active Stripe subscription immediately\n2. Downgrades the user to the Hobby plan in Supabase\n3. Removes the stored card from the Stripe customer\n\nArgs:\n    request: Active subscription payment method ID shown in the UI\n    auth: Authenticated user context\n\nReturns:\n    Success status with cancellation message","operationId":"remove_payment_method_v1_billing_remove_payment_method_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePaymentMethodRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/requests-by-model":{"get":{"tags":["billing","billing"],"summary":"Get Billing Usage Requests By Model","description":"Return full-range request usage grouped by model.\n\nArgs:\n    start_date: Optional inclusive lower bound on request creation time.\n    end_date: Optional inclusive upper bound on request creation time.\n    full_history: Whether to ignore ``start_date`` and begin at first usage.\n    auth: Authenticated caller context.\n\nReturns:\n    Aggregated usage rows grouped by model.\n\nRaises:\n    HTTPException: If date parameters are invalid or usage cannot be loaded.","operationId":"get_billing_usage_requests_by_model_v1_billing_usage_requests_by_model_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: created_at >= (ISO); ignored when full_history=true","title":"Start Date"},"description":"Filter: created_at >= (ISO); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: created_at <= (ISO); with full_history, caps the window","title":"End Date"},"description":"Filter: created_at <= (ISO); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, from first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, from first request through end (or now); ignores start_date"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRequestModelSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/timeseries":{"get":{"tags":["billing"],"summary":"Get Billing Usage Timeseries","description":"Aggregated credits from ``requests`` for the settings usage chart.","operationId":"get_billing_usage_timeseries_v1_billing_usage_timeseries_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, span from the team's first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, span from the team's first request through end (or now); ignores start_date"},{"name":"interval_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":1,"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count.","default":1440,"title":"Interval Minutes"},"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count."},{"name":"scope","in":"query","required":false,"schema":{"enum":["team","personal"],"type":"string","description":"``team`` (default) aggregates the active team's usage; ``personal`` narrows to the requesting user's own usage (home page toggle).","default":"team","title":"Scope"},"description":"``team`` (default) aggregates the active team's usage; ``personal`` narrows to the requesting user's own usage (home page toggle)."},{"name":"workload_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds","title":"Workload Type"},"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/timeseries-by-model":{"get":{"tags":["billing"],"summary":"Get Billing Usage Timeseries By Model","description":"Per-model request counts for stacked bar charts.","operationId":"get_billing_usage_timeseries_by_model_v1_billing_usage_timeseries_by_model_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, span from the team's first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, span from the team's first request through end (or now); ignores start_date"},{"name":"interval_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":1,"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count.","default":1440,"title":"Interval Minutes"},"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count."},{"name":"scope","in":"query","required":false,"schema":{"enum":["team","personal"],"type":"string","description":"``team`` (default) aggregates the active team's usage; ``personal`` narrows to the requesting user's own usage (home page toggle).","default":"team","title":"Scope"},"description":"``team`` (default) aggregates the active team's usage; ``personal`` narrows to the requesting user's own usage (home page toggle)."},{"name":"workload_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds","title":"Workload Type"},"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUsageTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/timeseries-latency":{"get":{"tags":["billing"],"summary":"Get Billing Usage Timeseries Latency","description":"Average response latency bucketed by time interval.","operationId":"get_billing_usage_timeseries_latency_v1_billing_usage_timeseries_latency_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, span from the team's first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, span from the team's first request through end (or now); ignores start_date"},{"name":"interval_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":1,"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count.","default":1440,"title":"Interval Minutes"},"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatencyTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/timeseries-latency-by-model":{"get":{"tags":["billing"],"summary":"Get Billing Usage Timeseries Latency By Model","description":"Per-model average latency bucketed by time interval.","operationId":"get_billing_usage_timeseries_latency_by_model_v1_billing_usage_timeseries_latency_by_model_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, span from the team's first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, span from the team's first request through end (or now); ignores start_date"},{"name":"interval_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":1,"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count.","default":1440,"title":"Interval Minutes"},"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelLatencyTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/timeseries-tokens":{"get":{"tags":["billing"],"summary":"Get Billing Usage Timeseries Tokens","description":"Token volume (input + output) bucketed by time interval.","operationId":"get_billing_usage_timeseries_tokens_v1_billing_usage_timeseries_tokens_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, span from the team's first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, span from the team's first request through end (or now); ignores start_date"},{"name":"interval_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":1,"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count.","default":1440,"title":"Interval Minutes"},"description":"Bucket width in minutes (default 1440 = daily). Values >= 10080 bucket by week and >= 43200 by month so long ranges stay bounded in point count."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenVolumeTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage/requests":{"get":{"tags":["billing"],"summary":"Get Billing Usage Requests","description":"Paginated request rows for the settings usage table.","operationId":"get_billing_usage_requests_v1_billing_usage_requests_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page","default":1,"title":"Page"},"description":"1-based page"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size (max 100)","default":25,"title":"Page Size"},"description":"Page size (max 100)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: created_at >= (ISO); ignored when full_history=true","title":"Start Date"},"description":"Filter: created_at >= (ISO); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: created_at <= (ISO); with full_history, caps the window","title":"End Date"},"description":"Filter: created_at <= (ISO); with full_history, caps the window"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, from first request through end (or now); ignores start_date","default":false,"title":"Full History"},"description":"If true, from first request through end (or now); ignores start_date"},{"name":"workload_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds","title":"Workload Type"},"description":"Filter: exact billable kind, e.g. model_inference. Omit for all kinds"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRequestsPageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/ledger/balance":{"get":{"tags":["billing"],"summary":"Get Ledger Balance","description":"Return the active team's exact balance and wallet composition.\n\nThe total is exact — the latest monthly snapshot plus every entry since.\nThe composition comes from the aggregator's cache, so it can be staler;\n``composition_drift`` is the gap, and a non-zero value means a client must\nnot present the split as authoritative.\n\nArgs:\n    auth: Authenticated caller; the active billing team is read from scope.\n\nReturns:\n    Exact balance, its provenance, and the grant/purchased split.","operationId":"get_ledger_balance_v1_billing_ledger_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerBalanceResponse"}}}}}}},"/v1/billing/ledger/breakdown":{"get":{"tags":["billing"],"summary":"Get Ledger Breakdown","description":"Return the active team's usage spend, grouped as requested.\n\nReads ``billing_ledger`` alone, so grouping never joins to ``requests`` and\nagent spend can carry no prompt content (ENG-4722). Usage entries only:\ntop-ups, grants and adjustments are wallet movements rather than work, and\nare what ``/balance`` accounts for.\n\nArgs:\n    start: Inclusive lower bound on entry time.\n    end: Exclusive upper bound on entry time.\n    auth: Authenticated caller; the active billing team is read from scope.\n    dimension: Grouping dimensions; at least one, or supply a grain.\n    grain: Optional UTC day/month bucketing.\n    project_id: Optional project filter.\n    experiment_id: Optional experiment filter.\n\nReturns:\n    One row per group, largest spend first.\n\nRaises:\n    HTTPException: 422 when the window is invalid or no grouping is given.","operationId":"get_ledger_breakdown_v1_billing_ledger_breakdown_get","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Inclusive lower bound on entry time (ISO, tz-aware)","title":"Start"},"description":"Inclusive lower bound on entry time (ISO, tz-aware)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Exclusive upper bound on entry time (ISO, tz-aware)","title":"End"},"description":"Exclusive upper bound on entry time (ISO, tz-aware)"},{"name":"dimension","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["category","model","provider","project","experiment"],"type":"string"}},{"type":"null"}],"description":"Repeatable: category, model, provider, project, experiment","title":"Dimension"},"description":"Repeatable: category, model, provider, project, experiment"},{"name":"grain","in":"query","required":false,"schema":{"anyOf":[{"enum":["day","month"],"type":"string"},{"type":"null"}],"description":"Bucket by UTC day or month","title":"Grain"},"description":"Bucket by UTC day or month"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one project","title":"Project Id"},"description":"Restrict to one project"},{"name":"experiment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one experiment","title":"Experiment Id"},"description":"Restrict to one experiment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerBreakdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/charge-history":{"get":{"tags":["billing"],"summary":"List charge history for a team","description":"Return recent Stripe charge and invoice metadata for the team.\n\nRaises:\n    HTTPException: When billing history is unavailable or access is denied.","operationId":"get_charge_history_v1_billing_team__team_id__charge_history_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/invoices/{invoice_id}/link":{"post":{"tags":["billing"],"summary":"Create an authorized Stripe invoice link for a team invoice","description":"Return a fresh Stripe Hosted Invoice Page URL after billing authorization.\n\nRaises:\n    HTTPException: When the invoice link is unavailable or access is denied.","operationId":"create_team_invoice_link_v1_billing_team__team_id__invoices__invoice_id__link_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/overage-settings":{"get":{"tags":["billing"],"summary":"Get team overage settings","description":"Return current overage billing configuration after billing authorization.","operationId":"get_overage_settings_v1_billing_team__team_id__overage_settings_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverageSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["billing"],"summary":"Update team overage settings","description":"Update overage billing configuration. Requires MANAGE_BILLING.\n\nAuto-refill is how a team keeps its wallet funded, so no plan tier decides\nwhether it may be enabled — a team on ``free`` is the one most likely to run\ndry, and refusing it here is what invariant 14 of the prepaid ledger design\nforbids (\"the ability to spend depends only on funds, limits, and payment\nhealth\"). Whether a refill can actually be charged is a payment-method\nquestion, answered by Stripe at charge time, not a subscription question.\n\nArgs:\n    team_id: Team whose settings are being updated.\n    request: Fields to change; unset fields are left alone.\n    auth: Caller identity; must hold MANAGE_BILLING on the team.\n\nReturns:\n    The team's settings after the update.\n\nRaises:\n    HTTPException: 403 without MANAGE_BILLING on the team; 404 if the team\n        does not exist; 400 for any validation failure below — an invalid\n        ``topup_mode``, a reset-window change the plan disallows, a null or\n        invalid ``usage_reset_hour`` / ``usage_reset_timezone``, or a request\n        that sets no fields.","operationId":"update_overage_settings_v1_billing_team__team_id__overage_settings_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOverageSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverageSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/check-topup":{"post":{"tags":["billing"],"summary":"Force a threshold top-up check","description":"Manually trigger the overage threshold check after billing authorization.","operationId":"check_topup_v1_billing_team__team_id__check_topup_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Topup V1 Billing Team  Team Id  Check Topup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team-billing-status/{team_id}":{"get":{"tags":["billing"],"summary":"Get Team Billing Status","description":"Get billing status for a team (limited info for team members).\n\nThis endpoint allows team members to see that the team owner has billing\nconfigured, without exposing sensitive billing details.\n\nArgs:\n    team_id: Team UUID\n    auth: Authenticated user context\n\nReturns:\n    - Team name\n    - Owner name\n    - Whether owner has a payment method configured","operationId":"get_team_billing_status_v1_billing_team_billing_status__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/full-status":{"get":{"tags":["billing"],"summary":"Get Team Full Billing Status","description":"Get full billing status for a team (for billing/admin/owner roles).\n\nThis endpoint returns comprehensive billing information including payment\nmethods and their display-only billing details.\n\nRequires: MANAGE_BILLING permission (owner, admin, or billing role)\n\nArgs:\n    team_id: Team UUID\n    auth: Authenticated user context\n\nReturns:\n    Full team billing status including payment methods","operationId":"get_team_full_billing_status_v1_billing_team__team_id__full_status_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBillingFullStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/remove-payment-method":{"delete":{"tags":["billing"],"summary":"Remove Team Payment Method","description":"Remove the team's payment method and downgrade to Hobby plan.\n\nRequires: MANAGE_BILLING permission (owner, admin, or billing role)\n\nThis endpoint:\n1. Cancels any active Stripe subscriptions for the team\n2. Downgrades the team to the Hobby plan\n3. Removes the stored card from the Stripe customer\n\nArgs:\n    team_id: Team UUID\n    request: Payment method ID to remove\n    auth: Authenticated user context\n\nReturns:\n    Success status with message","operationId":"remove_team_payment_method_v1_billing_team__team_id__remove_payment_method_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveTeamPaymentMethodRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/recheck-billing":{"post":{"tags":["billing"],"summary":"Recheck Team Billing","description":"Re-derive a team's billing-cache columns from live Stripe state.\n\nManual replacement for the deleted reconcile/backfill jobs: refreshes\n``card_verified`` and ``card_fingerprint`` so the read-time inference gate\nsees current Stripe data, and repairs a bricked verified-without-fingerprint\nrow. Off the inference request path; requires MANAGE_BILLING.\n\nRaises:\n    HTTPException: 403 when the caller lacks MANAGE_BILLING; 500 on\n        unexpected failure.","operationId":"recheck_team_billing_v1_billing_team__team_id__recheck_billing_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecheckBillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/usage":{"get":{"tags":["billing"],"summary":"Get Team Member Usage","description":"Get per-member usage breakdown for a date range.\n\nRequires ``MANAGE_BILLING`` — owner, admin, and billing roles all qualify.\nUsage is scoped to requests billed to this team. Defaults to the current\nUTC month when no range is given.\n\nReturns per-member usage including:\n- User email and name\n- Total credits used in the range\n- Request count in the range\n\nArgs:\n    team_id: Team UUID\n    start_date: Optional ISO range start; defaults to the current UTC month\n    end_date: Optional ISO range end; defaults to now\n    full_history: When true, include every request ever billed to the team\n    auth: Authenticated user context\n\nReturns:\n    Team usage breakdown by member","operationId":"get_team_member_usage_v1_billing_team__team_id__usage_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true","title":"Start Date"},"description":"Range start (ISO date or datetime, UTC); ignored when full_history=true"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Range end (ISO date or datetime, UTC); defaults to now","title":"End Date"},"description":"Range end (ISO date or datetime, UTC); defaults to now"},{"name":"full_history","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include all requests ever billed to the team; ignores start_date","default":false,"title":"Full History"},"description":"If true, include all requests ever billed to the team; ignores start_date"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/billing-portal":{"post":{"tags":["billing"],"summary":"Create Billing Portal Session","description":"Create a Stripe Billing Portal session for a team.\n\nAllows users with billing permissions to manage their subscription,\npayment methods, and invoices through Stripe's hosted portal.\n\nArgs:\n    team_id: Team UUID.\n    return_url: URL to redirect the user back to after the portal.\n    auth: Authenticated user context.\n\nReturns:\n    BillingPortalResponse with the portal URL.\n\nRaises:\n    HTTPException: 403 if not a member or lacks permission,\n        400 if return_url is untrusted or no Stripe customer exists.","operationId":"create_billing_portal_session_v1_billing_team__team_id__billing_portal_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"return_url","in":"query","required":true,"schema":{"type":"string","description":"URL to redirect to after the portal session","title":"Return Url"},"description":"URL to redirect to after the portal session"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/initialize-timezone":{"post":{"tags":["billing"],"summary":"Set default timezone for a team that has never configured one","description":"Idempotently set usage_reset_timezone when it has never been configured.","operationId":"initialize_team_timezone_v1_billing_team__team_id__initialize_timezone_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeTimezoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/purchase-credits":{"post":{"tags":["billing"],"summary":"Charge the saved card for credits, or start Stripe Checkout","description":"Charge the saved card, or start Checkout when that is not possible.\n\nTeams with a default payment method are charged in place and credits are\ngranted here. Teams without a usable card, or whose bank requires a 3DS\nchallenge, still go through hosted Checkout; the\n``checkout.session.completed`` webhook applies those credits.\n\nArgs:\n    request: Raw request, required by the rate limiter.\n    team_id: Team the credits are bought for.\n    body: Purchase amount, attempt id, and the Checkout return URLs.\n    auth: Caller identity; payment enforcement is off because this route is\n        how a team with no funds acquires them.\n\nReturns:\n    ``checkout_url`` set when the buyer must finish on Stripe; ``None``\n    when the saved card was charged and credits are already on the balance.\n\nRaises:\n    HTTPException: 403 without MANAGE_BILLING; 400 when a Stripe customer\n        cannot be resolved; 402 when the saved card is declined; 500 when\n        payment succeeded but the grant failed; 502 or 503 when Stripe\n        cannot start a session.","operationId":"purchase_credits_v1_billing_team__team_id__purchase_credits_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseCreditsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/spend-limits":{"get":{"tags":["billing"],"summary":"Get the team spend cap","description":"Return the team-wide spend cap. Unset when no row exists. Any member may read.\n\nArgs:\n    team_id: Billed team.\n    auth: Caller.\n\nReturns:\n    Configured cap, or ``configured=false``.","operationId":"get_team_spend_limit_v1_billing_team__team_id__spend_limits_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["billing"],"summary":"Set the team spend cap","description":"Create or replace the team-wide spend cap. Requires MANAGE_BILLING.\n\nArgs:\n    team_id: Billed team.\n    request: Window and cap.\n    auth: Caller.\n\nReturns:\n    The stored cap.","operationId":"put_team_spend_limit_v1_billing_team__team_id__spend_limits_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertSpendLimitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing"],"summary":"Clear the team spend cap","description":"Remove the team-wide spend cap. Idempotent. Requires MANAGE_BILLING.\n\nArgs:\n    team_id: Billed team.\n    auth: Caller.\n\nReturns:\n    Unset response.","operationId":"delete_team_spend_limit_v1_billing_team__team_id__spend_limits_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/team/{team_id}/projects/{project_id}/spend-limits":{"get":{"tags":["billing"],"summary":"Get a project spend cap","description":"Return the project spend cap. Unset when no row exists. Any member may read.\n\nArgs:\n    team_id: Billed team.\n    project_id: Project on that team.\n    auth: Caller.\n\nReturns:\n    Configured cap, or ``configured=false``.\n\nRaises:\n    HTTPException: 404 when the project is missing, deleted, or not on the team.","operationId":"get_project_spend_limit_v1_billing_team__team_id__projects__project_id__spend_limits_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["billing"],"summary":"Set a project spend cap","description":"Create or replace the project spend cap. Requires MANAGE_BILLING.\n\nArgs:\n    team_id: Billed team.\n    project_id: Project on that team.\n    request: Window and cap.\n    auth: Caller.\n\nReturns:\n    The stored cap.\n\nRaises:\n    HTTPException: 404 when the project is missing, deleted, or not on the team.","operationId":"put_project_spend_limit_v1_billing_team__team_id__projects__project_id__spend_limits_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertSpendLimitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing"],"summary":"Clear a project spend cap","description":"Remove the project spend cap. Idempotent. Requires MANAGE_BILLING.\n\nArgs:\n    team_id: Billed team.\n    project_id: Project on that team.\n    auth: Caller.\n\nReturns:\n    Unset response.\n\nRaises:\n    HTTPException: 404 when the project is missing, deleted, or not on the team.","operationId":"delete_project_spend_limit_v1_billing_team__team_id__projects__project_id__spend_limits_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/stripe-webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nVerifies the Stripe signature, deduplicates by event id, and routes the\nevent to its billing-lifecycle handler. Unprotected (no auth) but\nsignature-verified.\n\nEvents handled: checkout.session.completed, invoice.paid,\ninvoice_payment.paid, invoice.payment_failed,\npayment_method.attached / .detached, charge.refunded,\ncharge.dispute.created / .closed, refund.updated / .created,\ncustomer.deleted, radar.early_fraud_warning.created.\n\n``invoice.paid`` and ``invoice_payment.paid`` share ``_handle_invoice_paid``:\nStripe emits both for a single payment on the pinned API version. They\ncarry different event ids, so the ledger's event-id key does not dedupe\none against the other -- ``record_refill_topup`` instead nominates\n``invoice.paid`` as the only delivery that writes money, and the sibling\nreturns having written nothing. The event-id key is what makes a\n*redelivery of the same event* safe.\n\n``invoice.payment_failed`` carries the terminal dunning signal as well as\nthe retryable ones, and is the only route that suspends for non-payment. Stripe\nemits no explicit \"collection is over\" event -- reaching ``uncollectible``\nalways takes an operator or an Automation, neither of which exists here -- so\nexhaustion is read as a failed attempt carrying no ``next_payment_attempt``\non an invoice still ``open``. If Billing Automations are ever enabled that\nfield moves to ``invoice.updated`` and this design must be revisited; that\ncaveat is a guardrail, not a reason to read the noisier event today. See\n``services.billing.retry_exhaustion``.\n\nArgs:\n    request: Inbound FastAPI request carrying the raw Stripe payload.\n    stripe_signature: Value of the ``stripe-signature`` header.\n\nReturns:\n    ``{\"status\": \"success\"}`` once the event is processed.\n\nRaises:\n    HTTPException: 500 when the webhook secret is unconfigured or\n        processing fails; 400 for an invalid signature.","operationId":"stripe_webhook_billing_stripe_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Stripe Webhook Billing Stripe Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/gliner-2":{"post":{"tags":["gliner"],"summary":"Gliner2 Process","description":"Process text using GLiNER-2 base model via InferenceService.\n\n``task`` is optional — when omitted the unified schema path is used.\nLegacy task names are still accepted but deprecated.","operationId":"gliner2_process_v1_gliner_2_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlinerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlinerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gliner-2/async":{"post":{"tags":["gliner"],"summary":"Gliner2 Async","description":"Submit large GLiNER-2 request for async processing.\n\nUse this endpoint when processing >1M tokens that would exceed\nthe 30-second timeout. Returns immediately with a job_id.\nPoll GET /gliner-2/jobs/{job_id} to retrieve results.\n\nArgs:\n    request: AsyncGlinerRequest with task, text, schema\n    http_request: FastAPI request object\n    auth: Authentication result\n\nReturns:\n    202 Accepted with job_id for polling","operationId":"gliner2_async_v1_gliner_2_async_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncGlinerRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncGlinerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gliner-2/jobs/{job_id}":{"get":{"tags":["gliner"],"summary":"Gliner2 Job Status","description":"Get status and result of an async GLiNER-2 job.\n\nReturns:\n- 200 with status=\"complete\" and result when done\n- 200 with status=\"processing\" while in progress\n- 200 with status=\"error\" and error message if failed\n- 404 if job not found or belongs to different user\n\nArgs:\n    job_id: UUID of the job to check\n    auth: Authentication result\n\nReturns:\n    GlinerJobStatus with current status and result if complete","operationId":"gliner2_job_status_v1_gliner_2_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlinerJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/baseline-models":{"get":{"tags":["models"],"summary":"List Baseline Models","description":"List model IDs available for suite-run comparisons.","operationId":"list_baseline_models_v1_baseline_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Baseline Models V1 Baseline Models Get"}}}}}}},"/v1/constraints/ner":{"post":{"tags":["constraints"],"summary":"Generate Ner Constraints Endpoint","description":"Generate constraints for NER tasks.\n\nArgs:\n    request: Labels and optional domain description for the NER task.\n    auth: Authenticated caller.\n\nReturns:\n    Generated constraints with an estimated token usage figure.\n\nRaises:\n    HTTPException: 500 when constraint generation fails.","operationId":"generate_ner_constraints_endpoint_v1_constraints_ner_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateNERConstraintsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateConstraintsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/constraints/classification":{"post":{"tags":["constraints"],"summary":"Generate Classification Constraints Endpoint","description":"Generate constraints for classification tasks.\n\nArgs:\n    request: Labels and optional domain description for the task.\n    auth: Authenticated caller.\n\nReturns:\n    Generated constraints with an estimated token usage figure.\n\nRaises:\n    HTTPException: 500 when constraint generation fails.","operationId":"generate_classification_constraints_endpoint_v1_constraints_classification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateClassificationConstraintsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateConstraintsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/constraints/records":{"post":{"tags":["constraints"],"summary":"Generate Records Constraints Endpoint","description":"Generate constraints for records/custom tasks.\n\nArgs:\n    request: Field definitions and optional domain description.\n    auth: Authenticated caller.\n\nReturns:\n    Generated constraints with an estimated token usage figure.\n\nRaises:\n    HTTPException: 500 when constraint generation fails.","operationId":"generate_records_constraints_endpoint_v1_constraints_records_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRecordsConstraintsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateConstraintsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/constraints/expand":{"post":{"tags":["constraints"],"summary":"Expand Constraint Choices Endpoint","description":"Expand the choice list for a single constraint.\n\nArgs:\n    request: Constraint to expand, target count, and task description.\n    auth: Authenticated caller.\n\nReturns:\n    The updated constraint with its expanded choices and token usage.\n\nRaises:\n    HTTPException: 503 for transient upstream failures, 500 otherwise.","operationId":"expand_constraint_choices_endpoint_v1_constraints_expand_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandConstraintChoicesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandConstraintChoicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-editing/scan-pii":{"post":{"tags":["data-editing"],"summary":"Scan For Pii","description":"Scan dataset columns for Personally Identifiable Information (PII).\n\nUses GLiNER for entity extraction to detect names, emails, phone numbers, etc.\n\nArgs:\n    request.dataset_name: Dataset name.\n    request.version: Optional version number. Returns latest if omitted.","operationId":"scan_for_pii_v1_data_editing_scan_pii_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-editing/scan-phd":{"post":{"tags":["data-editing"],"summary":"Scan For Phd","description":"Scan dataset columns for Prompt Hack/Injection attempts (PHD).\n\nUses specialized model to detect prompt injection attempts.\n\nArgs:\n    request.dataset_name: Dataset name.\n    request.version: Optional version number. Returns latest if omitted.","operationId":"scan_for_phd_v1_data_editing_scan_phd_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-editing/remove-pii":{"post":{"tags":["data-editing"],"summary":"Remove Pii","description":"Remove or redact PII from the dataset based on scan findings.\n\nCreates a new dataset version with the redacted data.","operationId":"remove_pii_v1_data_editing_remove_pii_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingRemoveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingRemoveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-editing/subsample":{"post":{"tags":["data-editing"],"summary":"Subsample Dataset","description":"Create a subsample of the dataset using random or balanced sampling.\n\nCreates a new dataset version with the subsampled data.","operationId":"subsample_dataset_v1_data_editing_subsample_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingSubsampleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingSubsampleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/data-editing/check-labels":{"post":{"tags":["data-editing"],"summary":"Check Labels","description":"Use AI to verify label quality by checking if labels match the text content.\n\nArgs:\n    request: Label check request with dataset name, columns, and sample size.\n    auth: Authenticated user.\n\nReturns:\n    Label check results with per-row assessments.\n\nRaises:\n    HTTPException: 404 if dataset not found, 400 for invalid columns,\n        504 if upstream LLM provider times out.","operationId":"check_labels_v1_data_editing_check_labels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingCheckLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEditingCheckLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/analyze":{"post":{"tags":["dataset-analysis"],"summary":"Analyze Dataset","description":"Analyze a dataset for quality, distribution, and potential issues.\n\nSupports NER, Classification, and Generative task types. Available\nanalyses: distribution, duplicates, outliers, correlation, splits,\nerrors, and diversity (Vendi score + embedding visualisation).\n\nProvide data inline via ``dataset`` or reference a stored dataset\nwith ``dataset_name``.  See ``DatasetAnalysisRequest`` schema for\nthe full set of options including diversity visualisation config.","operationId":"analyze_dataset_v1_dataset_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/outliers/dismiss":{"post":{"tags":["dataset-analysis"],"summary":"Dismiss Outlier","description":"Dismiss an outlier so it no longer appears in analysis results.\n\nAppends the content fingerprint to the ``dismissed_outliers`` JSONB\narray on the dataset row. On subsequent analysis runs the fingerprint\nis matched and the outlier is filtered out of the response.","operationId":"dismiss_outlier_v1_dataset_outliers_dismiss_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissOutlierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissOutlierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/analyze_llm":{"post":{"tags":["dataset-analysis"],"summary":"Analyze Dataset Llm","description":"Run LLM-based dataset quality analysis.\n\nThis endpoint performs the slow (~8s) LLM-based diversity and quality\nanalysis separately from the fast statistical analysis endpoint.\n\nUse ``/felix/dataset/analyze`` for fast statistical metrics (distribution,\nduplicates, outliers, vendi score, visualization). Use this endpoint when\nyou need the LLM's reasoning about dataset quality and reducibility.\n\nProvide data inline via ``dataset`` or reference a stored dataset\nwith ``dataset_name``.","operationId":"analyze_dataset_llm_v1_dataset_analyze_llm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLLMAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DiversityLLMAnalysis"},{"type":"null"}],"title":"Response Analyze Dataset Llm V1 Dataset Analyze Llm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/augment":{"post":{"tags":["dataset-analysis"],"summary":"Augment Dataset","description":"Augment a dataset by removing duplicates/outliers and generating synthetic samples.\n\nThis endpoint creates a NEW dataset with the augmentations applied.\nOperations include:\n- **remove_duplicates**: Remove exact duplicate samples.\n- **remove_outliers**: Remove samples with anomalous lengths.\n- **balance**: Generate synthetic samples for underrepresented classes/entities.\n\nThe original dataset is preserved.","operationId":"augment_dataset_v1_dataset_augment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetAugmentationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetAugmentationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/query":{"post":{"tags":["dataset-analysis"],"summary":"Query Dataset","description":"Execute Polars code on a dataset server-side.\n\nThe code runs in a sandboxed environment with access to:\n- `df`: Polars DataFrame containing the dataset\n- `pl`: Polars module for expressions\n\nAssign the result to a `result` variable to return it.\n**Multiline code is fully supported** — use intermediate variables, comments, etc.\n\n**Security**: Only allowlisted Polars DataFrame/Expression methods are\npermitted. Control-flow (for/while/if-stmt), comprehensions, f-strings,\nstr.format, printf-style %-formatting (e.g. '%d' % x), imports, eval/exec,\nand dunder access are all blocked.\n\n**Examples**::\n\n    result = df.head(10)\n\n    filtered = df.filter(pl.col('score') > 0.5)\n    grouped = filtered.group_by('label').agg([\n        pl.col('score').mean().alias('avg_score'),\n        pl.col('score').count().alias('count')\n    ])\n    result = grouped.sort('avg_score', descending=True)","operationId":"query_dataset_v1_dataset_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate":{"post":{"tags":["generate"],"summary":"Create Generation Job","description":"Create an async dataset generation job.\n\nReturns immediately with a ``job_id``. Poll ``GET /generate/jobs/{job_id}``\nfor status and results.\n\nThe ``task_type`` field in the request body determines what kind of dataset\nis generated:\n- ``ner``: Named-entity recognition dataset. Requires ``labels``.\n- ``classification``: Text classification dataset. Requires ``labels``.\n- ``custom``: Free-form prompt-based dataset. Requires ``prompt``.\n- ``decoder``: Instruction-tuning (chat format) dataset.\n  Requires ``domain_description``.\n\nDispatches via SQS with idempotency deduplication; falls back to an\nin-process background task if SQS is unavailable.\n\nArgs:\n    request: Incoming HTTP request (used by SlowAPI rate limiter).\n    generation_request: Unified generation parameters including task_type.\n    auth: Authenticated user context.\n    is_seed: Whether this is a small seed dataset for UI preview.\n    synthesis_session_id: Optional synthesis log session UUID for resume.\n\nReturns:\n    GenerateAsyncResponse with ``job_id`` for polling and initial status.\n\nRaises:\n    HTTPException: 422 if required task-specific fields are missing.","operationId":"create_generation_job_v1_generate_post","parameters":[{"name":"is_seed","in":"query","required":false,"schema":{"type":"boolean","description":"Whether this is a seed generation","default":false,"title":"Is Seed"},"description":"Whether this is a seed generation"},{"name":"synthesis_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Synthesis log session ID for resume support","title":"Synthesis Session Id"},"description":"Synthesis log session ID for resume support"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAsyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/jobs/{job_id}":{"get":{"tags":["generate"],"summary":"Get Generation Job Status","description":"Get the current status of an async generation job.\n\nReturns the current status and, when complete, the generated data.\n\nArgs:\n    job_id: The job/dataset UUID to query.\n    auth: Authenticated user context.\n\nReturns:\n    GenerateJobStatus with status and data when the job is 'ready'.\n\nRaises:\n    HTTPException: 400 if job_id is not a valid UUID.\n    HTTPException: 404 if the job is not found or not owned by this user.","operationId":"get_generation_job_status_v1_generate_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/ner/infer-labels":{"post":{"tags":["generate"],"summary":"Infer Ner Labels","description":"Infer NER entity types from a domain description.","operationId":"infer_ner_labels_v1_generate_ner_infer_labels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferNERLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/classification/infer-labels":{"post":{"tags":["generate"],"summary":"Infer Classification Labels","description":"Infer classification labels from a domain description.","operationId":"infer_classification_labels_v1_generate_classification_infer_labels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferClassificationLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/fields/infer-fields":{"post":{"tags":["generate"],"summary":"Infer Fields","description":"Infer input and output fields from a domain description.","operationId":"infer_fields_v1_generate_fields_infer_fields_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferFieldsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferFieldsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/improve-prompt":{"post":{"tags":["generate"],"summary":"Improve Prompt","description":"Improve a dataset generation prompt with AI-generated expansions.","operationId":"improve_prompt_v1_generate_improve_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovePromptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovePromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/infer-advanced":{"post":{"tags":["generate"],"summary":"Infer Advanced Options","description":"Infer constraints and multiplicator from a generation prompt.","operationId":"infer_advanced_options_v1_generate_infer_advanced_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferAdvancedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferAdvancedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/ner/label-existing":{"post":{"tags":["generate"],"summary":"Label Existing Ner","description":"Label existing texts for NER entity extraction.\n\nApplies the provided label set to a corpus of raw texts using the dataset generator.\n\nArgs:\n    request: NER labeling request with texts and label definitions.\n    auth: Authenticated user context.\n\nReturns:\n    GenerateResponse with labeled samples and optional dataset info.\n\nRaises:\n    HTTPException: 400 if no valid inputs or dataset validation fails.\n    HTTPException: 500 on labeling failure.","operationId":"label_existing_ner_v1_generate_ner_label_existing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelExistingNERRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/classification/label-existing":{"post":{"tags":["generate"],"summary":"Label Existing Classification","description":"Label existing texts for classification tasks.\n\nArgs:\n    request: Classification labeling request with texts and labels.\n    auth: Authenticated user context.\n\nReturns:\n    GenerateResponse with classified samples and optional dataset info.\n\nRaises:\n    HTTPException: 400 if no valid inputs or dataset validation fails.\n    HTTPException: 500 on labeling failure.","operationId":"label_existing_classification_v1_generate_classification_label_existing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelExistingClassificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/fields/label-existing":{"post":{"tags":["generate"],"summary":"Label Existing Fields","description":"Label existing data dictionaries with custom input/output field definitions.\n\nArgs:\n    request: Fields labeling request with input dicts and field schemas.\n    auth: Authenticated user context.\n\nReturns:\n    GenerateResponse with labeled samples and optional dataset info.\n\nRaises:\n    HTTPException: 400 on invalid field configuration, missing inputs, or dataset validation failure.\n    HTTPException: 500 on labeling failure.","operationId":"label_existing_fields_v1_generate_fields_label_existing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelExistingFieldsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/logs/{session_id}":{"get":{"tags":["logs"],"summary":"Stream Logs","description":"Stream logs for a generation session via Server-Sent Events","operationId":"stream_logs_v1_logs__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/live/team":{"get":{"tags":["live"],"summary":"Stream Team Events","description":"Stream the caller's team's row-created events.\n\nArgs:\n    auth: Authenticated caller, resolved by ``FlexibleAuth``.\n\nReturns:\n    A ``text/event-stream`` response.","operationId":"stream_team_events_v1_live_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/presets":{"get":{"tags":["presets"],"summary":"List Presets","description":"List all available presets for authenticated callers.","operationId":"list_presets_v1_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PresetMetadata"},"type":"array","title":"Response List Presets V1 Presets Get"}}}}}}},"/v1/presets/{preset_id}":{"get":{"tags":["presets"],"summary":"Get Preset","description":"Get a preset configuration for authenticated callers.","operationId":"get_preset_v1_presets__preset_id__get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs":{"post":{"tags":["training-jobs"],"summary":"Create Training Job","description":"Create a new training job.\n\nThe provider is resolved from the registry based on\n``(base_model, training_type)``.\n\nArgs:\n    request: Incoming FastAPI request (required by SlowAPI key function).\n    training_request: Training configuration with dataset references and base_model.\n    auth: Authenticated user context.","operationId":"create_training_job_v1_training_jobs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["training-jobs"],"summary":"List Training Jobs","description":"List training jobs for the authenticated user.\n\nSupports pagination via ``limit`` and ``offset`` query parameters.\nOptionally filter by status (requested, running, complete, deployed, errored).","operationId":"list_training_jobs_v1_training_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}":{"get":{"tags":["training-jobs"],"summary":"Get Training Job","description":"Get a training job by ID if it is visible to the caller's team.\n\nRead visibility matches the other ``training-jobs/{job_id}`` read routes\nthat already use ``_get_visible_job`` (logs, checkpoints, download): a\njob on a team-visible project, or a project-less shared job, is\nreturned even when the caller is not the creator. Mutating routes keep\ntheir own owner-scoped service calls.","operationId":"get_training_job_v1_training_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["training-jobs"],"summary":"Delete Training Job","description":"Delete a training job and associated checkpoints.","operationId":"delete_training_job_v1_training_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTrainingJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["training-jobs"],"summary":"Update Training Job","description":"Patch a training job. Currently exposes only ``project_id``.\n\nDelegates to :func:`services.projects.movement.assign_resource_to_project`\nwhich owns the visibility check, target-project gating, and the\nservice-role ``UPDATE``. Send ``project_id: null`` to unassign the job\nfrom its project.\n\nMovement is **label-only**: only ``training_jobs.project_id`` changes.\nDependent rows that carry their own ``project_id`` (``deployments``,\n``inferences``, ``project_evaluation_runs``) are intentionally not cascaded.\nCallers needing aggregate-model movement must update dependents\nexplicitly.","operationId":"update_training_job_v1_training_jobs__job_id__patch","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResourceProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/logs":{"get":{"tags":["training-jobs"],"summary":"Get Training Job Logs","description":"Get training output logs (stdout/stderr) for a specific job.","operationId":"get_training_job_logs_v1_training_jobs__job_id__logs_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/billing":{"get":{"tags":["training-jobs"],"summary":"Get Training Job Billing","description":"Get the billing outcome for a specific training job, by job ID.\n\nCloses the API gap in ENG-6131: reports whether a job was billed and,\nif so, for how much and how long, so a billing-correctness fix like\nENG-6068 can be verified live without direct database access. Read\nvisibility matches ``get_training_job`` and the other\n``training-jobs/{job_id}`` read routes.","operationId":"get_training_job_billing_v1_training_jobs__job_id__billing_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobBillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/sync":{"post":{"tags":["training-jobs"],"summary":"Sync Training Job Status","description":"Sync training job status from the provider to the database.","operationId":"sync_training_job_status_v1_training_jobs__job_id__sync_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/stop":{"post":{"tags":["training-jobs"],"summary":"Stop Training Job","description":"Stop a running training job.","operationId":"stop_training_job_v1_training_jobs__job_id__stop_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StopJobRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/terminate":{"post":{"tags":["training-jobs"],"summary":"Terminate Training Job","description":"Terminate a training job and delete all artifacts.\n\nStops the provider job if running, deletes all checkpoints, and marks\nthe job as terminated. This operation is irreversible.","operationId":"terminate_training_job_v1_training_jobs__job_id__terminate_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/checkpoints":{"get":{"tags":["training-jobs"],"summary":"List Training Job Checkpoints","description":"List all checkpoints for a training job visible to the caller's team.","operationId":"list_training_job_checkpoints_v1_training_jobs__job_id__checkpoints_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/checkpoints/{checkpoint_id}/deploy":{"post":{"tags":["training-jobs"],"summary":"Deploy Checkpoint To Mme","description":"Deploy a specific checkpoint to the Multi-Model Endpoint.","operationId":"deploy_checkpoint_to_mme_v1_training_jobs__job_id__checkpoints__checkpoint_id__deploy_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"checkpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Checkpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployCheckpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trained-models":{"get":{"tags":["training-jobs"],"summary":"List Trained Models","description":"List all completed/trained models for the authenticated user.\n\nArgs:\n    project_id: Optional project filter. When supplied, only models\n        assigned to that project are returned (still subject to the\n        caller's visibility scope). Used by the agent to keep model\n        discovery scoped to the user-selected project.","operationId":"list_trained_models_v1_trained_models_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/download":{"get":{"tags":["training-jobs"],"summary":"Get download URL for trained model","description":"Generate a presigned S3 URL to download a trained model.","operationId":"download_trained_model_v1_training_jobs__job_id__download_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/model-name":{"patch":{"tags":["training-jobs"],"summary":"Update Training Job Model Name","description":"Update the model_name for a training job.\n\nThin wrapper: visibility scoping, validation, the UPDATE, and the\nactivity-event side effect all live in\n:meth:`TrainingJobService.update_model_name`. The router only owns\nHTTP concerns (status codes, request/response shaping) per\n``brain/CLAUDE.md``.","operationId":"update_training_job_model_name_v1_training_jobs__job_id__model_name_patch","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelNameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/push-to-hub":{"post":{"tags":["training-jobs"],"summary":"Push Training Job To Huggingface","description":"Push a completed training job's model to HuggingFace Hub.\n\nArgs:\n    job_id: Training job UUID.\n    request: Target repo, token, and commit metadata.\n    auth: Authenticated caller admitted by the training-jobs rollout.\n\nReturns:\n    The hub push outcome.\n\nRaises:\n    HTTPException: 400/403/404/409/500 for validation, permission,\n        lookup, conflict, and upload failures.","operationId":"push_training_job_to_huggingface_v1_training_jobs__job_id__push_to_hub_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HuggingFacePushModelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushModelToHubResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines":{"get":{"tags":["training-pipelines"],"summary":"List Training Pipelines","description":"List multi-stage training pipelines for the authenticated user.","operationId":"list_training_pipelines_v1_training_pipelines_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["training-pipelines"],"summary":"Create Training Pipeline","description":"Create a pipeline root and dispatch its first stage.","operationId":"create_training_pipeline_v1_training_pipelines_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/estimate":{"post":{"tags":["training-pipelines"],"summary":"Estimate Training Pipeline","description":"Return a read-only estimate for a pipeline recipe.","operationId":"estimate_training_pipeline_v1_training_pipelines_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/pause":{"post":{"tags":["training-pipelines"],"summary":"Pause Training Pipeline","description":"Pause a pipeline after any active stage finishes.","operationId":"pause_training_pipeline_v1_training_pipelines__pipeline_id__pause_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/resume":{"post":{"tags":["training-pipelines"],"summary":"Resume Training Pipeline","description":"Resume a paused pipeline.","operationId":"resume_training_pipeline_v1_training_pipelines__pipeline_id__resume_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/cancel":{"post":{"tags":["training-pipelines"],"summary":"Cancel Training Pipeline","description":"Cancel a pipeline and stop the active provider stage.","operationId":"cancel_training_pipeline_v1_training_pipelines__pipeline_id__cancel_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/stages/{stage_index}/deploy":{"post":{"tags":["training-pipelines"],"summary":"Deploy Training Pipeline Stage","description":"Deploy an artifact-ready pipeline stage to its project.","operationId":"deploy_training_pipeline_stage_v1_training_pipelines__pipeline_id__stages__stage_index__deploy_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"stage_index","in":"path","required":true,"schema":{"type":"integer","title":"Stage Index"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineDeployStageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineDeploymentControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/rollback":{"post":{"tags":["training-pipelines"],"summary":"Rollback Training Pipeline","description":"Roll the pipeline project back to an existing deployment.","operationId":"rollback_training_pipeline_v1_training_pipelines__pipeline_id__rollback_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineRollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineDeploymentControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/branch":{"post":{"tags":["training-pipelines"],"summary":"Branch Training Pipeline","description":"Create a new pipeline branch from an artifact-ready stage.","operationId":"branch_training_pipeline_v1_training_pipelines__pipeline_id__branch_post","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineBranchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}":{"get":{"tags":["training-pipelines"],"summary":"Get Training Pipeline","description":"Return one pipeline root with stage progress and lineage.","operationId":"get_training_pipeline_v1_training_pipelines__pipeline_id__get","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-pipelines/{pipeline_id}/deployments":{"get":{"tags":["training-pipelines"],"summary":"Get Training Pipeline Deployments","description":"Return deployment history derived from pipeline stage rows.","operationId":"get_training_pipeline_deployments_v1_training_pipelines__pipeline_id__deployments_get","parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPipelineDeploymentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/activity":{"get":{"tags":["activity"],"summary":"List Activity","description":"List activity events for the authenticated user within their bound team.\n\nScoped to the caller *and* their credential's team: a user can belong to\nseveral teams, so filtering on the user alone discloses the other teams'\nproject and dataset names (ENG-7141). Paginated via limit/offset.\n\nArgs:\n    limit: Maximum number of activity events to return per page.\n    offset: Number of events to skip for pagination.\n    auth: Authentication result containing user and team context.\n\nReturns:\n    ActivityLogResponse containing activity events in reverse-chronological order.\n\nRaises:\n    HTTPException: 403 when no team is resolved for the caller, or 500 if the\n        activity log retrieval fails.","operationId":"list_activity_v1_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dataset/grow":{"post":{"tags":["dataset-analysis"],"summary":"Grow Dataset","description":"Grow an existing dataset by generating new synthetic examples.\n\nTakes an existing classification or NER dataset and generates additional\nexamples to reach the target size. Supports class balancing to ensure\nequal representation of each class.\n\nArgs:\n    request: Growth request with dataset ID, target size, and options.\n    auth: Authentication result with user ID and client.\n\nReturns:\n    GrowDatasetResponse with new dataset info and generation statistics.\n\nRaises:\n    HTTPException: If dataset not found, invalid type, or generation fails.","operationId":"grow_dataset_v1_dataset_grow_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowDatasetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowDatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/synthesis-log":{"post":{"tags":["synthesis-log"],"summary":"Create Log Entry","description":"Create a single synthesis log entry.\n\nArgs:\n    request: Log entry data.\n    auth: Authentication result.\n\nReturns:\n    The created SynthesisLogEntry.\n\nRaises:\n    HTTPException: If the entry could not be created.","operationId":"create_log_entry_v1_synthesis_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesisLogCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesisLogEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/synthesis-log/session/{session_id}":{"get":{"tags":["synthesis-log"],"summary":"Get Session","description":"Get all log entries for a synthesis session.\n\n``session_id`` is typed :class:`~uuid.UUID` so FastAPI answers 422 at the\nboundary. A raw string would otherwise reach a Postgres ``uuid`` comparison\nand surface as a driver conversion 500 (ENG-6017).\n\nArgs:\n    session_id: UUID of the synthesis session.\n    auth: Authentication result.\n\nReturns:\n    All entries for the session in chronological order.\n\nRaises:\n    HTTPException: If the query fails.","operationId":"get_session_v1_synthesis_log_session__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesisLogSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/synthesis-log/dataset/{dataset_id}":{"get":{"tags":["synthesis-log"],"summary":"Get Dataset History","description":"Get all synthesis log entries linked to a dataset.\n\nArgs:\n    dataset_id: UUID of the dataset.\n    auth: Authentication result.\n\nReturns:\n    All synthesis log entries for the dataset in chronological order.\n\nRaises:\n    HTTPException: If the query fails.","operationId":"get_dataset_history_v1_synthesis_log_dataset__dataset_id__get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesisLogDatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/synthesis-log/session/{session_id}/link":{"post":{"tags":["synthesis-log"],"summary":"Link Session To Dataset","description":"Link all entries in a synthesis session to a dataset.\n\nCalled after a synthesized dataset is created so the history is\naccessible from the dataset detail page.\n\nArgs:\n    session_id: UUID of the synthesis session.\n    request: Contains the dataset_id to link.\n    auth: Authentication result.\n\nReturns:\n    Success indicator.\n\nRaises:\n    HTTPException: If the link operation fails.","operationId":"link_session_to_dataset_v1_synthesis_log_session__session_id__link_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesisLogLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Link Session To Dataset V1 Synthesis Log Session  Session Id  Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/deployments":{"post":{"tags":["deployments"],"summary":"Deploy a model to a project","description":"Activate a model as the project's active model and record the swap.\n\nExactly one of ``training_job_id`` (a fine-tuned checkpoint) or\n``base_model`` (a stock HuggingFace base model) must be supplied in the\nrequest body; this is enforced by the ``DeploymentCreate`` schema.\n\nArgs:\n    project_id: ID of the project to update.\n    request: Deployment target (training job or base model) and optional\n        reason.\n    auth: Authenticated user.\n\nReturns:\n    DeploymentResponse with the new history record.\n\nRaises:\n    HTTPException: 400 if the supplied base model is not in the catalog;\n        403 if the user does not have access to the project; 404 if the\n        project or training job is not found; 409 if the training job\n        exists but is not deployable, or a seed-supported job has no\n        scored second-seed sibling.","operationId":"deploy_model_v1_projects__project_id__deployments_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["deployments"],"summary":"List deployment history for a project","description":"Return deployment history for a project, newest first.\n\nArgs:\n    project_id: ID of the project to query.\n    auth: Authenticated user.\n    limit: Maximum number of records to return (1-100, default 50).\n\nReturns:\n    DeploymentHistoryResponse with ordered deployment records.\n\nRaises:\n    HTTPException: 403 if the user does not have access to the project;\n        404 if the project is not found.","operationId":"list_deployments_v1_projects__project_id__deployments_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/deployments/{deployment_id}":{"get":{"tags":["deployments"],"summary":"Get a single deployment record","description":"Fetch a specific deployment history record.\n\nArgs:\n    project_id: Project the deployment belongs to.\n    deployment_id: Deployment record ID.\n    auth: Authenticated user.\n\nReturns:\n    DeploymentResponse for the record.\n\nRaises:\n    HTTPException: 403 if the user does not have access to the project;\n        404 if the deployment is not found for this project.","operationId":"get_deployment_v1_projects__project_id__deployments__deployment_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/deployments/{deployment_id}/rollback":{"post":{"tags":["deployments"],"summary":"Rollback to a previous deployment","description":"Re-deploy the model from a previous deployment record.\n\nThe rolled-back deployment may be either a training-job deployment or a\nbase-model deployment; this endpoint handles both shapes by mirroring\nwhichever target was set on the source record.\n\nArgs:\n    project_id: Project to roll back.\n    deployment_id: Deployment record whose target will be re-activated.\n    auth: Authenticated user.\n\nReturns:\n    DeploymentResponse for the new rollback deployment record.\n\nRaises:\n    HTTPException: 400 if the historical deployment targets a base model\n        that is no longer in the catalog; 403 if the user does not have\n        access to the project; 404 if the deployment record is not found\n        for this project; 409 if the historical training job is no longer\n        deployable.","operationId":"rollback_deployment_v1_projects__project_id__deployments__deployment_id__rollback_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/preview-deployments/{training_job_id}":{"get":{"tags":["preview-deployments"],"summary":"Get the preview status of one fine-tuned version","description":"Report whether one exact version can answer test requests right now.\n\nArgs:\n    project_id: Project the version belongs to.\n    training_job_id: The exact fine-tuned version.\n    auth: Authenticated caller.\n\nReturns:\n    The version's state, the caller's authority over it, and a poll hint.","operationId":"get_preview_status_v1_projects__project_id__preview_deployments__training_job_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"training_job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDeploymentResponse"}}}},"403":{"description":"The caller may not access this project."},"404":{"description":"The project or version does not exist."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/preview-deployments":{"post":{"tags":["preview-deployments"],"summary":"Make one fine-tuned version testable","description":"Prepare one exact version for testing without changing live routing.\n\nArgs:\n    project_id: Project the version belongs to.\n    request: The exact version to prepare.\n    auth: Authenticated caller.\n\nReturns:\n    The state to render now: already ready, already in flight, or newly\n    provisioning.","operationId":"activate_preview_v1_projects__project_id__preview_deployments_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDeploymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDeploymentResponse"}}}},"403":{"description":"The caller may not prepare this project's versions."},"404":{"description":"The project or version does not exist."},"409":{"description":"The version's artifact cannot serve requests, or it has failed activation too many times to retry."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/training-jobs/{job_id}/deployments":{"get":{"tags":["deprecated"],"summary":"[Deprecated] Get deployments for a training job -- use /projects/{project_id}/deployments","description":"Deprecated. Returns deployments that reference the given training job.\n\nArgs:\n    job_id: Training job ID.\n    auth: Authenticated user.\n\nReturns:\n    DeploymentHistoryResponse with deprecation headers.","operationId":"get_training_job_deployments_v1_training_jobs__job_id__deployments_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/felix/deployments/options":{"get":{"tags":["deprecated"],"summary":"[Removed] Deployment provider options","description":"Removed. Provider-based deployment options no longer exist.","operationId":"get_deployment_options_felix_deployments_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/felix/deployments":{"get":{"tags":["deprecated"],"summary":"[Removed] List deployments -- use GET /v1/projects/{project_id}/deployments","description":"Removed. Deployment history is read per project.","operationId":"list_deployments_felix_deployments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]},"post":{"tags":["deprecated"],"summary":"[Removed] Create a provider deployment -- use POST /v1/projects/{project_id}/deployments","description":"Removed. Provider-based deployment creation (Fastino/HuggingFace/Fireworks) no longer exists.\n\nThe new deployment model is a simple model-swap on a project.\nUse ``POST /v1/projects/{project_id}/deployments`` with ``{training_job_id, reason}`` instead.","operationId":"create_deployment_felix_deployments_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/felix/deployments/{deployment_id}":{"get":{"tags":["deprecated"],"summary":"[Removed] Get a deployment -- use GET /v1/projects/{project_id}/deployments","description":"Removed. Deployment records are read through their project.","operationId":"get_deployment_felix_deployments__deployment_id__get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]},"delete":{"tags":["deprecated"],"summary":"[Removed] Delete a deployment","description":"Removed. Deployment history records are immutable and cannot be deleted.","operationId":"delete_deployment_felix_deployments__deployment_id__delete","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/experiments":{"post":{"tags":["experiments"],"summary":"Create an Experiment and transcript session","description":"Start scoped work in an existing visible project.\n\nArgs:\n    request: Project, mode, and optional title.\n    auth: Authenticated caller.\n\nReturns:\n    Created Experiment metadata.","operationId":"create_experiment_v1_experiments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["experiments"],"summary":"List visible Experiment metadata","description":"List creator-owned or manager-visible Experiment metadata.\n\nArgs:\n    query: Project, mode, stage, creator, and pagination filters.\n    auth: Authenticated caller.\n\nReturns:\n    Descending keyset page.","operationId":"list_experiments_v1_experiments_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExperimentMode"},{"type":"null"}],"title":"Mode"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExperimentStage"},{"type":"null"}],"title":"Stage"}},{"name":"creator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Creator Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/by-session/{session_id}":{"get":{"tags":["experiments"],"summary":"Resolve the creator's Experiment by transcript session","description":"Resolve a transcript session without exposing it to team managers.\n\nArgs:\n    session_id: Agent chat session identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Owning Experiment metadata.","operationId":"resolve_experiment_by_session_v1_experiments_by_session__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/assets":{"get":{"tags":["experiments"],"summary":"Read bounded Experiment jobs, datasets, and evaluations","description":"Read privacy-safe assets as the creator or an Owner/Admin.\n\nArgs:\n    experiment_id: Experiment identifier.\n    query: Per-collection bound and optional exact selected job.\n    auth: Authenticated caller.\n\nReturns:\n    Authorized bounded assets and stable landing summary.","operationId":"get_experiment_assets_v1_experiments__experiment_id__assets_get","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"selected_job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentAssetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/partitions":{"put":{"tags":["experiments"],"summary":"Pin isolated train, development, and final-evaluation partitions","description":"Pin exact immutable versions as the Experiment creator.","operationId":"register_experiment_partitions_v1_experiments__experiment_id__partitions_put","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentPartitionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentPartitionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["experiments"],"summary":"Read active partitions and confirmation disclosure counts","description":"Report pinned versions and confirmation reads to the creator only.","operationId":"read_experiment_partitions_v1_experiments__experiment_id__partitions_get","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentPartitionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}":{"get":{"tags":["experiments"],"summary":"Get Experiment metadata","description":"Read Experiment metadata as its creator or an Owner/Admin.\n\nArgs:\n    experiment_id: Experiment identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Authorized metadata.","operationId":"get_experiment_v1_experiments__experiment_id__get","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["experiments"],"summary":"Rename an Experiment","description":"Rename visible work as an Owner/Admin.\n\nArgs:\n    experiment_id: Experiment identifier.\n    request: New display title.\n    auth: Authenticated caller.\n\nReturns:\n    Updated metadata.","operationId":"rename_experiment_v1_experiments__experiment_id__patch","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/cancel":{"post":{"tags":["experiments"],"summary":"Cancel an Experiment","description":"Idempotently cancel visible work as an Owner/Admin.\n\nArgs:\n    experiment_id: Experiment identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Cancelled metadata.","operationId":"cancel_experiment_v1_experiments__experiment_id__cancel_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions":{"get":{"tags":["project-versions"],"summary":"List a project's milestone versions","description":"Return the open milestone and the frozen/abandoned history.\n\nArgs:\n    project_id: Project to read.\n    auth: Authenticated caller.\n\nReturns:\n    The current milestone, then history newest first.","operationId":"list_versions_v1_projects__project_id__versions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["project-versions"],"summary":"Close the current milestone version and open the next","description":"Freeze or abandon the current milestone and open its successor.\n\nArgs:\n    project_id: Project to advance.\n    request: Reviewed summary, its revision token, and close options.\n    auth: Authenticated caller.\n\nReturns:\n    The closed milestone and the newly opened one.","operationId":"create_next_version_v1_projects__project_id__versions_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions/preview-close":{"get":{"tags":["project-versions"],"summary":"Preview closing the current milestone version","description":"Describe what closing the current milestone would record, writing nothing.\n\nArgs:\n    project_id: Project to read.\n    auth: Authenticated caller.\n\nReturns:\n    The manifest, a reviewable summary, any blockers, and the revision token.","operationId":"preview_close_v1_projects__project_id__versions_preview_close_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions/{version_id}":{"get":{"tags":["project-versions"],"summary":"Read one milestone version","description":"Return one milestone and the manifest it was closed with.\n\nArgs:\n    project_id: Project the milestone belongs to.\n    version_id: Milestone to read.\n    auth: Authenticated caller.\n\nReturns:\n    The milestone, plus its stored manifest once it has been closed.","operationId":"get_version_v1_projects__project_id__versions__version_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectVersionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions/{version_id}/datasets":{"get":{"tags":["project-versions"],"summary":"List the dataset versions a milestone references","description":"Return the dataset versions carried by a milestone.\n\nArgs:\n    project_id: Project the milestone belongs to.\n    version_id: Milestone to read.\n    auth: Authenticated caller.\n\nReturns:\n    The milestone's dataset references, oldest attachment first.","operationId":"list_version_datasets_v1_projects__project_id__versions__version_id__datasets_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDatasetListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions/{version_id}/training-jobs":{"get":{"tags":["project-versions"],"summary":"List the training attempts attributed to a milestone","description":"Return the training jobs that ran inside a milestone's window.\n\nArgs:\n    project_id: Project the milestone belongs to.\n    version_id: Milestone to read.\n    auth: Authenticated caller.\n\nReturns:\n    The milestone's training attempts, oldest first.","operationId":"list_version_training_jobs_v1_projects__project_id__versions__version_id__training_jobs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionTrainingJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/versions/{version_id}/champion":{"post":{"tags":["project-versions"],"summary":"Select a milestone version's champion model","description":"Record a model as the milestone's champion and route traffic to it.\n\nArgs:\n    project_id: Project the milestone belongs to.\n    version_id: Milestone to record the champion on.\n    request: Exactly one champion target, plus an optional reason.\n    auth: Authenticated caller.\n\nReturns:\n    The updated milestone, the deployment record, and the live pointer.","operationId":"set_champion_v1_projects__project_id__versions__version_id__champion_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChampionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChampionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-suite-catalog":{"get":{"tags":["projects"],"summary":"List Evaluation Suite Catalog","description":"List curated Fastino benchmark datasets selectable by a project.\n\nArgs:\n    project_id: Project that will own the selected Evaluation Suite.\n    auth: Authenticated requester.\n\nReturns:\n    Reviewed benchmark definitions without exposing mutable storage rows.","operationId":"list_evaluation_suite_catalog_v1_projects__project_id__evaluation_suite_catalog_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlatformBenchmarkResponse"},"title":"Response List Evaluation Suite Catalog V1 Projects  Project Id  Evaluation Suite Catalog Get"}}}},"404":{"description":"Project not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-suites":{"post":{"tags":["projects"],"summary":"Create Evaluation Suite","description":"Materialize and pin a project Evaluation Suite from one supported source.\n\nArgs:\n    project_id: Owning project.\n    request: Source, canonicalization, and scorer configuration.\n    auth: Authenticated requester.\n\nReturns:\n    Project-owned immutable Evaluation Suite.\n\nRaises:\n    HTTPException: If source cases are invalid or project access is denied.","operationId":"create_evaluation_suite_v1_projects__project_id__evaluation_suites_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSuiteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSuiteResponse"}}}},"404":{"description":"Project not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["projects"],"summary":"List Evaluation Suites","description":"List all project-owned Evaluation Suites.\n\nArgs:\n    project_id: Owning project.\n    request: Incoming request, used to redact confirmation source identity.\n    auth: Authenticated requester.\n\nReturns:\n    Suites ordered by most recently created.","operationId":"list_evaluation_suites_v1_projects__project_id__evaluation_suites_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteResponse"},"title":"Response List Evaluation Suites V1 Projects  Project Id  Evaluation Suites Get"}}}},"404":{"description":"Project not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-suites/{suite_id}/preview":{"get":{"tags":["projects"],"summary":"Preview Evaluation Suite","description":"Preview pinned canonical suite cases before running models.\n\nArgs:\n    project_id: Owning project.\n    suite_id: Evaluation Suite ID.\n    auth: Authenticated requester.\n\nReturns:\n    Suite metadata plus up to 25 pinned canonical cases.\n\nRaises:\n    HTTPException: If project or suite access is denied.","operationId":"preview_evaluation_suite_v1_projects__project_id__evaluation_suites__suite_id__preview_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","title":"Suite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSuitePreviewResponse"}}}},"404":{"description":"Project or Evaluation Suite not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-runs":{"get":{"tags":["projects"],"summary":"List Project Evaluation Runs","description":"List Evaluation Suite runs for an authorized project, newest first.","operationId":"list_project_evaluation_runs_v1_projects__project_id__evaluation_runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteRunResponse"},"title":"Response List Project Evaluation Runs V1 Projects  Project Id  Evaluation Runs Get"}}}},"404":{"description":"Project not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-runs/{run_id}":{"get":{"tags":["projects"],"summary":"Get Project Evaluation Run","description":"Return one project-scoped Evaluation Suite run.","operationId":"get_project_evaluation_run_v1_projects__project_id__evaluation_runs__run_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSuiteRunResponse"}}}},"404":{"description":"Project or Evaluation Suite run not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-runs/{run_id}/results":{"get":{"tags":["projects"],"summary":"List Project Evaluation Run Results","description":"Return per-case evidence for one project-scoped Evaluation Suite run.","operationId":"list_project_evaluation_run_results_v1_projects__project_id__evaluation_runs__run_id__results_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteRunResultResponse"},"title":"Response List Project Evaluation Run Results V1 Projects  Project Id  Evaluation Runs  Run Id  Results Get"}}}},"404":{"description":"Project or Evaluation Suite run not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-suites/{suite_id}/runs":{"get":{"tags":["projects"],"summary":"List Evaluation Suite Runs","description":"List immutable execution history for one project Evaluation Suite.\n\nArgs:\n    project_id: Owning project.\n    suite_id: Evaluation Suite ID.\n    request: Incoming request, used to hide confirmation runs from run keys.\n    auth: Authenticated requester.\n    limit: Maximum rows to return (capped at 200).\n\nReturns:\n    Evaluation Suite run records newest first.","operationId":"list_evaluation_suite_runs_v1_projects__project_id__evaluation_suites__suite_id__runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","title":"Suite Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteRunResponse"},"title":"Response List Evaluation Suite Runs V1 Projects  Project Id  Evaluation Suites  Suite Id  Runs Get"}}}},"404":{"description":"Project or Evaluation Suite not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["projects"],"summary":"Start Evaluation Suite Runs","description":"Create append-only Evaluation Suite runs for agent-sandbox execution.\n\nArgs:\n    project_id: Owning project.\n    suite_id: Pinned Evaluation Suite to execute.\n    request: Project models and optional case cap.\n    http_request: Incoming request, used to resolve a run key's approved\n        plan (ENG-7005).\n    auth: Authenticated requester.\n\nReturns:\n    Prepared run records, one for each selected model.\n\nRaises:\n    HTTPException: If suite/model ownership or scorer compatibility is invalid.","operationId":"start_evaluation_suite_runs_v1_projects__project_id__evaluation_suites__suite_id__runs_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","title":"Suite Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSuiteRunCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteRunResponse"},"title":"Response Start Evaluation Suite Runs V1 Projects  Project Id  Evaluation Suites  Suite Id  Runs Post"}}}},"404":{"description":"Project or Evaluation Suite not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/evaluation-suites/{suite_id}/runs/{run_id}/results":{"get":{"tags":["projects"],"summary":"List Evaluation Suite Run Results","description":"Return immutable per-case evidence for one Evaluation Suite execution.\n\nArgs:\n    project_id: Owning project.\n    suite_id: Owning Evaluation Suite.\n    run_id: Execution identifier.\n    request: Incoming request, used to hide confirmation evidence from run keys.\n    auth: Authenticated requester.\n\nReturns:\n    Per-case inference, native scoring, and judge evidence in case order.\n\nRaises:\n    HTTPException: If the requested project-scoped run does not exist.","operationId":"list_evaluation_suite_run_results_v1_projects__project_id__evaluation_suites__suite_id__runs__run_id__results_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","title":"Suite Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSuiteRunResultResponse"},"title":"Response List Evaluation Suite Run Results V1 Projects  Project Id  Evaluation Suites  Suite Id  Runs  Run Id  Results Get"}}}},"404":{"description":"Project, Evaluation Suite, or run not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/reports":{"get":{"tags":["experiments"],"summary":"List reports produced by an Experiment","description":"List normalized run reports for one authorized Experiment.\n\nArgs:\n    experiment_id: Experiment whose report-producing runs are requested.\n    auth: Authenticated caller.\n    limit: Maximum items returned.\n    cursor: Opaque exclusive keyset from a previous page.\n\nReturns:\n    One stable report page.\n\nRaises:\n    HTTPException: 404 when hidden or absent, 400 for an invalid cursor.","operationId":"list_experiment_reports_v1_experiments__experiment_id__reports_get","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentReportPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/finetune-plans":{"get":{"tags":["finetune-plans"],"summary":"List a plan's append-only revisions","description":"Return every revision for an Experiment, newest first.\n\nArgs:\n    experiment_id: Experiment whose plan history is requested.\n    auth: Authenticated caller.\n\nReturns:\n    Revisions in descending revision order.","operationId":"list_finetune_plans_v1_experiments__experiment_id__finetune_plans_get","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/finetune-plans/propose":{"post":{"tags":["finetune-plans"],"summary":"Append a proposed plan revision","description":"Record a proposed revision, or apply it when it only narrows.\n\nProposing grants nothing on its own. The one exception is a revision that\ntakes authority away: it cannot let the Experiment do anything new, so it\napplies immediately. Pressing stop is that same path with no permitted\nbase model, no training jobs, and every capability off.\n\nArgs:\n    experiment_id: Experiment the plan belongs to.\n    request: Proposed envelope and intent.\n    auth: Authenticated caller.\n\nReturns:\n    The stored revision.","operationId":"propose_finetune_plan_v1_experiments__experiment_id__finetune_plans_propose_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanProposeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/finetune-plans/{plan_id}/approve":{"post":{"tags":["finetune-plans"],"summary":"Approve a proposed plan revision","description":"Authorise a revision the caller was shown.\n\nArgs:\n    experiment_id: Experiment the plan belongs to.\n    plan_id: Revision to approve.\n    request: Digest of the revision as displayed, and any edited bar.\n    auth: Authenticated caller.\n\nReturns:\n    The approved revision.","operationId":"approve_finetune_plan_v1_experiments__experiment_id__finetune_plans__plan_id__approve_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}},{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experiments/{experiment_id}/finetune-plans/{plan_id}/reject":{"post":{"tags":["finetune-plans"],"summary":"Reject a proposed plan revision","description":"Decline a revision without granting anything.\n\nArgs:\n    experiment_id: Experiment the plan belongs to.\n    plan_id: Revision to reject.\n    request: Digest of the revision as displayed.\n    auth: Authenticated caller.\n\nReturns:\n    The rejected revision.","operationId":"reject_finetune_plan_v1_experiments__experiment_id__finetune_plans__plan_id__reject_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}},{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunePlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/import-from-github/list-files":{"post":{"tags":["datasets"],"summary":"List Github Files","description":"List importable data files in a GitHub repository.\n\nArgs:\n    request: Contains ``repo`` (owner/repo or URL), optional ``branch``,\n        optional ``github_token``.\n    http_request: Raw request, read only to identify sandbox run keys.\n    auth: Authenticated user context.\n\nReturns:\n    List of data files and the resolved default branch.\n\nRaises:\n    HTTPException: 400 on invalid repo, 403 on run-key token, 502 on\n        GitHub API errors.","operationId":"list_github_files_v1_datasets_import_from_github_list_files_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/import-from-github":{"post":{"tags":["datasets"],"summary":"Import From Github","description":"Download a file from GitHub and create a Fastino dataset.\n\nArgs:\n    request: Repo, file path, and optional branch, dataset name, GitHub\n        token, and dataset purpose (``type``: 'training' (default),\n        'evaluation', or 'benchmark' -- 'benchmark' is rejected,\n        mirroring ``pull_dataset_from_hub``).\n    http_request: Raw request, read only to identify sandbox run keys.\n    auth: Authenticated user context.\n\nReturns:\n    DatasetResponse of the created dataset.\n\nRaises:\n    HTTPException: 400 on parse errors, 403 on a run-key token or\n        ``type='benchmark'``, 502 on download failures.","operationId":"import_from_github_v1_datasets_import_from_github_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/preview-from-hub":{"post":{"tags":["datasets"],"summary":"Preview Dataset From Hub","description":"Preview a dataset from HuggingFace Hub without saving it.\n\nFetches the dataset and returns a preview (first 50 rows, schema, metadata)\nfor user review before confirming the import.\n\nUser-authenticated requests require hf_token. Sandbox run keys omit it and\nimport public repos anonymously. Gated or private repos must be imported\nin the Fastino UI with a user token.","operationId":"preview_dataset_from_hub_v1_datasets_preview_from_hub_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HuggingFacePullRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HuggingFacePullPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/pull-from-hub":{"post":{"tags":["datasets"],"summary":"Pull Dataset From Hub","description":"Pull a dataset from HuggingFace Hub and save it locally.\n\nUser-authenticated requests require hf_token. Sandbox run keys omit it and\nimport public repos anonymously. Gated or private repos must be imported\nin the Fastino UI with a user token.\nOptionally accepts session_id for SSE log streaming.","operationId":"pull_dataset_from_hub_v1_datasets_pull_from_hub_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HuggingFacePullRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}/{version}/push-to-hub":{"post":{"tags":["datasets"],"summary":"Push Dataset To Hub","description":"Push a specific dataset version to HuggingFace Hub.\n\nArgs:\n    name: Dataset name.\n    version: Version number to push (use \"latest\" for most recent).\n\nRequires a HuggingFace API token with write access.\nThe dataset will be uploaded in Parquet format with metadata.","operationId":"push_dataset_to_hub_v1_datasets__name___version__push_to_hub_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HuggingFacePushRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushDatasetToHubResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/upload/{dataset_id}/content":{"put":{"tags":["datasets"],"summary":"Upload Reserved Dataset Content","description":"Streams raw upload bytes to a reservation's S3 key for the caller.\n\nThe body is consumed as it arrives rather than read into memory, so a\ndataset of any size costs one multipart part of resident memory.\n\nArgs:\n    dataset_id: Reservation returned by ``POST /felix/datasets/upload/url``.\n    http_request: Carries the raw file bytes as the request body.\n    auth: Authenticated caller, who must own the reservation.\n\nReturns:\n    A receipt naming the reservation and the byte count stored.\n\nRaises:\n    HTTPException: 404, 409, 400, or 413 per :data:`_REFUSAL_RESPONSES`.","operationId":"upload_reserved_dataset_content_v1_datasets_upload__dataset_id__content_put","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets":{"get":{"tags":["datasets"],"summary":"List Datasets","description":"Lists visible datasets.","operationId":"list_datasets_v1_datasets_get","parameters":[{"name":"include_all_versions","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include All Versions"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by project ID. For a real project, orphan (no-project) datasets are included only when include_orphans=True. Omitted or the 'default' sentinel always includes orphans.","title":"Project Id"},"description":"Filter by project ID. For a real project, orphan (no-project) datasets are included only when include_orphans=True. Omitted or the 'default' sentinel always includes orphans."},{"name":"include_failed","in":"query","required":false,"schema":{"type":"boolean","description":"When true, include the caller's own failed datasets (status='failed'). Defaults to false so the UI never renders broken-but-clickable records that 404 on preview/analyze. The result set is always scoped to the authenticated user — this flag does NOT grant cross-user visibility, so passing true is safe for any authenticated caller. Failed rows remain in the database for support / debugging; their original upload is preserved at raw_s3_key.","default":false,"title":"Include Failed"},"description":"When true, include the caller's own failed datasets (status='failed'). Defaults to false so the UI never renders broken-but-clickable records that 404 on preview/analyze. The result set is always scoped to the authenticated user — this flag does NOT grant cross-user visibility, so passing true is safe for any authenticated caller. Failed rows remain in the database for support / debugging; their original upload is preserved at raw_s3_key."},{"name":"include_orphans","in":"query","required":false,"schema":{"type":"boolean","description":"When true and project_id names a real project, also include the caller's own orphan (no-project) datasets alongside the project's own rows. Ignored when project_id is omitted or is the 'default' sentinel, where orphans are always included regardless. Defaults to false so an ordinary project-scoped list stays scoped to the project instead of being swamped by every one of the caller's orphans; set this explicitly from surfaces that deliberately want orphans folded in, e.g. the MLE agent's dataset picker (ENG-6077).","default":false,"title":"Include Orphans"},"description":"When true and project_id names a real project, also include the caller's own orphan (no-project) datasets alongside the project's own rows. Ignored when project_id is omitted or is the 'default' sentinel, where orphans are always included regardless. Defaults to false so an ordinary project-scoped list stays scoped to the project instead of being swamped by every one of the caller's orphans; set this explicitly from surfaces that deliberately want orphans folded in, e.g. the MLE agent's dataset picker (ENG-6077)."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"description":"Maximum datasets to return, newest first, after collapsing to the latest version per name. Defaults to and is bounded at 200 (oversize requests are rejected, matching /felix/training-jobs and /projects/{id}/evaluation-runs). Callers that need the full set page with limit/offset (ENG-7085): the frontend datasets tab and the sandbox dataset picker both loop until a short page rather than issuing one unbounded read.","default":200,"title":"Limit"},"description":"Maximum datasets to return, newest first, after collapsing to the latest version per name. Defaults to and is bounded at 200 (oversize requests are rejected, matching /felix/training-jobs and /projects/{id}/evaluation-runs). Callers that need the full set page with limit/offset (ENG-7085): the frontend datasets tab and the sandbox dataset picker both loop until a short page rather than issuing one unbounded read."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of leading datasets to skip.","default":0,"title":"Offset"},"description":"Number of leading datasets to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/upload/url":{"post":{"tags":["datasets"],"summary":"Get Upload Url","description":"Creates a reserved dataset row and presigned upload URL.","operationId":"get_upload_url_v1_datasets_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/upload/process":{"post":{"tags":["datasets"],"summary":"Process Uploaded Dataset","description":"Queues processing for a reserved dataset upload.","operationId":"process_uploaded_dataset_v1_datasets_upload_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadProcessRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/merge":{"post":{"tags":["datasets"],"summary":"Merge Datasets","description":"Merges compatible datasets into a new versioned dataset.","operationId":"merge_datasets_v1_datasets_merge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetMergeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetMergeResponse"}}}},"409":{"description":"Could not allocate a unique version for the output name after retrying against concurrent writers. Retryable (ENG-6623)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}":{"get":{"tags":["datasets"],"summary":"List Dataset Versions","description":"Lists all visible versions of a dataset.","operationId":"list_dataset_versions_v1_datasets__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetVersionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["datasets"],"summary":"Create Dataset Version","description":"Creates a new version of an existing dataset.","operationId":"create_dataset_version_v1_datasets__name__post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_dataset_version_v1_datasets__name__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datasets"],"summary":"Delete Dataset","description":"Soft-delete a dataset and all its versions.\n\nArgs:\n    name: Dataset name. Legacy UUID lookups are still accepted and routed\n        through the by-ID path for backwards compatibility.","operationId":"delete_dataset_v1_datasets__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}/{version}":{"get":{"tags":["datasets"],"summary":"Get Dataset","description":"Returns metadata for a dataset version.","operationId":"get_dataset_v1_datasets__name___version__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["datasets"],"summary":"Update Dataset Metadata","description":"Updates metadata without creating a new version.","operationId":"update_dataset_metadata_v1_datasets__name___version__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetMetadataUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datasets"],"summary":"Delete Dataset Version","description":"Deletes one dataset version.","operationId":"delete_dataset_version_v1_datasets__name___version__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}/{version}/download":{"get":{"tags":["datasets"],"summary":"Download Dataset","description":"Downloads a dataset version in the requested format.","operationId":"download_dataset_v1_datasets__name___version__download_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"format","in":"query","required":false,"schema":{"enum":["jsonl","csv","parquet"],"type":"string","default":"jsonl","title":"Format"}},{"name":"standard_columns","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Standard Columns"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}/{version}/preview":{"get":{"tags":["datasets"],"summary":"Preview Dataset","description":"Returns a bounded preview of a dataset version.","operationId":"preview_dataset_v1_datasets__name___version__preview_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of rows to preview (max 100)","default":10,"title":"Limit"},"description":"Number of rows to preview (max 100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip","default":0,"title":"Offset"},"description":"Number of rows to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{dataset_id}":{"patch":{"tags":["datasets"],"summary":"Update Dataset","description":"Patch a dataset by ID. Currently exposes only ``project_id``.\n\nDelegates to :func:`services.projects.movement.assign_resource_to_project`\nwhich owns the visibility check, target-project gating, and the\nservice-role ``UPDATE``. Send ``project_id: null`` to unassign the\ndataset from its project.","operationId":"update_dataset_v1_datasets__dataset_id__patch","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResourceProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{name}/{version}/rows":{"patch":{"tags":["datasets"],"summary":"Update Dataset Rows","description":"Updates selected rows and creates a dataset version.","operationId":"update_dataset_rows_v1_datasets__name___version__rows_patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowsUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datasets"],"summary":"Delete Dataset Rows","description":"Deletes selected rows and creates a dataset version.","operationId":"delete_dataset_rows_v1_datasets__name___version__rows_delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowsDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{dataset_id}/type":{"patch":{"tags":["datasets"],"summary":"Update Dataset Use Type","description":"Changes a dataset use type.","operationId":"update_dataset_use_type_v1_datasets__dataset_id__type_patch","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUseTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTypeUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects":{"get":{"tags":["projects"],"summary":"List Projects","description":"List projects visible to the caller.\n\nArgs:\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Visible projects and count.","operationId":"list_projects_v1_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListResponse"}}}}}},"post":{"tags":["projects"],"summary":"Create Project","description":"Create a project.\n\nArgs:\n    request: Creation payload.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Created project.\n\nRaises:\n    HTTPException: 503 when a PostgreSQL statement timeout cancelled the\n        insert, 500 for any other database failure.","operationId":"create_project_v1_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","description":"Get a visible project.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Visible project.","operationId":"get_project_v1_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update Project","description":"Update a visible project.\n\nArgs:\n    project_id: Project identifier.\n    request: Partial update payload.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Updated project.","operationId":"update_project_v1_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete Project","description":"Soft-delete a visible project.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Deletion confirmation.","operationId":"delete_project_v1_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/dataset-count":{"get":{"tags":["projects"],"summary":"Get Project Dataset Count","description":"Count datasets attached to a visible project.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Dataset count and delete eligibility.","operationId":"get_project_dataset_count_v1_projects__project_id__dataset_count_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDatasetCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/quality-metrics":{"get":{"tags":["projects"],"summary":"Get Project Quality Metrics","description":"Get LLMAJ pass/fail aggregates for a project.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n    service: Project service.\n\nReturns:\n    Verdict counts and pass/fail rates.","operationId":"get_project_quality_metrics_v1_projects__project_id__quality_metrics_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityMetricsResponse"}}}},"404":{"description":"Project not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/improvement-timeseries":{"get":{"tags":["projects"],"summary":"Grouped training-job + evals + base-model-eval for a project","description":"Return project improvement history.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Improvement timeseries.\n\nRaises:\n    HTTPException: 403 for denied access or 404 when absent.","operationId":"get_improvement_timeseries_v1_projects__project_id__improvement_timeseries_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovementTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/seed-repeat-status":{"get":{"tags":["projects"],"summary":"Per-job persisted-recipe seed-repeat status for a project","description":"Return every training job's persisted-recipe seed-repeat status.\n\nPowers ENG-6302: unlike ``/monitoring/improvement-candidates``, which\nlabels only the single candidate it recommends per project, the live\n`ImprovementTab` a real user sees renders every training job on the\nproject as its own adapter row and needs a status per row.\n\nArgs:\n    project_id: Project identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Training job ID -> persisted-recipe seed-repeat status.\n\nRaises:\n    HTTPException: 403 for denied access or 404 when absent.","operationId":"get_project_seed_repeat_status_v1_projects__project_id__seed_repeat_status_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSeedRepeatStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/monitoring/improvement-candidates":{"get":{"tags":["monitoring"],"summary":"List deployable improvement candidates for monitoring","description":"List workspace-scoped monitoring improvement candidates.\n\nArgs:\n    limit: Requested maximum number of candidates.\n    auth: Authentication result.\n    service: Improvement-candidates service.\n\nReturns:\n    ImprovementCandidatesResponse with zero or more candidates.","operationId":"list_improvement_candidates_v1_monitoring_improvement_candidates_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum candidates to return, capped at 50.","default":10,"title":"Limit"},"description":"Maximum candidates to return, capped at 50."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovementCandidatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/monitoring/improvement-candidates/{training_job_id}/dismiss":{"post":{"tags":["monitoring"],"summary":"Dismiss a monitoring improvement candidate","description":"Dismiss a visible improvement candidate training job.\n\nArgs:\n    training_job_id: Training job ID backing the candidate.\n    auth: Authentication result.\n    service: Improvement-candidates service.\n\nReturns:\n    DismissImprovementCandidateResponse with dismissal metadata.\n\nRaises:\n    HTTPException: 404 when the candidate is not visible to the caller.","operationId":"dismiss_improvement_candidate_v1_monitoring_improvement_candidates__training_job_id__dismiss_post","parameters":[{"name":"training_job_id","in":"path","required":true,"schema":{"type":"string","title":"Training Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissImprovementCandidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cli/telemetry":{"post":{"tags":["cli"],"summary":"Cli Telemetry","description":"Receive CLI telemetry and forward to Datadog.\n\nOptionally enriched with user info if X-API-Key header is provided.\nGeographic info derived from request IP by Datadog.","operationId":"cli_telemetry_v1_cli_telemetry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTelemetryEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/finetune-agent/tools":{"get":{"tags":["Finetune Agent"],"summary":"List Tools","description":"List available tools for a client type.\n\nArgs:\n    request: Incoming HTTP request (required by SlowAPI rate limiter).\n    params: Query parameters including client_type ('web' or 'cli')\n\nReturns:\n    List of available tools","operationId":"list_tools_v1_finetune_agent_tools_get","parameters":[{"name":"client_type","in":"query","required":false,"schema":{"type":"string","default":"web","title":"Client Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/finetune-agent/sessions":{"get":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"List Sessions","description":"List chat sessions for the authenticated user.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    auth: Authenticated caller (read-only).\n    service: Chat-session service.\n    limit: Page size.\n    offset: Page offset.\n    include_archived: Whether to include archived sessions.\n\nReturns:\n    ChatSessionListResponse sorted by updated_at descending.","operationId":"list_sessions_v1_finetune_agent_sessions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of sessions to return","default":10,"title":"Limit"},"description":"Number of sessions to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived sessions","default":false,"title":"Include Archived"},"description":"Include archived sessions"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionListResponse"}}}},"429":{"description":"This API process is serving its maximum concurrent session-list requests.","content":{"application/json":{"schema":{"description":"OpenAI error envelope returned for Brain HTTP failures. Replaces FastAPI's default `{detail: string}` body.","properties":{"error":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"title":"Message","type":"string"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"type":{"title":"Type","type":"string"}},"required":["message","type","param","code"],"title":"Error","type":"object"}},"required":["error"],"title":"OpenAIError","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Create Session","description":"Create a new chat session.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    body: Create payload.\n    auth: Authenticated caller.\n    service: Chat-session service.\n\nReturns:\n    ChatSessionResponse for the created session.","operationId":"create_session_v1_finetune_agent_sessions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionResponse"}}}},"503":{"description":"Session storage timed out before commit; retry is safe.","content":{"application/json":{"schema":{"description":"OpenAI error envelope returned for Brain HTTP failures. Replaces FastAPI's default `{detail: string}` body.","properties":{"error":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"title":"Message","type":"string"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"type":{"title":"Type","type":"string"}},"required":["message","type","param","code"],"title":"Error","type":"object"}},"required":["error"],"title":"OpenAIError","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/finetune-agent/sessions/{session_id}":{"get":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Get Session","description":"Get a specific chat session with all messages.\n\n``session_id`` is typed :class:`~uuid.UUID` so FastAPI answers 422 at the\nboundary. A raw string such as ``e2e-session`` would otherwise reach a\nPostgres ``uuid`` comparison and surface as a driver conversion 500\n(PYTHON-1YS7).\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    session_id: Chat session primary key.\n    auth: Authenticated caller (read-only).\n    service: Chat-session service.\n\nReturns:\n    ChatSessionWithMessages for the owned session.\n\nRaises:\n    HTTPException: 404 when the session is missing or not owned.","operationId":"get_session_v1_finetune_agent_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionWithMessages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Update Session","description":"Update a chat session's title or archive status.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    session_id: Chat session primary key.\n    body: Partial update payload.\n    auth: Authenticated caller.\n    service: Chat-session service.\n\nReturns:\n    ChatSessionResponse after the update.\n\nRaises:\n    HTTPException: 404 when the session is missing or not owned.","operationId":"update_session_v1_finetune_agent_sessions__session_id__patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Delete Session","description":"Delete a chat session and all its messages.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    session_id: Chat session primary key.\n    auth: Authenticated caller.\n    service: Chat-session service.\n\nReturns:\n    ChatSessionDeleteResponse confirming deletion.\n\nRaises:\n    HTTPException: 404 when the session is missing or not owned.","operationId":"delete_session_v1_finetune_agent_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/finetune-agent/sessions/{session_id}/messages":{"post":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Append Messages","description":"Append messages to an existing session.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    session_id: Chat session primary key.\n    body: Messages to append.\n    auth: Authenticated caller.\n    service: Chat-session service.\n\nReturns:\n    ChatSessionMessagesAppendResponse with messages_added count.\n\nRaises:\n    HTTPException: 404 when the session is missing or not owned.","operationId":"append_messages_v1_finetune_agent_sessions__session_id__messages_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionMessagesAppend"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionMessagesAppendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/finetune-agent/sessions/{session_id}/billing/agent-turn":{"post":{"tags":["Finetune Agent","agent-chat-sessions"],"summary":"Report Mle Agent Turn Billing","description":"Crash-safe per-turn billing endpoint for MLE chat sessions.\n\nArgs:\n    request: FastAPI request used by the rate-limiter.\n    session_id: ``agent_chat_sessions.id`` for the active chat.\n    body: Per-turn usage payload with dedup key.\n    auth: Authenticated caller; must own ``session_id``.\n\nReturns:\n    AgentTurnBillingResponse with ``request_id`` and ``billed`` flag.\n\nRaises:\n    HTTPException: 404/403 for ownership failures.","operationId":"report_mle_agent_turn_billing_v1_finetune_agent_sessions__session_id__billing_agent_turn_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTurnBillingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTurnBillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/inference-clusters":{"get":{"tags":["inference-clusters"],"summary":"[Retired] List project inference clusters","description":"Reject the retired project cluster listing.\n\nArgs:\n    project_id: Project the caller asked for.\n\nRaises:\n    HTTPException: Always ``410 Gone``.","operationId":"list_project_inference_clusters_projects__project_id__inference_clusters_get","deprecated":true,"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"410":{"description":"Not-pass inference clustering is retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/inference-clusters/{cluster_id}":{"get":{"tags":["inference-clusters"],"summary":"[Retired] Get an inference cluster","description":"Reject the retired cluster detail read.\n\nArgs:\n    cluster_id: Cluster the caller asked for.\n\nRaises:\n    HTTPException: Always ``410 Gone``.","operationId":"get_inference_cluster_inference_clusters__cluster_id__get","deprecated":true,"parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cluster Id"}}],"responses":{"410":{"description":"Not-pass inference clustering is retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]},"patch":{"tags":["inference-clusters"],"summary":"[Retired] Update a cluster status","description":"Reject the retired cluster annotation write.\n\nArgs:\n    cluster_id: Cluster the caller asked for.\n\nRaises:\n    HTTPException: Always ``410 Gone``.","operationId":"update_inference_cluster_inference_clusters__cluster_id__patch","deprecated":true,"parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cluster Id"}}],"responses":{"410":{"description":"Not-pass inference clustering is retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/inference-clusters/{cluster_id}/examples":{"get":{"tags":["inference-clusters"],"summary":"[Retired] List cluster examples","description":"Reject the retired cluster examples read.\n\nArgs:\n    cluster_id: Cluster the caller asked for.\n\nRaises:\n    HTTPException: Always ``410 Gone``.","operationId":"list_inference_cluster_examples_inference_clusters__cluster_id__examples_get","deprecated":true,"parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cluster Id"}}],"responses":{"410":{"description":"Not-pass inference clustering is retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/inference-clusters/{cluster_id}/inferences":{"get":{"tags":["inference-clusters"],"summary":"[Retired] List cluster member inferences","description":"Reject the retired cluster membership read.\n\nArgs:\n    cluster_id: Cluster the caller asked for.\n\nRaises:\n    HTTPException: Always ``410 Gone``.","operationId":"list_inference_cluster_inferences_inference_clusters__cluster_id__inferences_get","deprecated":true,"parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cluster Id"}}],"responses":{"410":{"description":"Not-pass inference clustering is retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/inferences":{"get":{"tags":["inference-history"],"summary":"List Inference History","description":"List inference history for the authenticated user.\n\nReturns all inference records across all model types (NER, classification,\nJSON extraction, decoder) sorted by most recent first.\n\nArgs:\n    auth: Authentication result with user_id\n    limit: Maximum number of records to return (default 100, max 500)\n    offset: Number of records to skip for pagination\n    model_id: Optional filter by model ID\n    task: Optional filter by task type\n    project_id: Optional filter by project ID\n    training_job_id: Optional filter by training job ID\n    latency_min/latency_max: Inclusive latency window in ms.\n    llmaj_score_min/llmaj_score_max: Inclusive LLMAJ-score window\n        in [0.0, 1.0].\n    since: Optional inclusive lower bound on ``created_at`` (ISO 8601).\n    until: Optional exclusive upper bound on ``created_at`` (ISO 8601).\n\nReturns:\n    InferenceListResponse with paginated inference records.\n\nRaises:\n    HTTPException: 422 when ``min`` is greater than its paired\n        ``max`` — returning an empty page would silently mask the\n        caller's misordered query.","operationId":"list_inference_history_v1_inferences_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum records to return","default":100,"title":"Limit"},"description":"Maximum records to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Offset"},"description":"Number of records to skip"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model ID","title":"Model Id"},"description":"Filter by model ID"},{"name":"task","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by task type","title":"Task"},"description":"Filter by task type"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by project ID","title":"Project Id"},"description":"Filter by project ID"},{"name":"training_job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by training job ID","title":"Training Job Id"},"description":"Filter by training job ID"},{"name":"latency_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum latency in ms (must be >= 0).","title":"Latency Min"},"description":"Minimum latency in ms (must be >= 0)."},{"name":"latency_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum latency in ms (must be >= 0).","title":"Latency Max"},"description":"Maximum latency in ms (must be >= 0)."},{"name":"llmaj_score_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Minimum LLM-as-Judge score in [0.0, 1.0].","title":"Llmaj Score Min"},"description":"Minimum LLM-as-Judge score in [0.0, 1.0]."},{"name":"llmaj_score_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Maximum LLM-as-Judge score in [0.0, 1.0].","title":"Llmaj Score Max"},"description":"Maximum LLM-as-Judge score in [0.0, 1.0]."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inclusive lower bound on created_at (ISO 8601, UTC).","title":"Since"},"description":"Inclusive lower bound on created_at (ISO 8601, UTC)."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exclusive upper bound on created_at (ISO 8601, UTC).","title":"Until"},"description":"Exclusive upper bound on created_at (ISO 8601, UTC)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceListResponse"}}}},"503":{"description":"Inference history dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inferences/{inference_id}":{"get":{"tags":["inference-history"],"summary":"Get Inference Detail","description":"Get a single inference record by ID.\n\nArgs:\n    inference_id: The inference record UUID\n    auth: Authentication result with user_id\n\nReturns:\n    InferenceRecord with full details\n\nRaises:\n    HTTPException: 404 if inference not found or outside the caller's team","operationId":"get_inference_detail_v1_inferences__inference_id__get","parameters":[{"name":"inference_id","in":"path","required":true,"schema":{"type":"string","title":"Inference Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRecord"}}}},"404":{"description":"Inference not found."},"503":{"description":"Inference history dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inferences/{inference_id}/feedback":{"post":{"tags":["inference-history"],"summary":"Submit Inference Feedback","description":"Submit human feedback on a specific inference.\n\nMarks an inference as correct or incorrect. When marking as incorrect,\nthe expected output must be provided for downstream training data curation.\n\nArgs:\n    inference_id: The inference record UUID to annotate.\n    request: Feedback payload with verdict, optional corrected output, and notes.\n    auth: Authentication result with user_id.\n\nReturns:\n    InferenceFeedbackResponse confirming the stored feedback.\n\nRaises:\n    HTTPException: 404 if inference not found or outside the caller's team.","operationId":"submit_inference_feedback_v1_inferences__inference_id__feedback_post","parameters":[{"name":"inference_id","in":"path","required":true,"schema":{"type":"string","title":"Inference Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceFeedbackResponse"}}}},"404":{"description":"Inference not found."},"422":{"description":"Invalid feedback payload."},"503":{"description":"Inference history dependency is temporarily unavailable."}}},"get":{"tags":["inference-history"],"summary":"Get Inference Feedback","description":"Get human feedback for a specific inference.\n\nArgs:\n    inference_id: The inference record UUID to look up.\n    auth: Authentication result with user_id.\n\nReturns:\n    InferenceFeedbackResponse with the stored feedback.\n\nRaises:\n    HTTPException: 404 if inference not found or no feedback submitted.","operationId":"get_inference_feedback_v1_inferences__inference_id__feedback_get","parameters":[{"name":"inference_id","in":"path","required":true,"schema":{"type":"string","title":"Inference Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceFeedbackResponse"}}}},"404":{"description":"Feedback not found."},"503":{"description":"Inference history dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/model-metrics":{"post":{"tags":["analytics"],"summary":"Get Model Metrics","description":"Return per-model metrics for the last 24 hours.\n\nCounts, error counts, average latency, and last-inference timestamp are\nall scoped to the last 24 hours. ``latest_evaluation`` is all-time.\n\nArgs:\n    request: Batch of model ids to look up.\n    auth: Authentication result carrying the user id and team scope.\n\nReturns:\n    ``ModelMetricsResponse`` with an entry for each requested id.\n\nRaises:\n    HTTPException: 503 when the metrics read fails; the cause is logged\n        server-side rather than returned to the caller.","operationId":"get_model_metrics_v1_analytics_model_metrics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetricsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetricsResponse"}}}},"503":{"description":"Model metrics dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/model-datasets":{"get":{"tags":["analytics"],"summary":"Get Model Datasets","description":"Return training + evaluation datasets for a project or base model.\n\nExactly one of ``project_id`` or ``base_model`` must be provided.\n\nArgs:\n    project_id: Scope to datasets directly attached to this project,\n        or the sentinel ``\"default\"`` for unallocated datasets.\n    base_model: Scope to datasets used by training jobs and\n        evaluations against this base model id.\n    auth: Authentication result carrying the user id and team scope.\n\nReturns:\n    ``ModelDatasetsResponse`` with training and evaluation dataset\n    rows. Evaluation rows include their latest completed evaluation\n    when available.\n\nRaises:\n    HTTPException: 400 when the scope parameters are not exactly one of\n        ``project_id`` / ``base_model``, or the service rejects the\n        input; 503 when the datasets read fails, with the cause logged\n        server-side rather than returned to the caller.","operationId":"get_model_datasets_v1_analytics_model_datasets_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Project UUID. Returns datasets attached to this project. Pass the literal value 'default' to return datasets whose project_id is null (the unallocated-resources bucket). Mutually exclusive with 'base_model' -- exactly one of the two must be provided.","title":"Project Id"},"description":"Project UUID. Returns datasets attached to this project. Pass the literal value 'default' to return datasets whose project_id is null (the unallocated-resources bucket). Mutually exclusive with 'base_model' -- exactly one of the two must be provided."},{"name":"base_model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base catalog model id (e.g. 'meta-llama/Llama-3-8B'). Mutually exclusive with 'project_id' -- exactly one of the two must be provided.","title":"Base Model"},"description":"Base catalog model id (e.g. 'meta-llama/Llama-3-8B'). Mutually exclusive with 'project_id' -- exactly one of the two must be provided."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDatasetsResponse"}}}},"400":{"description":"Exactly one scope parameter must be provided."},"503":{"description":"Model datasets dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-mutually-exclusive-required":["project_id","base_model"]}},"/v1/analytics/workspace-metrics":{"get":{"tags":["analytics"],"summary":"Get Workspace Metrics","description":"Return KPI metrics for the monitoring page.\n\nAggregates inference rows over the selected ``window`` and the immediately\npreceding window of equal length (for trend deltas), plus an all-time count\nfor the caption. ``scope`` selects per-user vs active-team aggregation; the\nservice explicitly filters ``inferences``/``requests`` by ``user_id`` or\n``team_id`` — the ``service_role`` async engine bypasses Postgres RLS, so\nRLS cannot be relied on for tenant isolation.\n\nArgs:\n    window: Rolling window key driven by the monitoring page picker.\n    scope: ``personal`` (per-user) or ``team`` (active team) aggregation.\n    auth: Authentication result carrying the user id used to scope\n        every aggregate.\n\nReturns:\n    ``WorkspaceMetrics`` populated with current / previous / all-time\n    counts, p99 / median latency, spend, and the open-issue tally. For\n    ``window='all'`` the previous-window aggregates run against the same\n    unbounded all-time range, so each ``*_previous`` field equals its\n    current counterpart.\n\nRaises:\n    HTTPException: 400 when ``since`` is not earlier than ``until``; 503\n        when the rollup fails, with the cause logged server-side rather\n        than returned to the caller.","operationId":"get_workspace_metrics_v1_analytics_workspace_metrics_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"enum":["24h","7d","30d","90d","all"],"type":"string","description":"Rolling window for the KPI rollup, used only when ``since`` is omitted. ``24h``/``7d``/``30d``/``90d`` produce a current window of that length plus a previous window of equal length for trend deltas. ``all`` runs both the current and previous aggregates against the unbounded all-time window.","default":"24h","title":"Window"},"description":"Rolling window for the KPI rollup, used only when ``since`` is omitted. ``24h``/``7d``/``30d``/``90d`` produce a current window of that length plus a previous window of equal length for trend deltas. ``all`` runs both the current and previous aggregates against the unbounded all-time window."},{"name":"scope","in":"query","required":false,"schema":{"enum":["personal","team"],"type":"string","description":"``personal`` aggregates the requesting user's inferences; ``team`` aggregates the user's active team (every member sees the same totals). A ``team`` request from a user with no team degrades to personal scope rather than erroring.","default":"personal","title":"Scope"},"description":"``personal`` aggregates the requesting user's inferences; ``team`` aggregates the user's active team (every member sees the same totals). A ``team`` request from a user with no team degrades to personal scope rather than erroring."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive start of an explicit custom window (UTC). When provided it overrides ``window``; the previous window is the immediately preceding window of equal length.","title":"Since"},"description":"Inclusive start of an explicit custom window (UTC). When provided it overrides ``window``; the previous window is the immediately preceding window of equal length."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive end of the explicit window (UTC). Defaults to now.","title":"Until"},"description":"Exclusive end of the explicit window (UTC). Defaults to now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMetrics"}}}},"503":{"description":"Workspace metrics dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/used-models":{"get":{"tags":["analytics"],"summary":"Get Used Models","description":"Return the distinct models the user has run inference against.\n\nOne entry per distinct ``inferences.model_id`` for the authenticated\nuser, ordered by most-recently-used first and carrying the last-used\ntimestamp plus a lifetime call count. LLM-as-Judge calls\n(``source = 'llmaj'``) are excluded so the list reflects user-driven\nusage. The service filters ``inferences.user_id`` explicitly because\nthe ``service_role`` async engine bypasses Postgres RLS.\n\nArgs:\n    limit: Maximum number of models to return.\n    auth: Authentication result carrying the user id used to scope\n        the aggregate.\n\nReturns:\n    ``UsedModelsResponse`` with the recency-ordered model list. Empty\n    when the user has no qualifying inferences.\n\nRaises:\n    HTTPException: 503 when the aggregate fails; the cause is logged\n        server-side rather than returned to the caller.","operationId":"get_used_models_v1_analytics_used_models_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of distinct models to return, ordered by most-recently-used first.","default":50,"title":"Limit"},"description":"Maximum number of distinct models to return, ordered by most-recently-used first."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsedModelsResponse"}}}},"503":{"description":"Used models dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/quality-timeseries":{"get":{"tags":["analytics"],"summary":"Get Quality Timeseries","description":"Return bucketed LLM-as-Judge quality metrics for a model.\n\nEach bucket reports the average ``llmaj_score``, the fraction of\njudged inferences with ``llmaj_verdict = 'pass'``, and the count of\nscored inferences. ``model_id`` is resolved against ``training_jobs``\nto determine whether to filter ``inferences`` by ``project_id``,\n``training_job_id``, or ``model_id`` (raw base traffic).\n\nArgs:\n    model_id: Training-job UUID or base catalog id.\n    interval: ``date_trunc`` bucket size.\n    since: Inclusive start of the window.\n    until: Exclusive end of the window.\n    auth: Authentication result carrying the user id used to scope\n        every aggregate.\n\nReturns:\n    ``QualityTimeSeriesResponse`` with descending buckets. An empty\n    ``series`` is returned when no inference rows match.\n\nRaises:\n    HTTPException: 400 when the resolved window is empty; 503 when the\n        bucketed read fails, with the cause logged server-side rather\n        than returned to the caller.","operationId":"get_quality_timeseries_v1_analytics_quality_timeseries_get","parameters":[{"name":"model_id","in":"query","required":true,"schema":{"type":"string","description":"Training-job UUID (task model) or base catalog id (e.g. 'meta-llama/Llama-3-8B').","title":"Model Id"},"description":"Training-job UUID (task model) or base catalog id (e.g. 'meta-llama/Llama-3-8B')."},{"name":"interval","in":"query","required":false,"schema":{"enum":["day","week"],"type":"string","description":"Bucket size used for ``date_trunc``.","default":"day","title":"Interval"},"description":"Bucket size used for ``date_trunc``."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive start of the window (UTC). Defaults to 90 days ago.","title":"Since"},"description":"Inclusive start of the window (UTC). Defaults to 90 days ago."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive end of the window (UTC). Defaults to now.","title":"Until"},"description":"Exclusive end of the window (UTC). Defaults to now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityTimeSeriesResponse"}}}},"400":{"description":"Invalid time window."},"503":{"description":"Quality timeseries dependency is temporarily unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-agents/{agent_type}/runs/{run_ref_id}/billing/agent-turn":{"post":{"tags":["sandbox-agents"],"summary":"Report Keyed Agent Turn Billing","description":"Accept a legacy LLM turn self-report from a keyed sandbox-script agent.\n\nOlder sandbox images may still call this once per LangChain\n``on_chat_model_end`` event. Brain now bills brokered sandbox LLM\ncalls from server-observed ``/v1/messages`` usage, so this endpoint\nverifies auth and dedups the report but does not create a\n``requests`` row from the sandbox payload.\n\nFresh accepted compatibility reports return ``request_id=None`` and\n``billed=False``. Replays return the cached compatibility result\nwith ``billed=False``.\n\nArgs:\n    agent_type: Which keyed agent fired the call. Validated by\n        :data:`KeyedAgentType` — unknown values 422 rather than\n        accepting an untagged category.\n    run_ref_id: Client-generated UUID identifying the run /\n        conversation (typically the LangGraph ``thread_id``).\n        Used as part of the dedup namespace.\n    body: Token usage payload (turn_id, provider, model,\n        input_tokens, output_tokens). These fields are retained for\n        compatibility metrics and are not trusted for billing.\n    auth: Authenticated user (from ``X-API-Key``). Their UUID\n        identifies the sandbox owner.\n\nRaises:\n    HTTPException 500: Anything unexpected. The sandbox MUST\n        retry on 5xx (the shared\n        :class:`SandboxBillingClient` already does once).","operationId":"report_keyed_agent_turn_billing_v1_sandbox_agents__agent_type__runs__run_ref_id__billing_agent_turn_post","parameters":[{"name":"agent_type","in":"path","required":true,"schema":{"const":"data_engine","type":"string","title":"Agent Type"}},{"name":"run_ref_id","in":"path","required":true,"schema":{"type":"string","title":"Run Ref Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTurnBillingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTurnBillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clustering/run":{"post":{"tags":["clustering"],"summary":"Run Clustering","description":"Reject the retired manual clustering agent endpoint.\n\nNothing replaces it: ENG-6381 retired the clustering product, so there is\nno successor endpoint to name.\n\nArgs:\n    request: FastAPI request (required by rate limiter).\n    auth: Authenticated user.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"run_clustering_clustering_run_post","responses":{"410":{"description":"Legacy manual clustering agent is retired.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"type":"string","title":"Message"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"type":{"type":"string","title":"Type"}},"type":"object","required":["message","type","param","code"],"title":"Error"}},"type":"object","required":["error"],"title":"OpenAIError","description":"OpenAI error envelope returned for Brain HTTP failures. Replaces FastAPI's default `{detail: string}` body."}}}}},"deprecated":true}},"/huggingface/oauth-state":{"post":{"tags":["huggingface"],"summary":"Create Huggingface Oauth State","description":"Reject the retired OAuth-state endpoint.\n\nReturns:\n    A 410 response.","operationId":"create_huggingface_oauth_state_huggingface_oauth_state_post","responses":{"410":{"description":"HuggingFace account connection is retired.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"}},"type":"object","required":["detail"]}}}}},"deprecated":true,"security":[]}},"/huggingface/disconnect":{"post":{"tags":["huggingface"],"summary":"Disconnect Huggingface","description":"Reject the retired disconnect endpoint.\n\nReturns:\n    A 410 response.","operationId":"disconnect_huggingface_huggingface_disconnect_post","responses":{"410":{"description":"HuggingFace account connection is retired.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"}},"type":"object","required":["detail"]}}}}},"deprecated":true,"security":[]}},"/custom-enums":{"get":{"tags":["custom-enums"],"summary":"List Custom Enums","description":"Reject the retired custom-enums list endpoint.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"list_custom_enums_custom_enums_get","responses":{"410":{"description":"Custom enums are retired.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"}},"type":"object","required":["detail"]}}}}},"deprecated":true,"security":[]},"post":{"tags":["custom-enums"],"summary":"Create Custom Enum","description":"Reject the retired custom-enum creation endpoint.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"create_custom_enum_custom_enums_post","responses":{"410":{"description":"Custom enums are retired.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"}},"type":"object","required":["detail"]}}}}},"deprecated":true,"security":[]}},"/custom-enums/{enum_id}":{"get":{"tags":["custom-enums"],"summary":"Get Custom Enum","description":"Reject the retired custom-enum detail endpoint.\n\nArgs:\n    enum_id: Identifier from the path; unused.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"get_custom_enum_custom_enums__enum_id__get","deprecated":true,"parameters":[{"name":"enum_id","in":"path","required":true,"schema":{"type":"string","title":"Enum Id"}}],"responses":{"410":{"description":"Custom enums are retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]},"patch":{"tags":["custom-enums"],"summary":"Update Custom Enum","description":"Reject the retired custom-enum update endpoint.\n\nArgs:\n    enum_id: Identifier from the path; unused.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"update_custom_enum_custom_enums__enum_id__patch","deprecated":true,"parameters":[{"name":"enum_id","in":"path","required":true,"schema":{"type":"string","title":"Enum Id"}}],"responses":{"410":{"description":"Custom enums are retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]},"delete":{"tags":["custom-enums"],"summary":"Delete Custom Enum","description":"Reject the retired custom-enum deletion endpoint.\n\nArgs:\n    enum_id: Identifier from the path; unused.\n\nRaises:\n    HTTPException: Always raised with 410 Gone.","operationId":"delete_custom_enum_custom_enums__enum_id__delete","deprecated":true,"parameters":[{"name":"enum_id","in":"path","required":true,"schema":{"type":"string","title":"Enum Id"}}],"responses":{"410":{"description":"Custom enums are retired.","content":{"application/json":{"schema":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/base-models":{"get":{"tags":["model-catalog"],"summary":"List Base Models","description":"Public model catalog — single source of truth for available models.\n\nReturns the union of all provider catalogs. Each model carries\n``supports_training`` and ``supports_inference`` flags derived from\n``catalog_registry``. Use query parameters to filter by capability.\n\nThe ``supports_inference`` flag and filter use\n:func:`supports_inference_runtime`, which unions\n``supports_base_inference`` across every provider entry **that can\nactually serve in this deployment** — its runtime configuration is\npresent *and* its kill switch is on. A finetune-only Fireworks decoder\nstill reports ``True`` when it is bridged through Vercel AI Gateway or\nAWS Bedrock; an Azure-only catalog slug (``claude-sonnet-4-5``) reports\n``True`` only when the brain has the Azure env vars set; a gateway-only\nslug reports ``False`` when that gateway's kill switch is off, since\nthe router would refuse to serve it.\n\nAuthentication is **optional**. Anonymous callers receive the public\ncatalog with all feature-flag-gated entries hidden (their flags\nresolve to ``default_value=False``). Authenticated callers populate\nthe request-scoped identity ContextVars via ``FlexibleAuth`` so\nper-user / per-team / per-email Datadog Remote Config rules can match,\nexposing gated entries (e.g. Gliner-PII, Gliner Guardrails) to users\non a rollout. Bad credentials are silently downgraded to anonymous so\nthis endpoint never returns 401.\n\nCallers in restricted jurisdictions have the matching families hidden from\nthe catalog, mirroring the inference-time 451 so the UI never offers an\nunusable model: sanctioned regions hide foreign frontier families\n(OpenAI/Anthropic/Gemini/Llama) and GDPR regions hide GDPR-restricted\nfamilies (Sakana). The jurisdiction is resolved from both CloudFront's\n``CloudFront-Viewer-Country`` header and the team's verified billing-card\ncountry, so a VPN cannot unhide a model the caller's card jurisdiction bars.\n\nExamples:\n    GET /base-models                          — full catalog\n    GET /base-models?supports_inference=true   — serverless-capable models\n    GET /base-models?supports_training=true    — trainable models\n    GET /base-models?task_type=encoder          — encoder/NER models only\n    GET /base-models?task_type=decoder          — decoder/LLM models only\n    GET /base-models?task_type=embedding        — text embedding models only","operationId":"list_base_models_v1_base_models_get","parameters":[{"name":"supports_training","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter to models that support fine-tuning","title":"Supports Training"},"description":"Filter to models that support fine-tuning"},{"name":"supports_inference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter to models with serverless inference","title":"Supports Inference"},"description":"Filter to models with serverless inference"},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model architecture: 'encoder' (NER/GLiNER), 'decoder' (LLM), or 'embedding' (text embedding)","title":"Task Type"},"description":"Filter by model architecture: 'encoder' (NER/GLiNER), 'decoder' (LLM), or 'embedding' (text embedding)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseModelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/base-models/{model_id}/benchmarks":{"get":{"tags":["model-catalog"],"summary":"Get Base Model Benchmarks","description":"Third-party benchmark figures and axis means for one base model.\n\nArgs:\n    model_id: Canonical catalog model ID.\n    auth: Optional caller identity; benchmarks are public reference data.\n\nReturns:\n    Roster benchmarks grouped by axis, plus the per-axis means.\n\nRaises:\n    HTTPException: 404 when the model is not in the catalog.","operationId":"get_base_model_benchmarks_v1_base_models__model_id__benchmarks_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelBenchmarksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/fine-tuned-models":{"get":{"tags":["models"],"summary":"List Fine Tuned Inventory","description":"List the request team's deployable model inventory with live traffic.\n\nArgs:\n    auth: Authenticated caller; inventory is scoped to the team the\n        request authenticated against -- the active team for a JWT, the\n        key's bound team for an API key (LD16).\n    cursor: Opaque cursor from a previous page.\n    limit: Projects per page.\n\nReturns:\n    One page of projects with their variants and window traffic.\n\nRaises:\n    HTTPException: 400 when the cursor is malformed.","operationId":"list_fine_tuned_inventory_v1_fine_tuned_models_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor from a previous page; omit for the first page.","title":"Cursor"},"description":"Cursor from a previous page; omit for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Projects per page.","default":20,"title":"Limit"},"description":"Projects per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FineTunedInventoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["openai-compat"],"summary":"Chat Completions","description":"OpenAI-compatible chat completions endpoint.\n\nThin shell over :func:`services.inference.adapters.openai_chat.run_chat_completion`.\nThe adapter handles LLM-passthrough vs Fastino-task dispatch, SSE\nrendering with ``<think>...</think>`` folding for reasoning models,\ntool-call deltas, finish-reason mapping, persistence, and error\nmapping. The router keeps only HTTP-shaped concerns: route\ndeclaration, auth, rate limiting.\n\nArgs:\n    body: Validated :class:`ChatCompletionRequest`.\n    request: FastAPI request (forwarded so the adapter can read\n        API-key billing context out of ``request.state`` for\n        streaming responses).\n    auth: Authenticated request context.\n\nReturns:\n    :class:`ChatCompletionResponse` for non-streaming, or a\n    :class:`StreamingResponse` of ``chat.completion.chunk`` SSE\n    events terminated by ``data: [DONE]`` when ``body.stream``\n    is true.","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Chat completion. Returns ``application/json`` (``ChatCompletionResponse``) by default, or ``text/event-stream`` of ``ChatCompletionStreamChunk`` events terminated by ``data: [DONE]`` when ``stream=true``.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}},"text/event-stream":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"chat.completion.chunk"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"properties":{"index":{"type":"integer","title":"Index","default":0},"delta":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"}},"type":"object","title":"ChatCompletionStreamDelta","description":"Incremental delta payload inside a streaming chunk's choice.\n\nThe OpenAI Chat Completions chunk schema (``ChoiceDelta`` in the\nopenai-python SDK) defines ``content``, ``function_call``,\n``refusal``, ``role``, and ``tool_calls`` — there is no spec slot\nfor reasoning. Fastino can expose the de facto industry extension\n(vLLM, DeepSeek, LiteLLM) on\n``reasoning_content`` for callers that opt in with existing\n``reasoning`` visibility controls (``exclude=false`` or\n``display=summarized``), mirroring Fastino's\nown input path at\n:func:`services.inference.providers.openai_compat.OpenAICompatProvider._chat_delta_to_events`\n(which already reads ``delta.reasoning_content`` from those same\nupstream providers). Stock OpenAI-compatible consumers receive no\nreasoning field by default so model scratchpad text is not rendered\nas assistant output. The renderer contract lives on\n:class:`~services.inference.adapters.openai_chat._ChatStreamRenderer`."},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"}},"type":"object","title":"ChatCompletionStreamChoice","description":"One choice slot inside a streaming chunk."},"type":"array","title":"Choices"},"usage":{"anyOf":[{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"prompt_tokens_details":{"anyOf":[{"properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens","default":0}},"type":"object","title":"PromptTokensDetails","description":"Per-input-class breakdown for OpenAI-shape usage payloads.\n\nMirrors OpenAI's ``prompt_tokens_details`` block and the industry\ncache-creation extension so clients reading\n``usage.prompt_tokens_details.cached_tokens`` /\n``cache_write_tokens`` keep working when Fastino relays a cache-aware\nupstream response. Both counts are subsets of ``prompt_tokens`` on the\nwire — that's the upstream contract Fastino relays faithfully.\n\nAttributes:\n    cached_tokens: Input tokens served from the upstream prompt cache\n        (cache read).\n    cache_write_tokens: Input tokens written into the upstream prompt\n        cache (cache creation). ``0`` for upstreams that bill writes\n        as plain input (OpenAI, vLLM)."},{"type":"null"}]}},"type":"object","title":"ChatCompletionUsage","description":"Token usage statistics.\n\n``prompt_tokens`` follows the upstream wire contract — *includes* every\ninput class (non-cached, cache read, and cache write). The breakdown is\nexposed under ``prompt_tokens_details`` so consumers can attribute the\ncached-read and cache-write subsets. Cache-aware billing on the brain\nside reads the canonical ``InferenceUsage`` fields directly, not this\nwire payload."},{"type":"null"}]},"x_fastino":{"anyOf":[{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id"}},"type":"object","title":"FastinoExtension","description":"Fastino-specific extension fields appended to OpenAI-compatible responses.\n\nOpenAI's API contract reserves the unprefixed top-level keys (``id``,\n``choices``, ``usage``, …); custom data must live under a clearly\nnamespaced key. ``x_fastino`` is that key.\n\nAttributes:\n    inference_id: The Fastino-side identifier of the persisted\n        ``inferences`` row associated with this completion. Present\n        when persistence is enabled (``extra_body.store == True``)\n        and the row was successfully recorded; ``None`` for ad-hoc\n        requests that opted out of persistence. The frontend uses\n        this to poll ``GET /inferences/{id}`` for asynchronous\n        judge results without coupling the inference response\n        latency to the judge."},{"type":"null"}]}},"type":"object","required":["model","choices"],"title":"ChatCompletionStreamChunk","description":"OpenAI-compatible chat completion streaming chunk.\n\n    One of these is JSON-serialized into each ``data: {...}\n\n`` SSE event\n    emitted by the chat completions handler when ``stream=true``. The stream\n    is terminated by a literal ``data: [DONE]\n\n`` sentinel that does not\n    follow this schema.\n\n    ``x_fastino`` mirrors the field on :class:`ChatCompletionResponse` and is\n    populated only on the terminal chunk (the one carrying ``finish_reason``)\n    when persistence ran. Intermediate chunks set it to ``None`` so SDK\n    clients can wait for the terminal frame before reading the id rather\n    than racing the early text deltas.\n    "},"example":"data: {\"id\":\"chatcmpl-abc\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-ai/DeepSeek-V4-Flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hi\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-abc\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-ai/DeepSeek-V4-Flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":1,\"completion_tokens\":1,\"total_tokens\":2}}\n\ndata: [DONE]\n\n"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/responses":{"post":{"tags":["openai-compat"],"summary":"Responses","description":"OpenAI-compatible Responses API endpoint.\n\nThin shell over :func:`services.inference.adapters.openai_responses.run_responses`.\nThe adapter handles input-item to chat-message translation,\nLLM-passthrough vs Fastino-task dispatch, SSE rendering,\ntool-call serialisation, persistence, and error mapping. The\nrouter keeps only HTTP-shaped concerns: route declaration, auth,\nrate limiting.\n\nArgs:\n    body: Validated :class:`ResponsesRequest`.\n    request: FastAPI request (forwarded so the adapter can read\n        API-key billing context out of ``request.state`` for\n        streaming responses).\n    response: Response whose headers carry the deprecation and\n        router-tip signals.\n    auth: Authenticated request context.\n\nReturns:\n    JSON response payload or :class:`StreamingResponse` SSE stream\n    in Responses API format.","operationId":"responses_responses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/responses":{"post":{"tags":["openai-compat"],"summary":"Responses","description":"OpenAI-compatible Responses API endpoint.\n\nThin shell over :func:`services.inference.adapters.openai_responses.run_responses`.\nThe adapter handles input-item to chat-message translation,\nLLM-passthrough vs Fastino-task dispatch, SSE rendering,\ntool-call serialisation, persistence, and error mapping. The\nrouter keeps only HTTP-shaped concerns: route declaration, auth,\nrate limiting.\n\nArgs:\n    body: Validated :class:`ResponsesRequest`.\n    request: FastAPI request (forwarded so the adapter can read\n        API-key billing context out of ``request.state`` for\n        streaming responses).\n    response: Response whose headers carry the deprecation and\n        router-tip signals.\n    auth: Authenticated request context.\n\nReturns:\n    JSON response payload or :class:`StreamingResponse` SSE stream\n    in Responses API format.","operationId":"responses_v1_responses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams":{"get":{"tags":["teams"],"summary":"List Teams","description":"List the caller's teams.\n\nArgs:\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Team list and count.","operationId":"list_teams_v1_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamListResponse"}}}}}},"post":{"tags":["teams"],"summary":"Create Team","description":"Create a team.\n\nArgs:\n    request: Team creation payload.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Created team.","operationId":"create_team_v1_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}":{"get":{"tags":["teams"],"summary":"Get Team","description":"Get a member-visible team.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Team response.","operationId":"get_team_v1_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["teams"],"summary":"Update Team","description":"Update a team.\n\nArgs:\n    team_id: Team identifier.\n    request: Team update payload.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Updated team.\n\nRaises:\n    HTTPException: If no update field is provided.","operationId":"update_team_v1_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Delete Team","description":"Delete a team.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Deletion confirmation.","operationId":"delete_team_v1_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/members":{"get":{"tags":["teams"],"summary":"List Team Members","description":"List team members.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Member list and count.","operationId":"list_team_members_v1_teams__team_id__members_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMembersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/members/{user_id}":{"patch":{"tags":["teams"],"summary":"Update Member Role","description":"Update a member role.\n\nArgs:\n    team_id: Team identifier.\n    user_id: Target member identifier.\n    request: Role update payload.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Updated member.","operationId":"update_member_role_v1_teams__team_id__members__user_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Remove Team Member","description":"Remove a team member.\n\nArgs:\n    team_id: Team identifier.\n    user_id: Target member identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Removal confirmation.","operationId":"remove_team_member_v1_teams__team_id__members__user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberRemoveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/owned-resources":{"get":{"tags":["teams"],"summary":"List Owned Resources","description":"List resources the caller must resolve before leaving.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n\nReturns:\n    Owned resources and sole-member state.\n\nRaises:\n    HTTPException: If the caller is not a member.","operationId":"list_owned_resources_v1_teams__team_id__owned_resources_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedResourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/leave":{"post":{"tags":["teams"],"summary":"Leave Team","description":"Leave a team.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    body: Optional resource transfer plan.\n\nReturns:\n    Leave-team outcome.\n\nRaises:\n    HTTPException: If resources or transfer targets are unresolved.","operationId":"leave_team_v1_teams__team_id__leave_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LeaveTeamRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamLeaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/transfer-ownership/{new_owner_id}":{"post":{"tags":["teams"],"summary":"Transfer Ownership","description":"Transfer team ownership.\n\nArgs:\n    team_id: Team identifier.\n    new_owner_id: New owner identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Transfer confirmation.","operationId":"transfer_ownership_v1_teams__team_id__transfer_ownership__new_owner_id__post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"new_owner_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"New Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Transfer Ownership V1 Teams  Team Id  Transfer Ownership  New Owner Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/invitations":{"get":{"tags":["teams"],"summary":"List Team Invitations","description":"List team invitations.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Invitations and count.","operationId":"list_team_invitations_v1_teams__team_id__invitations_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["teams"],"summary":"Invite Member","description":"Invite a team member.\n\nArgs:\n    team_id: Team identifier.\n    request: Invitation payload.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Created invitation.","operationId":"invite_member_v1_teams__team_id__invitations_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/invitations/{invitation_id}":{"delete":{"tags":["teams"],"summary":"Cancel Invitation","description":"Cancel a team invitation.\n\nArgs:\n    team_id: Team identifier.\n    invitation_id: Invitation identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Cancellation confirmation.","operationId":"cancel_invitation_v1_teams__team_id__invitations__invitation_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Invitation V1 Teams  Team Id  Invitations  Invitation Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/settings":{"patch":{"tags":["teams"],"summary":"Update Team Settings","description":"Update team settings.\n\nArgs:\n    team_id: Team identifier.\n    settings: Validated settings payload.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Update confirmation.","operationId":"update_team_settings_v1_teams__team_id__settings_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Team Settings V1 Teams  Team Id  Settings Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/members/mfa-status":{"get":{"tags":["teams"],"summary":"Get Members Mfa Status","description":"Get team member MFA status.\n\nArgs:\n    team_id: Team identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Member MFA statuses.","operationId":"get_members_mfa_status_v1_teams__team_id__members_mfa_status_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMembersMfaStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/pending":{"get":{"tags":["team-invitations"],"summary":"Get Pending Invitations","description":"List the caller's pending invitations.\n\nArgs:\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Pending invitations and count.\n\nRaises:\n    HTTPException: If the identity email is unavailable.","operationId":"get_pending_invitations_v1_invitations_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingInvitationsResponse"}}}}}}},"/v1/invitations/{invitation_id}":{"get":{"tags":["team-invitations"],"summary":"Get Invitation","description":"Get an invitation for the email deep-link landing page.\n\nArgs:\n    invitation_id: Invitation identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Invitation details, scoped to the caller's email address.\n\nRaises:\n    HTTPException: If the identity email is unavailable.","operationId":"get_invitation_v1_invitations__invitation_id__get","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/{invitation_id}/accept":{"post":{"tags":["team-invitations"],"summary":"Accept Invitation","description":"Accept an invitation.\n\nArgs:\n    invitation_id: Invitation identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Acceptance confirmation.\n\nRaises:\n    HTTPException: If the identity email is unavailable.","operationId":"accept_invitation_v1_invitations__invitation_id__accept_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/{invitation_id}/decline":{"post":{"tags":["team-invitations"],"summary":"Decline Invitation","description":"Decline an invitation.\n\nArgs:\n    invitation_id: Invitation identifier.\n    auth: Authenticated caller.\n    service: Team service.\n\nReturns:\n    Decline confirmation.\n\nRaises:\n    HTTPException: If the identity email is unavailable.","operationId":"decline_invitation_v1_invitations__invitation_id__decline_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"tags":["anthropic-compat"],"summary":"Messages","description":"Anthropic-compatible messages endpoint.\n\nThin shell over :func:`services.inference.adapters.anthropic_messages.run_messages`.\nThe adapter handles content-block translation, LLM-passthrough vs\nFastino-task dispatch, SSE rendering, persistence, and error\nmapping. The router keeps only HTTP-shaped concerns: route\ndeclaration, auth, rate limiting.\n\nArgs:\n    body: Validated :class:`AnthropicMessagesRequest`.\n    request: FastAPI request (forwarded so the adapter can read\n        API-key billing context out of ``request.state`` for\n        streaming responses).\n    auth: Authenticated request context.\n\nReturns:\n    :class:`AnthropicMessagesResponse` for non-streaming, or a\n    :class:`StreamingResponse` of Anthropic SSE events when\n    ``body.stream`` is true.","operationId":"messages_v1_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessagesRequest"}}},"required":true},"responses":{"200":{"description":"Non-streaming Anthropic Messages response. When the request sets ``stream=true`` the server emits an Anthropic-shaped SSE event stream over ``text/event-stream`` instead; that stream shape is documented in the Anthropic Messages API reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"description":"OpenAI envelope unless the request sends `anthropic-version`, in which case the Anthropic `{type: error, error: {type, message}}` body is returned.","oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/AnthropicError"}]}}}}}}},"/v1/models":{"get":{"tags":["anthropic-compat"],"summary":"List Models","description":"List available Anthropic-compatible models.\n\nAuthentication is optional. Anonymous callers receive the public runtime\ncatalog; authenticated callers also receive their user-scoped decoder\nfine-tunes.\n\nArgs:\n    limit: Maximum number of models to return. Omit to return the full\n        assembled catalog.\n    before_id: Cursor for paginating backward.\n    after_id: Cursor for paginating forward.\n    client_version: Optional Codex/OpenAI client version hint.\n    auth: Optional authentication result.\n\nReturns:\n    Combined Anthropic-compatible and Codex/OpenAI-compatible model catalog.\n\nRaises:\n    HTTPException: If both cursor parameters are provided.","operationId":"list_models_v1_models_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"}},{"name":"after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Id"}},{"name":"client_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/models/{model_id}":{"get":{"tags":["anthropic-compat"],"summary":"Retrieve Model","description":"Retrieve metadata for a single Anthropic-compatible model.\n\nThe ``:path`` converter is required because our runtime catalog ships model\nIDs containing slashes (e.g. ``qwen/qwen3-8b``). Without it, FastAPI's default\nsingle-segment path param matcher 404s every such request — breaking\n``openai.OpenAI(...).models.retrieve(\"qwen/qwen3-8b\")`` and\n``anthropic.Anthropic(...).models.retrieve(\"qwen/qwen3-8b\")`` for real SDK\nusers.\n\nArgs:\n    model_id: Requested model identifier (may contain ``/``).\n    auth: Authentication result.\n\nReturns:\n    Combined Anthropic-compatible and Codex/OpenAI-compatible model metadata.\n\nRaises:\n    HTTPException: If the model ID is not in the runtime catalog.","operationId":"retrieve_model_v1_models__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_id}/mcp":{"post":{"tags":["mcp"],"summary":"Mcp Endpoint","description":"Per-team MCP resource-server entry point.\n\nVerifies the caller's token, enforces tenancy (a confirmed\n``(principal, client, team)`` binding plus live membership; C1b), then\ndispatches the JSON-RPC message. Only the Legacy handshake is answered today\n(empty tool surface). The team is taken from the path alone -- no\ncaller-supplied field can redirect it.\n\nArgs:\n    team_id: The team the caller is acting for (from the path).\n    request: The incoming HTTP request.\n\nReturns:\n    A 401 challenge when the token is missing or invalid; a 403 when the\n    caller is not bound to the team; a JSON-RPC response for a request; or\n    an empty ``202`` for a notification.","operationId":"mcp_endpoint_v1_teams__team_id__mcp_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","description":"Return the API health status.\n\nArgs:\n    request: FastAPI request (used to consult ``app.state.is_shutting_down``).\n\nReturns:\n    JSON payload describing overall status, with optional build metadata\n    outside production.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/version":{"get":{"summary":"Version","description":"Return backend version/build metadata for authenticated callers.\n\nArgs:\n    _auth: Injected authenticated caller identity (unused).\n\nReturns:\n    JSON payload with ``build`` metadata and a server timestamp.","operationId":"version_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/db_health":{"get":{"summary":"Db Health","description":"Return the API + database health status (unauthenticated).\n\nProbes the DB with a lean unscoped ``SELECT 1`` through the ORM engine\nso health mirrors the actual request path (ENG-4793). Unscoped is\ncorrect here: ``/db_health`` is unauthenticated and has no team scope,\nso ``get_session()`` would raise; a raw round-trip also avoids pinning\nany table's schema and keeps the probe cheap.\n\nArgs:\n    request: FastAPI request (used to consult ``app.state.is_shutting_down``).\n\nReturns:\n    JSON payload describing overall + database status.","operationId":"db_health_db_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/":{"get":{"summary":"Root","description":"Return public API metadata (root/discovery endpoint).\n\nReturns:\n    JSON payload with version identity and discovery URLs.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}}},"components":{"schemas":{"APIKeyInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"api_key_last_digits":{"type":"string","title":"Api Key Last Digits"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"usage_tokens":{"type":"integer","title":"Usage Tokens"},"usage_cost":{"type":"number","title":"Usage Cost"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["id","name","api_key_last_digits","created_at","usage_tokens","usage_cost","request_count"],"title":"APIKeyInfo","description":"Information about an API key."},"ActiveWorkBlockerResponse":{"properties":{"kind":{"type":"string","title":"Kind","description":"Blocking resource type: training_job or experiment."},"resource_id":{"type":"string","title":"Resource Id","description":"Identifier of the blocking row."},"label":{"type":"string","title":"Label","description":"Customer-safe name of the blocking row."},"detail":{"type":"string","title":"Detail","description":"Why it blocks the transition."}},"type":"object","required":["kind","resource_id","label","detail"],"title":"ActiveWorkBlockerResponse","description":"One unfinished item preventing a milestone from closing."},"ActivityEvent":{"properties":{"id":{"type":"string","title":"Id","description":"Unique activity event identifier"},"type":{"type":"string","enum":["project","dataset","model","evaluation","deployment"],"title":"Type","description":"Activity event type"},"name":{"type":"string","title":"Name","description":"Human-readable activity name"},"action":{"type":"string","enum":["created","created_version","updated","deleted","deleted_version","promoted","rolled_back"],"title":"Action","description":"Action performed (created, updated, deleted, etc.)","default":"created"},"item_id":{"type":"string","title":"Item Id","description":"ID of the related item"},"created_by":{"type":"string","title":"Created By","description":"Display name of the creator"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the activity occurred"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Optional project ID associated with the activity"},"evidence":{"anyOf":[{"$ref":"#/components/schemas/PromotionEvidence"},{"type":"null"}],"description":"Promotion evidence; present only on deployment promote/rollback rows"}},"type":"object","required":["id","type","name","item_id","created_by","created_at"],"title":"ActivityEvent","description":"Represents a single user activity event."},"ActivityLogResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the request succeeded"},"events":{"items":{"$ref":"#/components/schemas/ActivityEvent"},"type":"array","title":"Events","description":"Activity events in reverse-chronological order"},"count":{"type":"integer","title":"Count","description":"Number of events returned"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more events are available beyond the current page","default":false}},"type":"object","required":["success","count"],"title":"ActivityLogResponse","description":"Response payload for activity log requests."},"AdapterTimeseriesEntry":{"properties":{"training_job":{"$ref":"#/components/schemas/TrainingJobResponse"},"latest_eval":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResponse"},{"type":"null"}]},"all_evals":{"items":{"$ref":"#/components/schemas/EvaluationResponse"},"type":"array","title":"All Evals"}},"type":"object","required":["training_job","all_evals"],"title":"AdapterTimeseriesEntry","description":"One training job together with all of its completed evaluations.\n\nAttributes:\n    training_job: Full training-job metadata.\n    latest_eval: Most-recent completed evaluation for this adapter.\n        None when the adapter has never been evaluated.\n    all_evals: Every evaluation (any status) associated with this adapter,\n        ordered by creation date descending."},"AdaptiveCadence":{"type":"string","enum":["off","daily","weekly","monthly"],"title":"AdaptiveCadence","description":"User-facing cadence preset for autonomous adaptive finetuning runs."},"AgentTurnBillingRequest":{"properties":{"turn_id":{"type":"string","maxLength":128,"minLength":1,"title":"Turn Id","description":"Sandbox-supplied dedup key for this turn (UUID recommended)."},"provider":{"type":"string","maxLength":64,"minLength":1,"title":"Provider"},"model":{"type":"string","maxLength":128,"minLength":1,"title":"Model"},"input_tokens":{"type":"integer","minimum":0.0,"title":"Input Tokens","default":0},"output_tokens":{"type":"integer","minimum":0.0,"title":"Output Tokens","default":0}},"type":"object","required":["turn_id","provider","model"],"title":"AgentTurnBillingRequest","description":"Legacy per-turn LLM token usage compatibility report from a sandbox.\n\nOlder sandbox images may still POST one of these requests per LLM\nturn. Brain now bills brokered sandbox calls from server-observed\n``/v1/messages`` usage, so the sandbox-supplied provider/model/token\nfields are accepted for compatibility and rollout metrics but are\nnot trusted for billing.\n\nThe ``turn_id`` is generated client-side (typically the LangChain\ncallback's ``run_id`` UUID) and is the dedup key. Replays of the\nsame workload/turn pair return the cached compatibility result."},"AgentTurnBillingResponse":{"properties":{"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Normally null for accepted compatibility self-reports; may contain a cached legacy requests row id for old dedup entries."},"billed":{"type":"boolean","title":"Billed","description":"False for accepted compatibility self-reports; brokered sandbox LLM usage is billed server-side on /v1/messages."}},"type":"object","required":["billed"],"title":"AgentTurnBillingResponse","description":"Response from the legacy per-turn self-report endpoint.\n\n``billed`` is ``False`` for accepted compatibility self-reports\nbecause Brain's brokered ``/v1/messages`` path is the billing source\nof truth. ``request_id`` is normally ``None`` for newly accepted\nreports, but may contain a cached legacy id for old dedup entries."},"AnthropicMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ContentBlock"},{"$ref":"#/components/schemas/ImageContentBlock"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"}},"type":"object","required":["role","content"],"title":"AnthropicMessage","description":"A message in Anthropic format.\n\n``content`` accepts a plain string *or* a list of content blocks to support\nboth simple text and structured tool_use / tool_result payloads."},"AnthropicMessagesRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/AnthropicMessage"},"type":"array","minItems":1,"title":"Messages"},"max_tokens":{"type":"integer","maximum":131072.0,"minimum":1.0,"title":"Max Tokens","default":1024},"temperature":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"top_k":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Top K"},"stream":{"type":"boolean","title":"Stream","default":false},"store":{"type":"boolean","title":"Store","default":true},"system":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/SystemContentBlock"},"type":"array"},{"type":"null"}],"title":"System"},"cache_control":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache Control"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"},"stop_sequences":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop Sequences"},"output_config":{"anyOf":[{"$ref":"#/components/schemas/AnthropicOutputConfig"},{"type":"null"}]},"speed":{"anyOf":[{"type":"string","enum":["standard","fast"]},{"type":"null"}],"title":"Speed","description":"Anthropic inference speed mode. ``\"fast\"`` opts into high output-tokens-per-second inference on supported models (e.g. the latest Opus). Fastino forwards this only to the native Anthropic upstream (with the required ``fast-mode`` beta header); Bedrock and gateway routes ignore it."},"thinking":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Thinking","description":"Opt-in Anthropic-style extended-thinking controls. Fastino does not enable thinking by default; send the Anthropic-native object: {'type': 'enabled', 'budget_tokens': N, 'display'?: 'summarized'|'omitted'} for manual mode, {'type': 'adaptive', 'effort'?: tier, 'display'?: ...} for adaptive mode (required on Opus 4.7+ / Mythos, recommended on Opus 4.6 / Sonnet 4.6), or {'type': 'disabled'} to turn thinking off on models that have it on by default. Fastino canonicalizes this into InferenceRequest.reasoning at the adapter boundary so the request routes correctly whether the upstream is Anthropic native, Bedrock, or the Vercel AI Gateway (which advertises the normalized ``reasoning`` field rather than ``thinking``). On models that require adaptive mode, Fastino auto-upgrades manual configs (mapping ``budget_tokens`` to the nearest ``effort`` tier) rather than letting the upstream return a 400."},"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema","description":"Schema for the Fastino encoder. **Deprecated when supplied as a flat list** of entity labels; use the unified dict shape instead. Deprecated submissions emit ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers."},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"**Deprecated.** Legacy task hint. The unified schema disambiguates the task automatically. Submitting this field emits ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers."},"include_confidence":{"type":"boolean","title":"Include Confidence","default":true},"include_spans":{"type":"boolean","title":"Include Spans","default":true}},"type":"object","required":["model","messages"],"title":"AnthropicMessagesRequest","description":"Anthropic Messages API request format."},"AnthropicMessagesResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"message"},"role":{"type":"string","title":"Role","default":"assistant"},"content":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Content"},"model":{"type":"string","title":"Model"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Reason","default":"end_turn"},"stop_sequence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Sequence"},"usage":{"$ref":"#/components/schemas/AnthropicUsage"},"fastino_inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fastino Inference Id"}},"type":"object","required":["id","content","model","usage"],"title":"AnthropicMessagesResponse","description":"Anthropic Messages API response format.\n\n``fastino_inference_id`` is a Fastino-only extension: the\n``inferences.id`` of the persisted row backing this completion. It mirrors\nthe ``x_fastino.inference_id`` field on the OpenAI-compatible chat\ncompletion response so frontend playground clients can use the same\npoll-``GET /inferences/{id}``-for-judge-results round-trip on either\nsurface. ``None`` when persistence didn't run (e.g. ``store=false``)."},"AnthropicOutputConfig":{"properties":{"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort"},"task_budget":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Task Budget"},"format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Format"}},"additionalProperties":true,"type":"object","title":"AnthropicOutputConfig","description":"Anthropic output configuration passed through supported providers."},"AnthropicUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","default":0},"cache_read_input_tokens":{"type":"integer","title":"Cache Read Input Tokens","default":0},"cache_creation_input_tokens":{"type":"integer","title":"Cache Creation Input Tokens","default":0},"thinking_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thinking Tokens"},"server_tool_use":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Server Tool Use"},"service_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Tier"},"speed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed"}},"type":"object","title":"AnthropicUsage","description":"Usage statistics in Anthropic format.\n\n``input_tokens`` is Anthropic's non-cached input contract — cached\nreads / writes live in the separate ``cache_read_input_tokens`` /\n``cache_creation_input_tokens`` fields. Fastino mirrors the same\nshape on the ``/v1/messages`` wire so SDK consumers reading the\nfields directly stay correct."},"AsyncGlinerRequest":{"properties":{"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"**Deprecated** legacy task hint. One of: 'extract_entities', 'classify_text', 'extract_json', 'schema'. Omit for the unified GLiNER2 path. Submitting a legacy task value still succeeds but the response carries ``Deprecation: true`` and a ``Sunset`` header."},"text":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Text"},"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Schema","description":"Extraction schema. The flat ``list[str]`` of entity labels is deprecated; use the unified dict shape (``entities`` / ``classifications`` / ``structures`` / ``relations``) for forward compatibility. Deprecated submissions emit ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers."},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold","default":0.5},"include_confidence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Confidence","default":true},"include_spans":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Spans","default":true},"format_results":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Format Results","default":true}},"type":"object","required":["text","schema"],"title":"AsyncGlinerRequest","description":"Request for async GLiNER-2 processing."},"AsyncGlinerResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"estimated_tokens":{"type":"integer","title":"Estimated Tokens"},"message":{"type":"string","title":"Message"}},"type":"object","required":["job_id","status","estimated_tokens","message"],"title":"AsyncGlinerResponse","description":"Response from async job submission."},"AttachedResourceRef":{"properties":{"id":{"type":"string","title":"Id","description":"Type-prefixed resource id used by the frontend chip rendering. For example ``dataset:abc-123`` or ``model:tj-99``."},"name":{"type":"string","title":"Name","description":"Human-readable label rendered inside the chip."},"type":{"type":"string","title":"Type","description":"Resource type slug — one of ``dataset``, ``model``, ``evaluation``, or ``base-model``."}},"type":"object","required":["id","name","type"],"title":"AttachedResourceRef","description":"Pydantic mirror of the frontend ``AttachedResourceRef`` type.\n\nThe chip id carries a type prefix (``dataset:abc-123``) so the frontend\ncan render the correct icon without a second lookup. ``type`` repeats\nthe slug for clients that only consume one of the two fields."},"AugmentationOperation":{"properties":{"type":{"type":"string","enum":["remove_duplicates","remove_outliers","balance"],"title":"Type","description":"Type of augmentation operation"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether this operation is enabled","default":true}},"type":"object","required":["type"],"title":"AugmentationOperation","description":"Configuration for a single augmentation operation."},"BaseModelResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Model ID (canonical routing key)"},"label":{"type":"string","title":"Label","description":"Human-friendly display name"},"description":{"type":"string","title":"Description","description":"Short description shown in UI"},"task_type":{"type":"string","title":"Task Type","description":"Model architecture: 'decoder' for LLMs, 'encoder' for GLiNER/NER models, or 'embedding' for text embedding models"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window","description":"Maximum context length in tokens (min across providers)"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens","description":"Maximum input tokens advertised for this model. Matches the conservative provider context window used by this catalog row."},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum output tokens advertised for decoder generation. Null when no provider publishes a separate output cap."},"release_month":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Month","description":"Official release month shown in the public catalog, formatted as 'Mon YYYY' (for example, 'Apr 2026'). Null when unknown."},"input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Price Per Million","description":"Upper-bound USD list price per million input tokens (highest provider COGS multiplied by the inference margin). Caps what BillableEvent.record can charge for model_inference; actual charges may be lower when the request is routed to a cheaper provider."},"output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Price Per Million","description":"Upper-bound USD list price per million output tokens (highest provider COGS multiplied by the inference margin). Caps what BillableEvent.record can charge for model_inference; actual charges may be lower when the request is routed to a cheaper provider."},"cache_read_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Read Price Per Million","description":"Effective upper-bound USD list price per million input tokens served from the provider's prompt cache (Anthropic cache_read_input_tokens, Bedrock cacheReadInputTokens, OpenAI prompt_tokens_details.cached_tokens). Always the rate BillableEvent.record actually charges: when a provider does not differentiate cache-read pricing this equals ``input_price_per_million`` rather than ``None``, so customers compute ``cache_read_tokens × cache_read_price`` without special-casing. ``None`` only when the model has no pricing at all (cache reads are still tracked for analytics)."},"cache_write_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Price Per Million","description":"Effective upper-bound USD list price per million input tokens written into the provider's prompt cache (Anthropic cache_creation_input_tokens, Bedrock cacheWriteInputTokens). Providers that charge cache writes at the plain input rate (OpenAI, Modal) report ``input_price_per_million`` here rather than ``None``, matching what BillableEvent.record charges. ``None`` only when the model has no pricing at all."},"supports_inference":{"type":"boolean","title":"Supports Inference","description":"Whether this model supports serverless base-model inference (pre-deployed, no startup latency, pay-per-token). This is model-level availability only and does not guarantee every upstream model-card feature; hosted encoder features are encoder_features."},"is_chat_model":{"type":"boolean","title":"Is Chat Model","description":"Whether the model has a chat template suitable for /v1/chat/completions. Pretrained/base models lack a chat template and produce gibberish on chat-formatted messages. The public catalog has no servable non-chat decoder."},"supports_on_demand_inference":{"type":"boolean","title":"Supports On Demand Inference","description":"Whether this model supports on-demand LoRA deployment (dedicated GPU serving a fine-tuned adapter)."},"supports_image_input":{"type":"boolean","title":"Supports Image Input","description":"Whether this model accepts image (vision) content blocks on the compat inference APIs. True when any provider catalog entry for this model sets supports_vision=True. Output is always text — no model supports image output.","default":false},"supports_zdr":{"type":"boolean","title":"Supports Zdr","description":"Whether this model has a Zero-Data-Retention-compliant route. Informational — shown on the models page. Fails closed: defaults False and is True only when the model is explicitly catalogued as ZDR-supported, so the claim is never over-reported.","default":false},"supports_training":{"type":"boolean","title":"Supports Training","description":"Whether this model supports fine-tuning on any provider. When False the model is available for inference only."},"encoder_features":{"anyOf":[{"items":{"type":"string","enum":["entities","classifications","structures","relations","records","span_attributes","constrained_classification","joint_ie","wide_span_entities"]},"type":"array"},{"type":"null"}],"title":"Encoder Features","description":"Hosted encoder features for this model. Null for decoder and embedding models. The value is a subset of a fixed vocabulary, so a feature missing from the list is not hosted."},"default_training_batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Training Batch Size","description":"Catalog default training batch size for this model. Null when the model is not trainable on a provider that publishes batch defaults. Clients creating training jobs should prefer this value (or omit ``batch_size``) over hard-coding a global default."},"max_training_batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Training Batch Size","description":"Safe maximum training batch size for this model on the training provider. Null when unset or the model is not trainable. Requests above this maximum are rejected (except the legacy explicit Field-default clamp documented on TrainingJobCreate)."},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License","description":"SPDX license identifier or short name for the model weights (e.g. 'Apache-2.0', 'Llama-3-Community', 'Proprietary'). Display string only — null when unknown."},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier","description":"Capability tier: 'open' (open weights), 'fast' (latency-optimized), 'enterprise' (proprietary commercial API), or 'research' (research preview). Null when unclassified."},"deprecated":{"type":"boolean","title":"Deprecated","description":"Whether the model is deprecated and discouraged for new work. Deprecated models still serve requests until their sunset date; sunset (removed) models are omitted from this catalog entirely.","default":false},"replacement_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement Model","description":"Canonical ID of the successor model to migrate to, when the model is deprecated and a replacement is declared."},"deprecation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Deprecation Date","description":"Date the model entered (or will enter) the deprecated state. Null when the model is not on a deprecation path."},"sunset_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Sunset Date","description":"Date the model is removed and requests begin to be rejected. Null when no removal is scheduled."},"coding_benchmark_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coding Benchmark Mean","description":"Mean of the model's curated coding benchmarks on a 0-100 scale. Null when the model publishes fewer than two of them, since one benchmark is a data point rather than an average."},"agentic_benchmark_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agentic Benchmark Mean","description":"Mean of the model's curated agentic benchmarks on a 0-100 scale. Null when the model publishes fewer than two of them."},"coding_benchmarks":{"items":{"$ref":"#/components/schemas/BenchmarkComponentScore"},"type":"array","title":"Coding Benchmarks","description":"The figures averaged into coding_benchmark_mean, strongest first, so a listing can show its working without a request per model. Empty when there is no mean to explain. See GET /base-models/{id}/benchmarks for provenance and ranks."},"agentic_benchmarks":{"items":{"$ref":"#/components/schemas/BenchmarkComponentScore"},"type":"array","title":"Agentic Benchmarks","description":"The figures averaged into agentic_benchmark_mean, strongest first."},"market_input_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Input Price Per Million","description":"Median USD per 1M input tokens across the third-party providers serving this model, for comparison against our own rate. Median rather than mean so one outlying listing cannot move it. Never used to bill. Null when nobody publishes a rate for it."},"market_output_price_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Output Price Per Million","description":"Median USD per 1M output tokens across third-party providers."},"market_price_provider_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Price Provider Count","description":"Provider count behind the better-evidenced side: the larger of the input and output counts, which is a lower bound on how many providers list the model rather than a distinct count of them. The two sides can be drawn from different subsets, since a few providers publish an input rate only, so neither side alone is the total. Present so a lone quote can be told apart from a real market. Null when there are no market rates."}},"type":"object","required":["id","label","description","task_type","supports_inference","is_chat_model","supports_on_demand_inference","supports_training"],"title":"BaseModelResponse","description":"Display metadata for a single base model in the public catalog."},"BaseModelsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/BaseModelResponse"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"BaseModelsResponse","description":"Response listing all base models in the public catalog."},"BenchmarkAxisSummary":{"properties":{"axis":{"type":"string","enum":["coding","agentic"],"title":"Axis","description":"Which axis the mean summarises"},"mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mean","description":"Mean of the benchmarks, 0-100"},"count":{"type":"integer","title":"Count","description":"Benchmarks behind the mean"}},"type":"object","required":["axis","count"],"title":"BenchmarkAxisSummary","description":"An axis mean and the evidence behind it."},"BenchmarkComponentScore":{"properties":{"benchmark_id":{"type":"string","title":"Benchmark Id","description":"Upstream benchmark slug"},"label":{"type":"string","title":"Label","description":"Display name for the benchmark"},"score":{"type":"number","title":"Score","description":"Normalized score on a 0-100 scale"}},"type":"object","required":["benchmark_id","label","score"],"title":"BenchmarkComponentScore","description":"One benchmark figure behind a published axis mean.\n\nDeliberately thinner than ``schemas.model_benchmarks.BenchmarkScore``: this\none is repeated for every model in the catalogue listing, and provenance,\nranks and timestamps belong on the detail endpoint where there is room to\npresent them."},"BenchmarkScore":{"properties":{"benchmark_id":{"type":"string","title":"Benchmark Id","description":"Upstream benchmark slug"},"label":{"type":"string","title":"Label","description":"Display name for the benchmark"},"axis":{"type":"string","enum":["coding","agentic"],"title":"Axis","description":"Which axis the benchmark measures"},"score":{"type":"number","title":"Score","description":"Normalized score on a 0-100 scale"},"self_reported":{"type":"boolean","title":"Self Reported","description":"Whether the vendor reported the figure"},"verified":{"type":"boolean","title":"Verified","description":"Whether the source independently verified it"},"caveat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caveat","description":"Qualification to show beside the figure"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank","description":"Position on this benchmark upstream"},"rank_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank Total","description":"How many models reported this benchmark upstream"},"scored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored At","description":"When the figure was published"}},"type":"object","required":["benchmark_id","label","axis","score","self_reported","verified"],"title":"BenchmarkScore","description":"One third-party benchmark figure for a model."},"BillingAddress":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","title":"BillingAddress","description":"Billing address on file for a payment method, as held by Stripe.\n\nAll fields are optional because Stripe only returns the components the\ncustomer provided. The UI renders this read-only; it is never edited in\nFastino (changes are made in the Stripe customer portal)."},"BillingPortalResponse":{"properties":{"url":{"type":"string","title":"Url","description":"Stripe Billing Portal session URL"}},"type":"object","required":["url"],"title":"BillingPortalResponse","description":"Response containing a Stripe Billing Portal URL."},"BillingStatusResponse":{"properties":{"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"has_payment_method":{"type":"boolean","title":"Has Payment Method"},"card_verified":{"type":"boolean","title":"Card Verified","default":false},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"payment_methods":{"items":{"$ref":"#/components/schemas/PaymentMethodInfo"},"type":"array","title":"Payment Methods"},"billing_activated":{"type":"boolean","title":"Billing Activated","description":"Authoritative inference-admission result computed by the server. Frontend refusal surfaces must consume this field rather than re-deriving it from payment or balance details.","default":false},"spendable_credit_balance":{"type":"number","title":"Spendable Credit Balance","description":"Authoritative wallet balance the inference gate will honour, in credits. Frontend balance surfaces MUST consume this field so the display matches the wallet the request path spends.","default":0.0},"exact_credit_balance":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Exact Credit Balance","description":"The team's exact ledger balance — the most recent monthly snapshot plus every entry since it — in dollars, not credits. ``Decimal``, not ``float``, matching the ledger EDD's invariant 8 ('Money is Decimal end to end... No float on any path that touches a balance') and the sibling ``LedgerBalanceResponse.total`` this value is sourced from (``billing/ledger/balance.py::read_exact_balance``). This is the EDD's 'display, disputes, and reconciliation' number, distinct from ``spendable_credit_balance`` on purpose: that field mirrors the aggregator cache admission reads, which can lag a real top-up or debit by up to one fold cycle (ENG-7048). Frontend balance surfaces that render a dollar figure to the user MUST prefer this field; surfaces that decide whether a spend would be admitted (the zero-balance CTA, funding gates) MUST keep reading ``spendable_credit_balance`` so the decision never disagrees with the gate. ``None`` only when the caller has no active team."},"overdraft_available":{"type":"boolean","title":"Overdraft Available","description":"Whether the admission gate will still serve this team with the visible balance at or below zero, because auto-refill is on and the overdraft floor has headroom left. Surfaces exist to stop the UI announcing 'out of funds' during the seconds between the balance reaching zero and the refill landing, which invites a second manual payment for a top-up already being collected. Computed server-side from the same ``headroom_to_floor`` the request path reads, so the copy cannot drift from the gate.","default":false}},"type":"object","required":["has_payment_method"],"title":"BillingStatusResponse","description":"Response model for billing status."},"Body_create_dataset_version_v1_datasets__name__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Dataset file (JSONL, CSV, or Parquet)"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"File format (jsonl, csv, parquet). Auto-detected if not provided."}},"type":"object","required":["file"],"title":"Body_create_dataset_version_v1_datasets__name__post"},"CarryoverManifestPayload":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Manifest shape version."},"version":{"$ref":"#/components/schemas/ManifestVersionRef"},"training_jobs":{"items":{"$ref":"#/components/schemas/ManifestTrainingJob"},"type":"array","title":"Training Jobs"},"datasets":{"items":{"$ref":"#/components/schemas/ManifestDataset"},"type":"array","title":"Datasets"},"experiments":{"items":{"$ref":"#/components/schemas/ManifestExperiment"},"type":"array","title":"Experiments"},"champion":{"anyOf":[{"$ref":"#/components/schemas/ChampionRef"},{"type":"null"}]}},"type":"object","required":["schema_version","version"],"title":"CarryoverManifestPayload","description":"Deterministic snapshot of a milestone's contents."},"ChampionRef":{"properties":{"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"Fine-tune chosen as champion."},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model","description":"Catalog base model chosen as champion."}},"type":"object","title":"ChampionRef","description":"What a milestone settled on, as exactly one populated target."},"ChampionRequest":{"properties":{"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"Fine-tune to promote."},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model","description":"Catalog base model to promote."},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason","description":"Why this model was chosen."}},"additionalProperties":false,"type":"object","title":"ChampionRequest","description":"Request body for selecting a milestone's champion."},"ChampionResponse":{"properties":{"version":{"$ref":"#/components/schemas/ProjectVersionResponse"},"deployment_id":{"type":"string","title":"Deployment Id","description":"Deployment history record written by this promotion."},"active_model_id":{"type":"string","title":"Active Model Id","description":"Project's live routing pointer after promotion."}},"type":"object","required":["version","deployment_id","active_model_id"],"title":"ChampionResponse","description":"The milestone and routing state after a champion was confirmed."},"ChargeHistoryItem":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["payment_intent","invoice"],"title":"Type"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created":{"type":"integer","title":"Created"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"}},"type":"object","required":["id","type","amount_cents","currency","status","created"],"title":"ChargeHistoryItem","description":"Stripe charge or invoice entry exposed in billing history."},"ChargeHistoryResponse":{"properties":{"charges":{"items":{"$ref":"#/components/schemas/ChargeHistoryItem"},"type":"array","title":"Charges"}},"type":"object","required":["charges"],"title":"ChargeHistoryResponse","description":"Recent Stripe charges and invoices for a team."},"ChatCompletionChoice":{"properties":{"index":{"type":"integer","title":"Index","default":0},"message":{"additionalProperties":true,"type":"object","title":"Message"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"}},"type":"object","title":"ChatCompletionChoice","description":"A single completion choice."},"ChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","minItems":1,"title":"Messages"},"system":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature"},"max_tokens":{"anyOf":[{"type":"integer","maximum":131072.0,"minimum":1.0},{"type":"null"}],"title":"Max Tokens"},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format"},"stop":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Stop"},"stream":{"type":"boolean","title":"Stream","default":false},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers"},"extra_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Body"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning","description":"Opt-in reasoning / extended-thinking controls. Accepts Fastino's normalized shape with keys ``enabled`` (bool), ``max_tokens`` (int, Anthropic-style budget), ``effort`` (one of minimal/low/medium/high/xhigh/max/none, OpenAI-style tier), and ``exclude`` (bool, hide reasoning tokens from the response). ``effort`` and ``max_tokens`` are mutually exclusive. Fastino extensions for Claude routes (Anthropic direct + Bedrock): ``mode`` (manual/adaptive — adaptive lets the model pick thinking depth per request, required on Opus 4.7+) and ``display`` (summarized/omitted — controls whether thinking text streams back; omitted preserves only the signature for multi-turn). On Chat Completions, provider reasoning text is hidden by default and is returned on ``message.reasoning_content`` / ``delta.reasoning_content`` only when the caller explicitly requests visible reasoning with ``exclude=false`` or ``display=summarized``. Fastino canonicalizes this into InferenceRequest.reasoning at the adapter boundary and each provider renders it to its native wire field (Anthropic ``thinking``, OpenAI ``reasoning_effort``, Vercel AI Gateway ``reasoning``). Fastino does not enable reasoning by default."},"store":{"type":"boolean","title":"Store","default":true},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty"},"logit_bias":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Logit Bias"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"tools":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"},"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema","description":"Schema for the Fastino encoder. **Deprecated when supplied as a flat list** of entity labels; use the unified dict shape (``entities`` / ``classifications`` / ``structures`` / ``relations``) instead. Deprecated submissions emit ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers. No record modes (``natural``, ``latent``, ``anchorless``) are hosted. ``mode``, ``anchor``, ``occurrence_policy``, and field ``cardinality`` return 400 unless the model's ``encoder_features`` includes ``records``. Span attributes (``entity_attributes``), constrained classification (``version``, ``tasks``, ``constraints``), and JointIE (``constraints`` without ``tasks`` or ``version``) are not accepted on hosted encoders. Read ``encoder_features`` on ``GET /v1/base-models``."},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"**Deprecated.** Legacy task hint (``extract_entities`` / ``classify_text`` / ``extract_json`` / ``ner`` / ``schema``). The unified schema disambiguates the task automatically so this field is no longer required. Submitting it emits ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers on the response."},"include_confidence":{"type":"boolean","title":"Include Confidence","default":true},"include_spans":{"type":"boolean","title":"Include Spans","default":true},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","description":"Confidence threshold for encoder (GLiNER) predictions.","default":0.5}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","description":"OpenAI-compatible chat completion request."},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"chat.completion"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"$ref":"#/components/schemas/ChatCompletionChoice"},"type":"array","title":"Choices"},"usage":{"$ref":"#/components/schemas/ChatCompletionUsage"},"x_fastino":{"anyOf":[{"$ref":"#/components/schemas/FastinoExtension"},{"type":"null"}]}},"type":"object","required":["model","choices","usage"],"title":"ChatCompletionResponse","description":"OpenAI-compatible chat completion response."},"ChatCompletionUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"prompt_tokens_details":{"anyOf":[{"$ref":"#/components/schemas/PromptTokensDetails"},{"type":"null"}]}},"type":"object","title":"ChatCompletionUsage","description":"Token usage statistics.\n\n``prompt_tokens`` follows the upstream wire contract — *includes* every\ninput class (non-cached, cache read, and cache write). The breakdown is\nexposed under ``prompt_tokens_details`` so consumers can attribute the\ncached-read and cache-write subsets. Cache-aware billing on the brain\nside reads the canonical ``InferenceUsage`` fields directly, not this\nwire payload."},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tool_calls":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content"}},"type":"object","required":["role"],"title":"ChatMessage","description":"A single chat message.\n\n``content`` accepts either a plain string or a list of content blocks\n(e.g. ``[{\"type\": \"text\", ...}, {\"type\": \"image_url\", ...}]``) so that\nmultimodal/vision payloads can pass through to upstream providers."},"ChatMessageCreate":{"properties":{"role":{"type":"string","title":"Role","description":"Message role: 'user', 'assistant', or 'tool'"},"content":{"type":"string","title":"Content","description":"Message content"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"Tool call ID for tool messages"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls made by assistant"}},"type":"object","required":["role","content"],"title":"ChatMessageCreate","description":"Schema for a single chat message."},"ChatMessageResponse":{"properties":{"id":{"type":"string","title":"Id"},"session_id":{"type":"string","title":"Session Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images"},"is_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Error"},"message_index":{"type":"integer","title":"Message Index"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","session_id","role","content","message_index","created_at"],"title":"ChatMessageResponse","description":"Response model for a single chat message."},"ChatSessionCreate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Session title (auto-generated if not provided)"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message","description":"First user message (used for auto-title generation)"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Optional project ID to scope the session to"}},"type":"object","title":"ChatSessionCreate","description":"Request model for creating a chat session."},"ChatSessionDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["success","message","session_id"],"title":"ChatSessionDeleteResponse","description":"Response model for deleting a session."},"ChatSessionListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"sessions":{"items":{"$ref":"#/components/schemas/ChatSessionResponse"},"type":"array","title":"Sessions"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sessions","count","total"],"title":"ChatSessionListResponse","description":"Response model for listing chat sessions."},"ChatSessionMessagesAppend":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessageCreate"},"type":"array","minItems":1,"title":"Messages","description":"Messages to append"}},"type":"object","required":["messages"],"title":"ChatSessionMessagesAppend","description":"Request model for appending messages to a session."},"ChatSessionMessagesAppendResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"session_id":{"type":"string","title":"Session Id"},"messages_added":{"type":"integer","title":"Messages Added"}},"type":"object","required":["session_id","messages_added"],"title":"ChatSessionMessagesAppendResponse","description":"Response model for appending messages."},"ChatSessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"modal_sandbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modal Sandbox Id","description":"Modal sandbox id for the persistent MLE agent runtime, if a sandbox is associated with this session. Surfaced for nightly smoke tests and observability — never used for client routing."},"first_user_attached_resources":{"items":{"$ref":"#/components/schemas/AttachedResourceRef"},"type":"array","title":"First User Attached Resources","description":"Resource chips the user attached to the *first* user message of this session, parsed from its attached-context preamble. Powers the threads-sidebar preview so users can see at a glance what context a thread was anchored on without opening it. Empty when the session has no user messages or none of them carry a preamble."}},"type":"object","required":["id","user_id","title","created_at","updated_at"],"title":"ChatSessionResponse","description":"Response model for a chat session (without messages)."},"ChatSessionUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Title","description":"New title for the session"},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived","description":"Archive status of the session"}},"type":"object","title":"ChatSessionUpdate","description":"Request model for updating a chat session."},"ChatSessionWithMessages":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"modal_sandbox_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modal Sandbox Id","description":"Modal sandbox id for the persistent MLE agent runtime, if a sandbox is associated with this session."},"raw_message_tree_present":{"type":"boolean","title":"Raw Message Tree Present","description":"True when the sandbox runtime has persisted a canonical Anthropic message tree for this session. The tree itself is backend-only state (it includes provider request payloads) so we expose only a presence flag that nightly smoke tests can assert on.","default":false},"first_user_attached_resources":{"items":{"$ref":"#/components/schemas/AttachedResourceRef"},"type":"array","title":"First User Attached Resources","description":"Resource chips the user attached to the *first* user message of this session, parsed from its attached-context preamble. Mirrors the same field on :class:`ChatSessionResponse` so the agent page header can render the chips next to the session title without scanning every message in ``messages``."},"is_turn_active":{"type":"boolean","title":"Is Turn Active","description":"True when an agent turn is still running for this session. A chat reloaded mid-turn renders a working state and withholds new input instead of looking stalled and inviting a duplicate prompt. Says nothing about whether that turn's live output can be watched — ``is_turn_attachable`` is that separate question.","default":false},"is_turn_attachable":{"type":"boolean","title":"Is Turn Attachable","description":"True when the running turn's live output can be rejoined from the replica that served this request, so a WebSocket ``attach`` will relay its frames. False while ``is_turn_active`` is true means a turn is running that cannot be watched from here: it is either streaming on another replica or is a worker-side continuation turn (ENG-6021) started with no client attached, whose output reaches the client only when it lands in the transcript. Either way the client should keep the composer gated and wait for the transcript rather than expect live frames.","default":false},"active_turn_started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Turn Started At","description":"When the in-flight turn started, so the UI can show how long it has been running. Null when no turn is active. May be set while ``is_turn_active`` is false, which means the stamp is too old to be believed and was left behind by a pod that died mid-turn."},"messages":{"items":{"$ref":"#/components/schemas/ChatMessageResponse"},"type":"array","title":"Messages"}},"type":"object","required":["id","user_id","title","created_at","updated_at","messages"],"title":"ChatSessionWithMessages","description":"Response model for a chat session with all messages."},"CheckpointListResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"checkpoints":{"items":{"$ref":"#/components/schemas/CheckpointResponse"},"type":"array","title":"Checkpoints"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["success","checkpoints","count"],"title":"CheckpointListResponse","description":"List of checkpoints response"},"CheckpointResponse":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"epoch":{"type":"integer","title":"Epoch"},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step"},"training_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Training Loss"},"validation_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Loss"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"learning_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Learning Rate"},"gpu_memory_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Memory Used"},"gpu_memory_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Memory Total"},"checkpoint_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Path"},"is_deployable":{"type":"boolean","title":"Is Deployable","default":false},"is_best":{"type":"boolean","title":"Is Best","default":false},"is_final":{"type":"boolean","title":"Is Final","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","job_id","epoch","created_at","updated_at"],"title":"CheckpointResponse","description":"Single checkpoint response"},"ClassBalance":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["label","count"],"title":"ClassBalance"},"ClassifiedExample":{"properties":{"text":{"type":"string","title":"Text","description":"Example text"},"label":{"type":"string","title":"Label","description":"Example label"},"feedback":{"anyOf":[{"type":"string","enum":["positive","negative"]},{"type":"null"}],"title":"Feedback","description":"User feedback: positive (upvote) or negative (downvote)"}},"type":"object","required":["text","label"],"title":"ClassifiedExample","description":"Example with optional user feedback for improving generation."},"CliTelemetryEvent":{"properties":{"event":{"type":"string","title":"Event"},"installation_id":{"type":"string","title":"Installation Id"},"cli_version":{"type":"string","title":"Cli Version"},"os_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Type"},"os_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Platform"},"os_arch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Arch"}},"additionalProperties":true,"type":"object","required":["event","installation_id","cli_version"],"title":"CliTelemetryEvent","description":"CLI telemetry event payload."},"ConstraintRequest":{"properties":{"description":{"type":"string","title":"Description","description":"Constraint description"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices","description":"Optional list of choices for this constraint"},"weights":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Weights","description":"Optional weights for choices (must align with choices length)"},"probability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Probability","description":"Optional probability (0.0-1.0) for this constraint"}},"type":"object","required":["description"],"title":"ConstraintRequest","description":"Constraint request model"},"ContentBlock":{"properties":{"type":{"type":"string","title":"Type","default":"text"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"tool_use_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Use Id"},"content":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Content"}},"additionalProperties":true,"type":"object","title":"ContentBlock","description":"A content block in Anthropic format.\n\nSupports ``text``, ``tool_use``, and ``tool_result`` block types so that\ntool-calling round-trips work with Anthropic SDK clients."},"CreateAPIKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the API key"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"Optional expiration timestamp (ISO 8601). Sentinel strings like 'never' are accepted and treated as no expiration."},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team to bind the key to. Defaults to the caller's active team when omitted; an explicit value must equal the active team."},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token","description":"hCaptcha response token for bot verification"}},"type":"object","required":["name"],"title":"CreateAPIKeyRequest","description":"Request model for creating an API key.\n\nAttributes:\n    name: User-visible identifier for the key.\n    expires_at: Optional ISO-8601 expiry; sentinels (``\"\"``, ``never``,\n        ``none``, ``null``) collapse to ``None``.\n    team_id: Tenant the key is bound to. ``None`` defaults to the\n        caller's active team; an explicit value must equal it.\n    captcha_token: hCaptcha response token for bot verification."},"CreateAPIKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"api_key_last_digits":{"type":"string","title":"Api Key Last Digits"},"created_at":{"type":"string","title":"Created At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"team_id":{"type":"string","title":"Team Id"},"secret_key":{"type":"string","title":"Secret Key"},"stripe_customer_created":{"type":"boolean","title":"Stripe Customer Created","default":false}},"type":"object","required":["id","name","api_key_last_digits","created_at","team_id","secret_key"],"title":"CreateAPIKeyResponse","description":"Response model for API key creation."},"CreateDataExportResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"UUID of the export job."},"status":{"type":"string","enum":["pending","running","ready","expired","failed"],"title":"Status","description":"Lifecycle state of the export job."}},"type":"object","required":["job_id","status"],"title":"CreateDataExportResponse","description":"Response to ``POST /users/me/data-export``.\n\nAttributes:\n    job_id: UUID of the newly created (or already-running) export job.\n    status: ``pending``, or ``running`` if the worker claimed the row\n        before the response was assembled. Clients poll\n        ``GET /users/me/data-export/{job_id}`` until ``ready`` or\n        ``failed``."},"CreateWeightsDeletionRequestBody":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note","description":"Optional explanation of the request."}},"type":"object","title":"CreateWeightsDeletionRequestBody","description":"Request body for ``POST /users/me/weights-deletion-request``.\n\nAttributes:\n    note: Optional free text explaining the request, stored verbatim and\n        truncated at 4000 characters. Treated as personal data."},"CustomMetricValue":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"number","title":"Value"},"source":{"type":"string","enum":["user","external"],"title":"Source"},"unverified":{"type":"boolean","title":"Unverified","default":true}},"additionalProperties":false,"type":"object","required":["name","value","source"],"title":"CustomMetricValue","description":"One custom metric value co-located with its provenance (ENG-6058).\n\n``EvaluationResponse.metrics`` used to carry bare values while their\nprovenance lived separately in ``config[\"custom_metrics.provenance\"]``,\nso a consumer rendering ``metrics`` alone had no unverified/user-declared\nsignal. This is the per-metric view that fixes that: every entry repeats\nthe same provenance because a single ``metric_provenance`` declaration\ncovers the whole uploaded map, not each metric individually.\n\nArgs:\n    name: Metric name as declared by the caller.\n    value: Numeric metric value.\n    source: Whether a user or an external evaluator computed the value.\n    unverified: True until Fastino recomputes the value with a\n        registered server scorer. No such recomputation path exists yet\n        for task-agnostic custom metrics, so this is always True today."},"DataEditingCheckLabelsRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Dataset name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Dataset version (latest if omitted)"},"text_column":{"type":"string","title":"Text Column","description":"Column containing text"},"label_column":{"type":"string","title":"Label Column","description":"Column containing labels"},"sample_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Sample Size","description":"Number of samples to check","default":10}},"type":"object","required":["dataset_name","text_column","label_column"],"title":"DataEditingCheckLabelsRequest","description":"Request to check labels using AI"},"DataEditingCheckLabelsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"checked_count":{"type":"integer","title":"Checked Count"},"successful_count":{"type":"integer","title":"Successful Count"},"issues_found":{"type":"integer","title":"Issues Found"},"results":{"items":{"$ref":"#/components/schemas/LabelCheckResult"},"type":"array","title":"Results"}},"type":"object","required":["success","dataset_name","dataset_version","checked_count","successful_count","issues_found","results"],"title":"DataEditingCheckLabelsResponse","description":"Response from label checking"},"DataEditingRemoveRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Dataset name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Dataset version (latest if omitted)"},"findings":{"items":{"$ref":"#/components/schemas/PIIFinding"},"type":"array","title":"Findings","description":"Findings to redact/remove"},"redaction_method":{"type":"string","enum":["redact","remove_row","mask"],"title":"Redaction Method","description":"How to handle findings","default":"redact"},"new_dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Dataset Name","description":"Name for the cleaned dataset (auto-generated if omitted)"}},"type":"object","required":["dataset_name","findings"],"title":"DataEditingRemoveRequest","description":"Request to remove PII/PHD from dataset"},"DataEditingRemoveResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"new_dataset_name":{"type":"string","title":"New Dataset Name"},"new_dataset_version":{"type":"string","title":"New Dataset Version"},"rows_affected":{"type":"integer","title":"Rows Affected"},"entities_removed":{"type":"integer","title":"Entities Removed"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","dataset_name","dataset_version","new_dataset_name","new_dataset_version","rows_affected","entities_removed","message"],"title":"DataEditingRemoveResponse","description":"Response after removing PII/PHD"},"DataEditingScanRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Dataset name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Version number (latest if omitted)"},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns","description":"Columns to scan. If not specified, scans all string columns."},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","description":"Detection threshold","default":0.5}},"type":"object","required":["dataset_name"],"title":"DataEditingScanRequest","description":"Request to scan dataset for PII or PHD"},"DataEditingScanResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"scan_type":{"type":"string","enum":["pii","phd"],"title":"Scan Type"},"scan_status":{"type":"string","enum":["scanned","degraded","unavailable"],"title":"Scan Status"},"unscanned_cells":{"type":"integer","title":"Unscanned Cells"},"total_cells":{"type":"integer","title":"Total Cells"},"findings_count":{"type":"integer","title":"Findings Count"},"affected_rows":{"type":"integer","title":"Affected Rows"},"findings":{"items":{"$ref":"#/components/schemas/PIIFinding"},"type":"array","title":"Findings"},"phases":{"anyOf":[{"$ref":"#/components/schemas/ScanPhaseTimings"},{"type":"null"}]}},"type":"object","required":["success","dataset_name","dataset_version","scan_type","scan_status","unscanned_cells","total_cells","findings_count","affected_rows","findings"],"title":"DataEditingScanResponse","description":"Response from PII/PHD scanning.\n\nA scan has two detection mechanisms of very different quality -- the GLiNER\nmodel, and a three-pattern regex (or seven-keyword) sweep for cells the\nmodel could not read -- and until ENG-6775 the response was identical\neither way. `findings_count: 0` therefore could not distinguish \"the model\nread every cell and this dataset is clean\" from \"the model was down, and\nthree regexes found nothing\", which is the ENG-6537 false clean one layer\nup: the sweep stops an *unread* dataset reading as clean, but a sweep that\nalso finds nothing returns to a bare zero.\n\nAttributes:\n    success: Always true; a scan that cannot run reports `scan_status`\n        rather than a non-200, so the heuristic findings are not discarded.\n    dataset_name: The scanned dataset.\n    dataset_version: The scanned version.\n    scan_type: Which scan ran.\n    scan_status: How much of the dataset the model actually read. See\n        `ScanStatus`.\n    unscanned_cells: How many cells the model could not read. Text cells\n        among them were covered by the heuristic sweep instead; non-text\n        cells were covered by nothing, since the sweep skips them while the\n        model would have read them as strings.\n    total_cells: How many cells were in scope, so `unscanned_cells` has a\n        denominator. Without it the magnitude is unrecoverable: 3 of 4 is a\n        failed scan and 3 of 10,000 is a footnote, and both report\n        `unscanned_cells: 3`.\n    findings_count: Total findings, model-derived and heuristic combined.\n    affected_rows: Distinct rows carrying at least one finding.\n    findings: The findings themselves. These do not individually say which\n        mechanism produced them -- that is ENG-6878.\n    phases: Per-phase wall-clock cost, when measured."},"DataEditingSubsampleRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Dataset name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Dataset version (latest if omitted)"},"method":{"type":"string","enum":["random","balanced","stratified"],"title":"Method","description":"Subsampling method","default":"random"},"n":{"type":"integer","minimum":1.0,"title":"N","description":"Target number of rows for the whole result, not per class. For balanced and stratified methods the sample reaches this total whenever the class sizes allow; when they do not, the response carries a warning and the per-class counts achieved."},"label_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Column","description":"Column for balanced/stratified sampling"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"new_dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Dataset Name","description":"Name for the new subsampled dataset (auto-generated if omitted)"}},"type":"object","required":["dataset_name","n"],"title":"DataEditingSubsampleRequest","description":"Request to subsample a dataset"},"DataEditingSubsampleResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"new_dataset_name":{"type":"string","title":"New Dataset Name"},"new_dataset_version":{"type":"string","title":"New Dataset Version"},"original_rows":{"type":"integer","title":"Original Rows"},"new_rows":{"type":"integer","title":"New Rows"},"method":{"type":"string","title":"Method"},"message":{"type":"string","title":"Message"},"rows_per_class":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Rows Per Class","description":"Rows actually drawn per class label, for the balanced and stratified methods. Null for random sampling, which has no class dimension."},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"Set when the result could not match the request — for example a class too small to supply its share. A subsample that under-delivers must say so here rather than returning success with an unchanged dataset."}},"type":"object","required":["success","dataset_name","dataset_version","new_dataset_name","new_dataset_version","original_rows","new_rows","method","message"],"title":"DataEditingSubsampleResponse","description":"Response after subsampling"},"DataExportJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["pending","running","ready","expired","failed"],"title":"Status"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["job_id","status","created_at"],"title":"DataExportJobResponse","description":"Response to ``GET /users/me/data-export/{job_id}``.\n\nAttributes:\n    job_id: UUID of the export job.\n    status: Lifecycle state of the job.\n    download_url: Presigned S3 URL minted fresh on every poll and valid\n        for 15 minutes; set only while ``status == ready``.\n    expires_at: Archive-retention deadline (24h after completion), not\n        the link's lifetime; ``ready`` jobs only.\n    error: Short failure reason; ``failed`` jobs only.\n    created_at: When the job was requested."},"DatasetAnalysisRequest":{"properties":{"task_type":{"type":"string","enum":["ner","classification","generative"],"title":"Task Type","description":"Task type of the dataset"},"task_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Description","description":"Description of the task/domain for context. Helps the LLM quality analysis understand the intended use case."},"dataset":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Dataset","description":"List of data samples (optional if dataset_name provided)"},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name of stored dataset to analyze (optional if dataset provided)"},"dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Version","description":"Dataset version (latest if omitted)"},"analyses":{"items":{"type":"string","enum":["distribution","duplicates","outliers","correlation","splits","errors","diversity"]},"type":"array","title":"Analyses","description":"List of analyses to perform"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Natural language question about the dataset"},"predictions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Predictions","description":"Optional model predictions for error analysis"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Options","description":"Configuration options for analysis. Supported keys: `validation_percentage` (float) for split analysis and `diversity_visualization` (object) with optional `method` ('pca'|'tsne'|'umap'), `dimensions` (2-4), and `tsne_perplexity` (float)."}},"type":"object","required":["task_type","analyses"],"title":"DatasetAnalysisRequest","description":"Request for dataset analysis","example":{"analyses":["distribution","outliers","duplicates","diversity"],"dataset":[{"entities":[["Apple","ORG"],["U.K.","GPE"],["$1 billion","MONEY"]],"text":"Apple is looking at buying U.K. startup for $1 billion"},{"entities":[["San Francisco","GPE"]],"text":"San Francisco considers banning sidewalk delivery robots"}],"options":{"diversity_visualization":{"dimensions":3,"method":"tsne","tsne_perplexity":25}},"query":"What is the distribution of entity types?","task_type":"ner"}},"DatasetAnalysisResponse":{"properties":{"summary":{"additionalProperties":true,"type":"object","title":"Summary"},"distribution":{"anyOf":[{"$ref":"#/components/schemas/DistributionAnalysis"},{"type":"null"}]},"duplicates":{"anyOf":[{"$ref":"#/components/schemas/DuplicatesAnalysis"},{"type":"null"}]},"outliers":{"anyOf":[{"$ref":"#/components/schemas/OutliersAnalysis"},{"type":"null"}]},"correlations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Correlations"},"splits":{"anyOf":[{"$ref":"#/components/schemas/SplitsAnalysis"},{"type":"null"}]},"errors":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Errors"},"diversity":{"anyOf":[{"$ref":"#/components/schemas/DiversityAnalysis"},{"type":"null"}]},"natural_language_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Natural Language Response"}},"type":"object","required":["summary"],"title":"DatasetAnalysisResponse","description":"Response containing analysis results"},"DatasetAugmentationRequest":{"properties":{"task_type":{"type":"string","enum":["ner","classification","custom"],"title":"Task Type","description":"Task type of the dataset"},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name of stored dataset to augment"},"dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Version","description":"Dataset version (latest if omitted)"},"dataset":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Dataset","description":"Inline dataset to augment (if dataset_name not provided)"},"operations":{"items":{"$ref":"#/components/schemas/AugmentationOperation"},"type":"array","title":"Operations","description":"List of augmentation operations to perform"},"target_distribution":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Target Distribution","description":"Target class/entity distribution as percentages (must sum to 1.0)"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for synthetic sample generation"},"new_dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Dataset Name","description":"Name for the new augmented dataset (required if update_in_place=False)"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Labels for generation (required if balance operation used)"},"update_in_place":{"type":"boolean","title":"Update In Place","description":"If True, creates new version with same name and soft-deletes old version","default":false}},"type":"object","required":["task_type","operations"],"title":"DatasetAugmentationRequest","description":"Request for dataset augmentation.","example":{"dataset_name":"my-reviews-dataset","domain_description":"Customer reviews for e-commerce products","labels":["positive","negative"],"new_dataset_name":"balanced_reviews_v2","operations":[{"enabled":true,"type":"remove_duplicates"},{"enabled":true,"type":"remove_outliers"},{"enabled":true,"type":"balance"}],"target_distribution":{"negative":0.5,"positive":0.5},"task_type":"classification","update_in_place":false}},"DatasetAugmentationResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"original_dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Dataset Name"},"original_dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Dataset Version"},"new_dataset":{"$ref":"#/components/schemas/DatasetResponse"},"modifications":{"$ref":"#/components/schemas/ModificationSummary"},"distribution_comparison":{"items":{"$ref":"#/components/schemas/DistributionComparison"},"type":"array","title":"Distribution Comparison"},"message":{"type":"string","title":"Message"},"updated_in_place":{"type":"boolean","title":"Updated In Place","description":"True if the original dataset was replaced (soft-deleted)","default":false}},"type":"object","required":["success","new_dataset","modifications","distribution_comparison","message"],"title":"DatasetAugmentationResponse","description":"Response containing augmentation results."},"DatasetEvaluationSummary":{"properties":{"evaluation_id":{"type":"string","title":"Evaluation Id"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"f1_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"F1 Score"},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Count"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["evaluation_id"],"title":"DatasetEvaluationSummary","description":"Latest evaluation attached to an evaluation dataset row.\n\nUsed on the Datasets tab to surface the most recent pass-rate / loss\nfor a given evaluation dataset against the model in context."},"DatasetLLMAnalysisRequest":{"properties":{"task_type":{"type":"string","enum":["ner","classification","generative"],"title":"Task Type","description":"Task type of the dataset"},"task_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Description","description":"Description of the task/domain for context. Helps the LLM understand the intended use case."},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"List of label names for the task. If not provided, will be extracted from the dataset."},"dataset":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Dataset","description":"List of data samples (optional if dataset_name provided)"},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name of stored dataset to analyze (optional if dataset provided)"},"dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Version","description":"Dataset version (latest if omitted)"}},"type":"object","required":["task_type"],"title":"DatasetLLMAnalysisRequest","description":"Request for LLM-only dataset quality analysis.\n\nUse this endpoint for the slow LLM-based diversity/quality analysis\nseparately from the fast statistical analysis endpoint.","example":{"dataset_name":"my-ner-dataset","labels":["ORG","LOC","PERSON"],"task_description":"Extract company names and locations from news articles","task_type":"ner"}},"DatasetListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"datasets":{"items":{"$ref":"#/components/schemas/DatasetResponse"},"type":"array","title":"Datasets"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["datasets","count"],"title":"DatasetListResponse","description":"Response model for listing datasets."},"DatasetMergeRequest":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/DatasetMergeSource"},"type":"array","minItems":2,"title":"Sources","description":"Datasets to merge (at least 2)"},"output_name":{"type":"string","title":"Output Name","description":"Name for the merged dataset"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project to assign the merged dataset to"}},"type":"object","required":["sources","output_name"],"title":"DatasetMergeRequest","description":"Request to merge multiple datasets into one."},"DatasetMergeResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"version":{"type":"string","title":"Version"},"sample_size":{"type":"integer","title":"Sample Size","description":"Total rows in the merged dataset"},"source_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Source Counts","description":"Number of rows contributed by each source dataset"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","dataset_name","version","sample_size","source_counts","message"],"title":"DatasetMergeResponse","description":"Response from a merge operation."},"DatasetMergeSource":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Name of the dataset"},"version":{"type":"string","title":"Version","description":"Version to merge (default: latest)","default":"latest"}},"type":"object","required":["dataset_name"],"title":"DatasetMergeSource","description":"A dataset to include in a merge operation."},"DatasetMetadataUpdate":{"properties":{"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"New name for the dataset"},"dataset_type":{"anyOf":[{"type":"string","enum":["ner","classification","custom","decoder"]},{"type":"null"}],"title":"Dataset Type","description":"New type for the dataset"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project ID to assign this dataset to (use empty string to unassign)."}},"type":"object","title":"DatasetMetadataUpdate","description":"Request model for the legacy ``PUT /felix/datasets/{name}/{version}`` endpoint.\n\nConvention divergence: this legacy endpoint accepts ``project_id=\"\"``\n(empty string) to mean \"unassign\". The newer canonical endpoint\n``PATCH /felix/datasets/{dataset_id}`` (see :class:`DatasetUpdate`) uses\n``project_id=null`` for the same intent. Both schemas coexist because\n``frontend/src/app/utils/assign-project-handler.ts`` still drives the\nlegacy PUT path with ``projectId || ''``. New callers should prefer the\nPATCH endpoint and the ``null`` convention."},"DatasetProvenance":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"method":{"type":"string","enum":["synthesize","upload","external","grow","augment","version","merge","auto_relabel","manual_relabel","evaluation_suite","agent_curated"],"title":"Method"},"sources":{"items":{"$ref":"#/components/schemas/DatasetProvenanceSource"},"type":"array","title":"Sources"},"fallback":{"anyOf":[{"$ref":"#/components/schemas/DatasetProvenanceFallback"},{"type":"null"}]},"source_dataset_ids":{"items":{"type":"string"},"type":"array","title":"Source Dataset Ids"},"parent_dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Dataset Id"},"transform_context":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"generator_context":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"synthesis_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synthesis Session Id"}},"additionalProperties":false,"type":"object","required":["method"],"title":"DatasetProvenance","description":"Record how a dataset was created and which inputs produced it.\n\nAttributes:\n    schema_version: Contract version for future migrations.\n    method: Canonical dataset generation type.\n    sources: External source descriptors.\n    fallback: Fallback reason and attempt count, when one was required.\n    source_dataset_ids: Dataset inputs combined or transformed.\n    parent_dataset_id: Immediate dataset version or transform parent.\n    transform_context: Bounded details about a transform.\n    generator_context: Bounded generator configuration or agent context.\n    synthesis_session_id: Synthesis-log session shared with the dataset row."},"DatasetProvenanceFallback":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason"},"attempts":{"type":"integer","minimum":1.0,"title":"Attempts"}},"additionalProperties":false,"type":"object","required":["reason","attempts"],"title":"DatasetProvenanceFallback","description":"Describe a fallback used after the preferred source or strategy failed.\n\nAttributes:\n    reason: Why the preferred path could not be used.\n    attempts: Number of attempts made before the fallback succeeded."},"DatasetProvenanceSource":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"retrieved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retrieved At"},"raw_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Hash"}},"additionalProperties":false,"type":"object","title":"DatasetProvenanceSource","description":"Describe one external source used to create a dataset.\n\nAttributes:\n    url: Stable source URL when known.\n    revision: Branch, commit, tag, or dataset revision when known.\n    license: Source license when known.\n    retrieved_at: Time at which the source was retrieved.\n    raw_hash: Digest of the retrieved source bytes when known."},"DatasetQueryRequest":{"properties":{"dataset_name":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_\\-./]+$","title":"Dataset Name","description":"Name of the dataset to query"},"version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Version","description":"Dataset version (latest if omitted)"},"code":{"type":"string","maxLength":4096,"title":"Code","description":"Polars code to execute. Access data as 'df'. Assign output to 'result'."},"timeout":{"type":"integer","maximum":120.0,"minimum":1.0,"title":"Timeout","description":"Execution timeout in seconds (1-120)","default":30},"max_rows_returned":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Max Rows Returned","description":"Maximum rows to return in result (1-100000)","default":10000}},"type":"object","required":["dataset_name","code"],"title":"DatasetQueryRequest","description":"Request to execute Polars code on a dataset server-side.\n\nThe code has access to:\n- `df`: Polars DataFrame containing the dataset\n- `pl`: Polars module for expressions (pl.col, pl.lit, pl.when, etc.)\n\nAssign result to `result` variable to return it.\nMulti-statement code with intermediate variables is supported.\nControl-flow (for/while/if-stmt), comprehensions, f-strings, and\nprintf-style %-formatting (e.g. '%d' % x) are not available; use\nternary expressions (A if cond else B) for conditional results.","examples":[{"code":"result = df.group_by('label').count()","dataset_name":"my-sentiment-dataset"},{"code":"filtered = df.filter(pl.col('score') > 0.5)\ngrouped = filtered.group_by('label').agg([\n    pl.col('score').mean().alias('avg_score'),\n    pl.col('score').count().alias('count')\n])\nresult = grouped.sort('avg_score', descending=True)","dataset_name":"my-dataset"}]},"DatasetQueryResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"result":{"title":"Result","description":"JSON-serializable query result"},"result_type":{"type":"string","enum":["dataframe","series","scalar","string","list","object","none"],"title":"Result Type","description":"Type of the returned result"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count","description":"Number of rows if result is a DataFrame"},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns","description":"Column names if result is a DataFrame"},"execution_time_ms":{"type":"integer","title":"Execution Time Ms","description":"Execution time in milliseconds"},"truncated":{"type":"boolean","title":"Truncated","description":"Whether result was truncated due to size limits","default":false},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","dataset_name","dataset_version","result","result_type","execution_time_ms","message"],"title":"DatasetQueryResponse","description":"Response from dataset query execution."},"DatasetReference":{"properties":{"name":{"type":"string","title":"Name","description":"Dataset name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Version (latest if omitted)"}},"type":"object","required":["name"],"title":"DatasetReference","description":"Reference to a dataset by name and optional version"},"DatasetResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_path":{"type":"string","title":"Dataset Path"},"dataset_type":{"type":"string","title":"Dataset Type"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"},"sample_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Size"},"train_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Train Ratio","description":"Train split ratio for this dataset version. Left-to-right split with no shuffle; validation is the tail."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"version_number":{"type":"string","title":"Version Number","default":"1"},"root_dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Dataset Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema"},"schema_warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Schema Warnings"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"annotation_status":{"anyOf":[{"type":"string","enum":["none","in_progress","completed"]},{"type":"null"}],"title":"Annotation Status"},"annotation_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotation Config"},"annotation_progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotation Progress"},"status":{"anyOf":[{"type":"string","enum":["initialized","uploading","converting","validating","ready","failed","generating","queued"]},{"type":"null"}],"title":"Status","description":"Dataset status: initialized/uploading/converting/validating/ready/failed/generating/queued","default":"ready"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error","description":"Error message if status is failed"},"type":{"type":"string","title":"Type","description":"Dataset purpose tag: 'training', 'evaluation', or 'benchmark'","default":"training"},"visibility":{"type":"string","title":"Visibility","description":"Dataset visibility: 'private' or 'public'","default":"private"},"is_competition":{"type":"boolean","title":"Is Competition","description":"Whether this dataset is a competition benchmark","default":false},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Label names (entity types for NER, class labels for classification)"},"generation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generation Type","description":"Canonical operation that created this dataset version."},"provenance":{"anyOf":[{"$ref":"#/components/schemas/DatasetProvenance"},{"type":"null"}],"description":"Versioned durable lineage that survives sandbox delete. Omitted on rows created before the provenance contract existed. generator_context is redacted of user-authored task text before it leaves the API; see FREE_TEXT_FIELDS."},"is_seed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Seed","description":"Whether this dataset is a seed dataset (small set for review before full expansion)","default":false},"synthesis_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synthesis Session Id","description":"UUID of the synthesis log session for this dataset, used to restore creation workflow on resume"},"column_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Column Mapping","description":"Column mapping from original to standard names"}},"type":"object","required":["id","user_id","dataset_name","dataset_path","dataset_type","created_at","updated_at"],"title":"DatasetResponse","description":"Response model for a single dataset."},"DatasetRowsDeleteRequest":{"properties":{"row_indices":{"anyOf":[{"items":{"type":"integer"},"type":"array","minItems":1},{"type":"null"}],"title":"Row Indices","description":"Zero-based indices of rows to remove"},"fingerprints":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Fingerprints","description":"Content fingerprints of rows to remove (position-independent)"}},"type":"object","title":"DatasetRowsDeleteRequest","description":"Request to delete specific rows from a dataset.\n\nExactly one of ``row_indices`` or ``fingerprints`` must be provided.\nFingerprint-based deletion is preferred because it is immune to\ndataset mutations between analysis and delete."},"DatasetRowsDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"dataset_name":{"type":"string","title":"Dataset Name"},"version":{"type":"string","title":"Version"},"rows_deleted":{"type":"integer","title":"Rows Deleted"},"rows_remaining":{"type":"integer","title":"Rows Remaining"},"new_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Version","description":"New version number if a new version was created"}},"type":"object","required":["dataset_name","version","rows_deleted","rows_remaining"],"title":"DatasetRowsDeleteResponse","description":"Response after deleting dataset rows."},"DatasetRowsUpdateRequest":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/RowUpdate"},"type":"array","minItems":1,"title":"Updates","description":"List of row updates to apply"}},"type":"object","required":["updates"],"title":"DatasetRowsUpdateRequest","description":"Request to update specific rows in a dataset."},"DatasetRowsUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"dataset_name":{"type":"string","title":"Dataset Name"},"version":{"type":"string","title":"Version"},"rows_updated":{"type":"integer","title":"Rows Updated"},"new_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Version","description":"New version number if a new version was created"},"validation_warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Validation Warnings"}},"type":"object","required":["dataset_name","version","rows_updated"],"title":"DatasetRowsUpdateResponse","description":"Response after updating dataset rows."},"DatasetTypeUpdateResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"}},"type":"object","required":["id","type"],"title":"DatasetTypeUpdateResponse","description":"Response after updating a dataset's use type.\n\nAttributes:\n    id: The dataset UUID.\n    type: The updated use type value."},"DatasetUpdate":{"properties":{"project_id":{"anyOf":[{"type":"string","pattern":"(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}],"title":"Project Id","description":"Project ID (UUID) to assign the dataset to, or null to unassign."}},"additionalProperties":false,"type":"object","title":"DatasetUpdate","description":"Thin PATCH body for ``PATCH /felix/datasets/{dataset_id}``.\n\nExposes only ``project_id``. Send ``null`` to unassign the dataset from its\ncurrent project. Unknown fields are rejected with HTTP 422.\n\nConvention divergence: the legacy :class:`DatasetMetadataUpdate` (used by\n``PUT /felix/datasets/{name}/{version}``) accepts ``project_id=\"\"`` for\n\"unassign\". This PATCH endpoint is the canonical path going forward and\nstandardizes on ``null``. The two schemas coexist while the frontend\nmigrates off the legacy PUT."},"DatasetUploadContentResponse":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id","description":"Dataset ID the bytes were stored against"},"version_number":{"type":"string","title":"Version Number","description":"Version number of that dataset"},"bytes_received":{"type":"integer","title":"Bytes Received","description":"Number of bytes stored"}},"type":"object","required":["dataset_id","version_number","bytes_received"],"title":"DatasetUploadContentResponse","description":"Receipt for raw upload bytes the Brain wrote to S3 for the caller."},"DatasetUploadProcessRequest":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id","description":"Dataset ID from upload/url response (all metadata stored in DB)"}},"type":"object","required":["dataset_id"],"title":"DatasetUploadProcessRequest","description":"Request to process uploaded dataset from S3."},"DatasetUploadUrlRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Name for the dataset"},"dataset_type":{"type":"string","enum":["classification","ner","custom","decoder"],"title":"Dataset Type","description":"Type of dataset","default":"ner"},"format":{"anyOf":[{"type":"string","enum":["jsonl","csv","tsv","parquet","json"]},{"type":"null"}],"title":"Format","description":"File format (auto-detected from filename if not provided)"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"Original filename (used for format detection if format not provided)"},"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema","description":"Expected schema as JSON object (e.g., {\"age\": \"Int64\", \"name\": \"Utf8\"}). Enforces column types during parsing. Valid types: Int8, Int16, Int32, Int64, UInt8-64, Float32, Float64, Utf8, Boolean, Date, Datetime, Time, Duration, Categorical, Binary"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Optional project ID (UUID) to assign this dataset to"},"experiment_id":{"anyOf":[{"type":"string","pattern":"(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}],"title":"Experiment Id","description":"Optional Experiment ID (UUID) the upload was started from. The dataset is linked to it so it appears in that Experiment's Datasets tab (ENG-7109). Ignored when the caller may not access the Experiment."},"type":{"anyOf":[{"type":"string","enum":["training","evaluation","benchmark"]},{"type":"null"}],"title":"Type","description":"Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be trained on or directly accessed).","default":"training"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility","description":"Dataset visibility: 'private' (owner only) or 'public' (anyone can see)","default":"private"},"generation_type":{"anyOf":[{"type":"string","const":"upload"},{"type":"null"}],"title":"Generation Type","description":"Public uploads are always recorded as upload. Other generation methods are assigned by server-owned workflows."},"split_ratio":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Split Ratio","description":"Split ratio when type is 'split', e.g. {'training': 0.8, 'evaluation': 0.2}"},"column_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Column Mapping","description":"Column mapping from source to standard names (e.g., {\"sentence\": \"text\", \"category\": \"label\"}). Valid standard targets: text, label, labels, entities."}},"type":"object","required":["dataset_name"],"title":"DatasetUploadUrlRequest","description":"Request to get presigned URL for dataset upload (bypasses API Gateway limits)."},"DatasetUploadUrlResponse":{"properties":{"presigned_url":{"type":"string","title":"Presigned Url","description":"S3 presigned URL for PUT upload"},"dataset_id":{"type":"string","title":"Dataset Id","description":"Dataset ID for subsequent processing"},"dataset_name":{"type":"string","title":"Dataset Name","description":"Dataset name (for polling status via GET /{name}/{version})"},"version_number":{"type":"string","title":"Version Number","description":"Version number for this dataset"},"expires_in":{"type":"integer","title":"Expires In","description":"URL expiration time in seconds"},"upload_instructions":{"type":"string","title":"Upload Instructions","description":"Instructions for completing the upload","default":"Upload file via HTTP PUT to presigned_url, then call /datasets/upload/process with dataset_id, format, and schema (if applicable)"}},"type":"object","required":["presigned_url","dataset_id","dataset_name","version_number","expires_in"],"title":"DatasetUploadUrlResponse","description":"Response with presigned S3 URL for direct upload."},"DatasetUseTypeUpdate":{"properties":{"type":{"type":"string","enum":["training","evaluation"],"title":"Type","description":"New use type: 'training' or 'evaluation'"}},"type":"object","required":["type"],"title":"DatasetUseTypeUpdate","description":"Request to change whether a dataset is used for training or evaluation.\n\nArgs:\n    type: The new use type for the dataset."},"DatasetVersionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"versions":{"items":{"$ref":"#/components/schemas/DatasetResponse"},"type":"array","title":"Versions"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["success","versions","count"],"title":"DatasetVersionsResponse","description":"List of all versions of a dataset"},"DeleteAPIKeyRequest":{"properties":{"key_id":{"type":"string","format":"uuid","title":"Key Id","description":"ID of the API key to delete"}},"type":"object","required":["key_id"],"title":"DeleteAPIKeyRequest","description":"Request model for deleting an API key."},"DeleteAccountRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"feedback_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Text"},"ownership_transfers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Ownership Transfers"}},"type":"object","title":"DeleteAccountRequest","description":"Request for account deletion with optional feedback and ownership transfers.\n\nCombines cancellation feedback with team ownership transfers so\nthe entire delete-account flow is a single atomic request.\n\nAttributes:\n    reason: Selected cancellation reason (e.g. 'Pricing').\n    feedback_text: Free-form feedback from the user.\n    ownership_transfers: Mapping of team_id to new_owner_id for\n        teams the user owns that still have other members."},"DeleteTrainingJobResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"DeleteTrainingJobResponse","description":"Response model for deleting a training job"},"DeleteUserResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code"}},"type":"object","required":["status","message"],"title":"DeleteUserResponse","description":"Response for user deletion."},"DeployCheckpointResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"job_id":{"type":"string","title":"Job Id"},"checkpoint_id":{"type":"string","title":"Checkpoint Id"},"mme_path":{"type":"string","title":"Mme Path"}},"type":"object","required":["success","message","job_id","checkpoint_id","mme_path"],"title":"DeployCheckpointResponse","description":"Response after deploying a checkpoint"},"DeployabilityReason":{"type":"string","enum":["project_mismatch","job_deleted","job_incomplete","job_failed","job_cancelled","missing_artifact","provider_incompatible"],"title":"DeployabilityReason","description":"Why a training job may not be promoted to serve traffic."},"DeploymentCreate":{"properties":{"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"UUID of the training job to deploy"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model","description":"HuggingFace base model ID to deploy (e.g. 'fastino/gliner2-base-v1'). Mutually exclusive with training_job_id."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional reason for this deployment"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"[Deprecated] Project ID. Provide in the URL path (/projects/{project_id}/deployments) instead."},"selection_evaluation_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Evaluation Run Id","description":"UUID of the Evaluation Suite run this promotion was decided on. Recorded as evidence; ignored unless it names a run on this project."},"recipe_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Fingerprint","description":"Digest of the promoted candidate's training recipe. Recorded as evidence, never checked."}},"type":"object","title":"DeploymentCreate","description":"Request body for deploying a model to a project.\n\nExactly one of ``training_job_id`` or ``base_model`` must be supplied.\n\nAttributes:\n    training_job_id: UUID of a completed training job to activate.\n    base_model: HuggingFace base model ID to activate (e.g.\n        ``fastino/gliner2-base-v1``). Used when rolling back from a\n        fine-tuned checkpoint to the original base model.\n    reason: Optional human-readable reason for the swap.\n    project_id: Project ID -- used only by the deprecated\n        /felix/deployments endpoint. For new clients, supply project_id\n        in the URL path instead.\n    selection_evaluation_run_id: Evaluation Suite run this promotion was decided on.\n    recipe_fingerprint: Digest of the promoted candidate's recipe.\n\nThe two evidence fields are the caller's declared basis for the swap, not a\ngate: they are recorded, never checked, and omitting them cannot stop a\npromotion. Only the agent knows which of several evaluations it weighed, so\nthe alternative -- Brain guessing -- would record a fact nobody asserted.\nProvenance (which Experiment, which plan revision) is deliberately absent\nhere: the service resolves that from the caller's own run key so it cannot\nbe misstated. See ``services.deployments.promotion_evidence``."},"DeploymentHistoryResponse":{"properties":{"deployments":{"items":{"$ref":"#/components/schemas/DeploymentResponse"},"type":"array","title":"Deployments"}},"type":"object","required":["deployments"],"title":"DeploymentHistoryResponse","description":"Paginated list of deployment history records.\n\nAttributes:\n    deployments: Ordered list of deployment records (newest first)."},"DeploymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"deployed_by":{"type":"string","title":"Deployed By"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"deployed_at":{"type":"string","format":"date-time","title":"Deployed At"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id"},"finetune_plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finetune Plan Id"},"selection_evaluation_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Evaluation Run Id"},"recipe_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Fingerprint"}},"type":"object","required":["id","project_id","deployed_by","reason","deployed_at"],"title":"DeploymentResponse","description":"A single deployment history record.\n\nA deployment targets exactly one of ``training_job_id`` or\n``base_model``: the trained adapter that was activated, or the base\ncatalog model that was activated when no adapter is in use.\n\nAttributes:\n    id: Unique deployment record ID.\n    project_id: The project whose active model was changed.\n    training_job_id: Training job that was deployed (training-job shape).\n    base_model: HuggingFace base model ID that was deployed (base-model shape).\n    deployed_by: User ID who triggered the deployment.\n    reason: Optional reason for the swap.\n    deployed_at: When the swap occurred.\n    experiment_id: Experiment whose agent promoted, when one did.\n    finetune_plan_id: Plan revision that authorised the promotion.\n    selection_evaluation_run_id: Evaluation Suite run the promotion was decided on.\n    recipe_fingerprint: Digest of the promoted candidate's recipe.\n\nThe four evidence fields are null for a promotion nobody recorded evidence\nfor -- a human pressing promote, or the post-training auto-deploy. They are\nreturned so the basis for a swap is readable after the fact rather than only\nat the moment it happens."},"DismissImprovementCandidateResponse":{"properties":{"training_job_id":{"type":"string","title":"Training Job Id"},"dismissed_at":{"type":"string","format":"date-time","title":"Dismissed At"}},"type":"object","required":["training_job_id","dismissed_at"],"title":"DismissImprovementCandidateResponse","description":"Response after dismissing an improvement candidate.\n\nAttributes:\n    training_job_id: Dismissed training job ID.\n    dismissed_at: Dismissal timestamp."},"DismissOutlierRequest":{"properties":{"dataset_name":{"type":"string","title":"Dataset Name","description":"Name of the dataset"},"fingerprint":{"type":"string","title":"Fingerprint","description":"Content fingerprint of the outlier sample"}},"type":"object","required":["dataset_name","fingerprint"],"title":"DismissOutlierRequest","description":"Request to dismiss (keep) an outlier so it doesn't reappear on refresh."},"DismissOutlierResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true}},"type":"object","title":"DismissOutlierResponse","description":"Response after dismissing an outlier."},"DistributionAnalysis":{"properties":{"text_length_stats":{"anyOf":[{"$ref":"#/components/schemas/DistributionStats"},{"type":"null"}]},"token_count_stats":{"anyOf":[{"$ref":"#/components/schemas/DistributionStats"},{"type":"null"}]},"token_count_histogram":{"anyOf":[{"items":{"$ref":"#/components/schemas/HistogramBucket"},"type":"array"},{"type":"null"}],"title":"Token Count Histogram"},"entity_counts":{"anyOf":[{"items":{"$ref":"#/components/schemas/EntityCount"},"type":"array"},{"type":"null"}],"title":"Entity Counts"},"span_length_stats":{"anyOf":[{"$ref":"#/components/schemas/DistributionStats"},{"type":"null"}]},"span_length_by_type":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/DistributionStats"},"type":"object"},{"type":"null"}],"title":"Span Length By Type"},"most_frequent_spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/SpanFrequency"},"type":"array"},{"type":"null"}],"title":"Most Frequent Spans"},"class_balance":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassBalance"},"type":"array"},{"type":"null"}],"title":"Class Balance"},"label_correlation":{"anyOf":[{"$ref":"#/components/schemas/LabelCorrelation"},{"type":"null"}]},"prompt_length_stats":{"anyOf":[{"$ref":"#/components/schemas/DistributionStats"},{"type":"null"}]},"completion_length_stats":{"anyOf":[{"$ref":"#/components/schemas/DistributionStats"},{"type":"null"}]}},"type":"object","title":"DistributionAnalysis","description":"Result of distribution analysis"},"DistributionComparison":{"properties":{"label":{"type":"string","title":"Label"},"before_count":{"type":"integer","title":"Before Count"},"before_percentage":{"type":"number","title":"Before Percentage"},"after_count":{"type":"integer","title":"After Count"},"after_percentage":{"type":"number","title":"After Percentage"}},"type":"object","required":["label","before_count","before_percentage","after_count","after_percentage"],"title":"DistributionComparison","description":"Before/after distribution comparison."},"DistributionStats":{"properties":{"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"mean":{"type":"number","title":"Mean"},"median":{"type":"number","title":"Median"},"std":{"type":"number","title":"Std"}},"type":"object","required":["min","max","mean","median","std"],"title":"DistributionStats","description":"Statistics for a numerical distribution"},"DiversityAnalysis":{"properties":{"vendi_score":{"type":"number","title":"Vendi Score"},"sample_size":{"type":"integer","title":"Sample Size"},"interpretation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interpretation"},"visualization":{"anyOf":[{"$ref":"#/components/schemas/DiversityVisualization"},{"type":"null"}]},"llm_analysis":{"anyOf":[{"$ref":"#/components/schemas/DiversityLLMAnalysis"},{"type":"null"}],"description":"LLM-generated reasoning analysis of dataset diversity, showing the thought process similar to an ML engineer"}},"type":"object","required":["vendi_score","sample_size"],"title":"DiversityAnalysis"},"DiversityLLMAnalysis":{"properties":{"reasoning_trace":{"type":"string","title":"Reasoning Trace","description":"Step-by-step reasoning trace showing how the model analyzed the dataset's diversity, similar to an ML engineer's thought process"},"summary":{"type":"string","title":"Summary","description":"Concise summary of the diversity assessment"},"diversity_rating":{"type":"string","enum":["low","moderate","high","excellent"],"title":"Diversity Rating","description":"Overall diversity rating based on the analysis"},"key_observations":{"items":{"type":"string"},"type":"array","title":"Key Observations","description":"Key observations about the dataset's diversity"},"recommendations":{"items":{"type":"string"},"type":"array","title":"Recommendations","description":"Actionable recommendations to improve diversity if needed"},"model_used":{"type":"string","title":"Model Used","description":"The LLM model used for the analysis"}},"type":"object","required":["reasoning_trace","summary","diversity_rating","model_used"],"title":"DiversityLLMAnalysis","description":"LLM-generated reasoning analysis of dataset diversity.\n\nMimics how a machine learning engineer would analyze diversity."},"DiversityPoint":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y"},"z":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Z"},"w":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"W"},"coordinates":{"items":{"type":"number"},"type":"array","title":"Coordinates"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"token_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Count"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"sample_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Index"},"similarity_to_centroid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity To Centroid"},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding"}},"type":"object","required":["coordinates"],"title":"DiversityPoint"},"DiversityVisualization":{"properties":{"method":{"type":"string","enum":["pca","tsne"],"title":"Method"},"dimensions":{"type":"integer","title":"Dimensions"},"points":{"items":{"$ref":"#/components/schemas/DiversityPoint"},"type":"array","title":"Points"},"tsne_perplexity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsne Perplexity"},"similarity_range":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Similarity Range"},"token_count_range":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Token Count Range"}},"type":"object","required":["method","dimensions","points"],"title":"DiversityVisualization"},"DomainLimitRequest":{"properties":{"domain":{"anyOf":[{"type":"string","maxLength":253,"minLength":1},{"type":"null"}],"title":"Domain","description":"Bare email domain. Carries no identity, so the submitter is counted against the cap like any new signup."},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"Full address being admitted. An account that already exists for this exact address is admitted without counting against the cap."}},"type":"object","title":"DomainLimitRequest","description":"Address to evaluate against the domain signup rules.\n\nOne of ``domain`` or ``email`` is required. Prefer ``email``: only it\nlets the service exclude an account that already exists for that exact\naddress from its own answer."},"DomainLimitResponse":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"banned":{"type":"boolean","title":"Banned","default":false}},"type":"object","required":["allowed"],"title":"DomainLimitResponse","description":"Response describing whether another signup is allowed for a domain."},"DuplicateSample":{"properties":{"original_index":{"type":"integer","title":"Original Index"},"duplicate_index":{"type":"integer","title":"Duplicate Index"},"preview":{"type":"string","title":"Preview"}},"type":"object","required":["original_index","duplicate_index","preview"],"title":"DuplicateSample"},"DuplicatesAnalysis":{"properties":{"duplicate_count":{"type":"integer","title":"Duplicate Count"},"duplication_rate":{"type":"number","title":"Duplication Rate"},"samples":{"items":{"$ref":"#/components/schemas/DuplicateSample"},"type":"array","title":"Samples"}},"type":"object","required":["duplicate_count","duplication_rate","samples"],"title":"DuplicatesAnalysis"},"EmailCanonicalRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailCanonicalRequest","description":"Request body for checking Gmail canonical duplicate status."},"EmailCanonicalResponse":{"properties":{"duplicate":{"type":"boolean","title":"Duplicate"}},"type":"object","required":["duplicate"],"title":"EmailCanonicalResponse","description":"Response describing whether a canonical Gmail duplicate exists."},"EntityCount":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["label","count","percentage"],"title":"EntityCount"},"EvaluationDatasetRow":{"properties":{"id":{"type":"string","title":"Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"version_number":{"type":"string","title":"Version Number"},"dataset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Type","description":"Domain type of the dataset (ner, classification, custom, decoder)."},"generation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generation Type","description":"How the dataset was created: synthesize, upload, auto_relabel, manual_relabel, grow, external."},"sample_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Size"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/DatasetProvenance"},{"type":"null"}],"description":"Versioned durable lineage for this dataset, in the same shape GET /felix/datasets returns -- including that shape's redaction of user-authored task text from generator_context. Null on rows created before the provenance contract existed, so a consumer must keep its generation_type fallback (ENG-6625)."},"latest_evaluation":{"anyOf":[{"$ref":"#/components/schemas/DatasetEvaluationSummary"},{"type":"null"}]}},"type":"object","required":["id","dataset_name","version_number"],"title":"EvaluationDatasetRow","description":"Dataset row rendered under the \"Evaluation datasets\" section.\n\nExtends ``TrainingDatasetRow`` with the latest completed evaluation\nagainst the model in context (project or base model)."},"EvaluationResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"model_id":{"type":"string","title":"Model Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"dataset_version":{"type":"string","title":"Dataset Version"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"incumbent_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incumbent Model Id"},"f1_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"F1 Score"},"precision_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Precision Score"},"recall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recall Score"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"validation_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Loss"},"subset_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subset Accuracy"},"hamming_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hamming Loss"},"exact_match":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exact Match"},"bleu_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bleu Score"},"rouge_l_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rouge L Score"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"total_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Latency Ms"},"max_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Examples"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"custom_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomMetricValue"},"type":"array"},{"type":"null"}],"title":"Custom Metrics"},"status":{"type":"string","title":"Status"},"job_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Reference"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Error Count"},"error_sample":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Sample"},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress"},"total_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Examples"},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Count"},"evaluation_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evaluation Time Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"failed_examples":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Failed Examples"},"predictions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Predictions"},"confirmation_read_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confirmation Read Count"},"confirmation_read_experiment_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Confirmation Read Experiment Ids"},"confirmation_rotation_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirmation Rotation Required"}},"type":"object","required":["id","user_id","model_id","dataset_name","dataset_version","status","created_at"],"title":"EvaluationResponse","description":"Response for a single evaluation"},"EvaluationSuiteCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"source_kind":{"type":"string","enum":["agent_generated","huggingface","platform_catalog","upload"],"title":"Source Kind"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"agent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Run Id"},"catalog_key":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Catalog Key"},"huggingface":{"anyOf":[{"$ref":"#/components/schemas/HuggingFaceSuiteSource"},{"type":"null"}]},"task_type":{"type":"string","maxLength":64,"minLength":1,"title":"Task Type"},"field_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Field Mapping"},"scorer_kind":{"type":"string","enum":["harness","llmaj","native"],"title":"Scorer Kind","default":"native"},"scorer_key":{"type":"string","maxLength":255,"minLength":1,"title":"Scorer Key","description":"Reviewed scorer key. Native suites accept native.v1, plus exact_match for decoder tasks; unsupported native task/key pairs are rejected. LLMAJ and harness scorers retain their own reviewed string namespaces, so this field cannot be a global enum.","default":"native.v1"},"harness":{"anyOf":[{"$ref":"#/components/schemas/HarnessScorerProgram"},{"type":"null"}]},"max_cases":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Max Cases"}},"additionalProperties":false,"type":"object","required":["name","source_kind","task_type"],"title":"EvaluationSuiteCreate","description":"Create a project-owned suite from an existing dataset or Hugging Face."},"EvaluationSuitePreviewResponse":{"properties":{"suite":{"$ref":"#/components/schemas/EvaluationSuiteResponse"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"cases":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Cases"}},"type":"object","required":["suite","columns","cases"],"title":"EvaluationSuitePreviewResponse","description":"Canonical cases and metadata previewed before executing a suite."},"EvaluationSuiteResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"dataset_id":{"type":"string","title":"Dataset Id"},"name":{"type":"string","title":"Name"},"task_type":{"type":"string","title":"Task Type"},"source_kind":{"type":"string","enum":["agent_generated","huggingface","platform_catalog","upload"],"title":"Source Kind"},"source_provenance":{"$ref":"#/components/schemas/JsonObject-Output"},"field_mapping":{"$ref":"#/components/schemas/JsonObject-Output"},"scorer_kind":{"type":"string","enum":["harness","llmaj","native"],"title":"Scorer Kind"},"scorer_config":{"$ref":"#/components/schemas/JsonObject-Output"},"case_count":{"type":"integer","title":"Case Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","dataset_id","name","task_type","source_kind","source_provenance","field_mapping","scorer_kind","scorer_config","case_count","created_at","updated_at"],"title":"EvaluationSuiteResponse","description":"A project-owned pinned Evaluation Suite."},"EvaluationSuiteRunCreate":{"properties":{"model_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Model Ids"},"num_draws":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Num Draws","description":"Independent full-suite sandbox inference passes. One preserves the current cost profile; repeated draws persist mean and sample standard deviation alongside the usual scalar metrics.","default":1},"max_examples":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Examples","description":"Optional execution cap. Omit to run every pinned case. Reviewed catalogue splits exceed 10,000 cases, so this field has no upper bound; dispatch still refuses unbounded model fan-out."},"cls_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cls Threshold","description":"Optional decision threshold for the multi-label classification head (GLiNER2 cls_threshold). Only valid for classification Evaluation Suites; rejected for every other task_type. Must be in [0.0, 1.0] inclusive, matching coerce_cls_threshold's own range check -- 0.0 returns every label, 1.0 falls back to argmax, both meaningful."},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id","description":"Project-scoped experiment requesting this run."}},"additionalProperties":false,"type":"object","required":["model_ids"],"title":"EvaluationSuiteRunCreate","description":"Run one project Evaluation Suite against one or more selected models."},"EvaluationSuiteRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"suite_id":{"type":"string","title":"Suite Id"},"project_id":{"type":"string","title":"Project Id"},"model_id":{"type":"string","title":"Model Id"},"status":{"type":"string","enum":["awaiting_scoring","cancelled","complete","failed","pending","running"],"title":"Status"},"max_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Examples"},"scorer_snapshot":{"$ref":"#/components/schemas/JsonObject-Output"},"comparison_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comparison Group","description":"Scorer id, version, and behaviour digest. Runs without the same non-null value must not be ranked or compared."},"metrics":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lease Expires At"},"scoring_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scoring Expires At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","suite_id","project_id","model_id","status","max_examples","scorer_snapshot","comparison_group","metrics","error_message","created_at","started_at","lease_expires_at","scoring_expires_at","completed_at"],"title":"EvaluationSuiteRunResponse","description":"One append-only Evaluation Suite execution."},"EvaluationSuiteRunResultResponse":{"properties":{"id":{"type":"string","title":"Id"},"run_id":{"type":"string","title":"Run Id"},"case_index":{"type":"integer","title":"Case Index"},"input_case":{"$ref":"#/components/schemas/JsonObject-Output"},"reference":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"output":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"native_metrics":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"judge_evidence":{"anyOf":[{"$ref":"#/components/schemas/JsonObject-Output"},{"type":"null"}]},"status":{"type":"string","enum":["pending","complete","failed"],"title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","run_id","case_index","input_case","reference","output","native_metrics","judge_evidence","status","error_message","latency_ms","created_at"],"title":"EvaluationSuiteRunResultResponse","description":"Per-case execution and scoring evidence for an Evaluation Suite run."},"EvaluationSummary":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name"},"dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Version"},"f1_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"F1 Score"},"precision_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Precision Score"},"recall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recall Score"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"subset_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subset Accuracy"},"hamming_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hamming Loss"},"exact_match":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exact Match"},"bleu_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bleu Score"},"rouge_l_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rouge L Score"},"validation_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Loss"},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Count"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","status"],"title":"EvaluationSummary","description":"Subset of an evaluation row surfaced on the models UI.\n\nField set mirrors the existing frontend ``EvaluationSummary`` type so\nthe TypeScript shape is unchanged."},"EvidenceGrade":{"type":"string","enum":["native","recomputed","unestablished"],"title":"EvidenceGrade","description":"How far a persisted score may be compared with another score."},"ExpandConstraintChoicesRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"constraint":{"$ref":"#/components/schemas/ConstraintRequest","description":"Constraint to expand"},"task_description":{"type":"string","title":"Task Description","description":"Task description for context"},"max_count":{"type":"integer","maximum":50.0,"minimum":2.0,"title":"Max Count","description":"Maximum number of choices after expansion","default":10}},"type":"object","required":["constraint","task_description"],"title":"ExpandConstraintChoicesRequest","description":"Expand constraint choices request"},"ExpandConstraintChoicesResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"constraint":{"$ref":"#/components/schemas/ConstraintRequest"},"expanded_choices":{"items":{"type":"string"},"type":"array","title":"Expanded Choices"},"count":{"type":"integer","title":"Count"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage","description":"Estimated tokens used for expansion"}},"type":"object","required":["success","constraint","expanded_choices","count"],"title":"ExpandConstraintChoicesResponse","description":"Expand constraint choices response"},"ExperimentAssetSummary":{"properties":{"active_job_count":{"type":"integer","minimum":0.0,"title":"Active Job Count"},"total_job_count":{"type":"integer","minimum":0.0,"title":"Total Job Count"},"failed_job_count":{"type":"integer","minimum":0.0,"title":"Failed Job Count","description":"Training jobs on this Experiment that ended in failure. Surfaced on the fine-tune landing row so a failed run is visible without expanding the Experiment, which is the only place its assets are loaded."},"dataset_count":{"type":"integer","minimum":0.0,"title":"Dataset Count"},"evaluation_count":{"type":"integer","minimum":0.0,"title":"Evaluation Count"},"base_models":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Base Models"},"base_models_truncated":{"type":"boolean","title":"Base Models Truncated"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"},"category_label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Category Label","description":"Uppercase domain label derived from the project, title, and base models. Filled for the agent-sessions list only; null on a single-Experiment read, which renders the project and title themselves. Null means not computed for this response, never that the Experiment has no category."},"last_agent_message":{"anyOf":[{"type":"string","maxLength":241},{"type":"null"}],"title":"Last Agent Message","description":"Creator-only latest agent message, truncated for a list row. Filled for the agent-sessions list only, and only on the caller's own transcripts."},"agent_step_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Agent Step Count","description":"Creator-only count of agent turns taken in the transcript. Filled for the agent-sessions list only, and only on the caller's own transcripts."},"agent_turn_active":{"type":"boolean","title":"Agent Turn Active","description":"True when the Experiment's chat session has a Fine-Tune agent turn in flight, including scoping turns that have not started training yet. False when idle or when the turn stamp is too old to believe."}},"type":"object","required":["active_job_count","total_job_count","failed_job_count","dataset_count","evaluation_count","base_models","base_models_truncated","last_activity_at","agent_turn_active"],"title":"ExperimentAssetSummary","description":"Stable landing counts and display fields for one Experiment."},"ExperimentAssetsResponse":{"properties":{"experiment_id":{"type":"string","title":"Experiment Id"},"summary":{"$ref":"#/components/schemas/ExperimentAssetSummary"},"training_jobs":{"items":{"$ref":"#/components/schemas/ExperimentTrainingJobResponse"},"type":"array","maxItems":100,"title":"Training Jobs"},"datasets":{"items":{"$ref":"#/components/schemas/ExperimentDatasetResponse"},"type":"array","maxItems":100,"title":"Datasets"},"evaluations":{"items":{"$ref":"#/components/schemas/ExperimentEvaluationResponse"},"type":"array","maxItems":100,"title":"Evaluations"},"selected_training_job":{"anyOf":[{"$ref":"#/components/schemas/ExperimentTrainingJobResponse"},{"type":"null"}]},"training_jobs_has_more":{"type":"boolean","title":"Training Jobs Has More"},"datasets_has_more":{"type":"boolean","title":"Datasets Has More"},"evaluations_has_more":{"type":"boolean","title":"Evaluations Has More"},"serving_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serving Model Id"}},"type":"object","required":["experiment_id","summary","training_jobs","datasets","evaluations","selected_training_job","training_jobs_has_more","datasets_has_more","evaluations_has_more"],"title":"ExperimentAssetsResponse","description":"One bounded, authorized snapshot of Experiment-scoped assets."},"ExperimentCompletionOutcome":{"type":"string","enum":["incumbent_retained","candidate_promoted"],"title":"ExperimentCompletionOutcome","description":"Why a COMPLETE Experiment ended (EDD 8.1).\n\nA closed set rather than free text because it is the thing that makes \"the\nincumbent is already good enough\" a *queryable* success instead of one\ninferred from the absence of a promoted model -- and an unvalidated string\ncolumn cannot be counted on for that. Sits beside ``ExperimentStage`` and\n``ExperimentMode``, which back the two other lifecycle discriminators on the\nsame table."},"ExperimentCreateRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"mode":{"$ref":"#/components/schemas/ExperimentMode","default":"mle_agent"},"requires_clarification":{"type":"boolean","title":"Requires Clarification","default":false}},"additionalProperties":false,"type":"object","required":["project_id"],"title":"ExperimentCreateRequest","description":"Payload for starting scoped work in an existing project."},"ExperimentDatasetResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version_number":{"type":"string","title":"Version Number"},"dataset_type":{"type":"string","title":"Dataset Type"},"sample_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Size"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"attached_at":{"type":"string","format":"date-time","title":"Attached At"},"source_experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Experiment Id"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["id","name","version_number","dataset_type","sample_size","status","attached_at","source_experiment_id","last_activity_at"],"title":"ExperimentDatasetResponse","description":"Privacy-safe metadata for one exact Experiment dataset version."},"ExperimentEvaluationResponse":{"properties":{"id":{"type":"string","title":"Id"},"model_id":{"type":"string","title":"Model Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"incumbent_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incumbent Model Id"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"status":{"type":"string","title":"Status"},"f1_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"F1 Score"},"f1_std":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"F1 Std"},"precision_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Precision Score"},"precision_std":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Precision Std"},"recall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recall Score"},"recall_std":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recall Std"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"accuracy_std":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy Std"},"validation_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Loss"},"validation_loss_std":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Loss Std"},"draw_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw Count"},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Count"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","model_id","model_name","dataset_id","status","f1_score","precision_score","recall_score","accuracy","validation_loss","sample_count","created_at","completed_at"],"title":"ExperimentEvaluationResponse","description":"Privacy-safe evaluation metadata produced by an Experiment."},"ExperimentJobDatasetResponse":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id"},"name":{"type":"string","title":"Name"},"version_number":{"type":"string","title":"Version Number"}},"type":"object","required":["dataset_id","name","version_number"],"title":"ExperimentJobDatasetResponse","description":"One immutable dataset version referenced by a training attempt."},"ExperimentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExperimentResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","title":"ExperimentListResponse","description":"One keyset-paginated page of visible Experiment metadata."},"ExperimentMode":{"type":"string","enum":["mle_agent","auto_agent"],"title":"ExperimentMode","description":"Which agent drives an Experiment's conversation (EDD section 0.2)."},"ExperimentPartitionResponse":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"version_number":{"type":"string","title":"Version Number"},"role":{"type":"string","enum":["train","development","final_evaluation"],"title":"Role"},"confirmation_read_count":{"type":"integer","minimum":0.0,"title":"Confirmation Read Count"},"confirmation_read_experiment_ids":{"items":{"type":"string"},"type":"array","title":"Confirmation Read Experiment Ids"},"confirmation_rotation_required":{"type":"boolean","title":"Confirmation Rotation Required"}},"type":"object","required":["dataset_id","dataset_name","version_number","role","confirmation_read_count","confirmation_read_experiment_ids","confirmation_rotation_required"],"title":"ExperimentPartitionResponse","description":"One active exact-version partition and its disclosure state."},"ExperimentPartitionsRequest":{"properties":{"train_dataset_id":{"type":"string","format":"uuid","title":"Train Dataset Id"},"development_dataset_id":{"type":"string","format":"uuid","title":"Development Dataset Id"},"final_evaluation_dataset_id":{"type":"string","format":"uuid","title":"Final Evaluation Dataset Id"}},"additionalProperties":false,"type":"object","required":["train_dataset_id","development_dataset_id","final_evaluation_dataset_id"],"title":"ExperimentPartitionsRequest","description":"Exact dataset versions to pin as train, selection, and confirmation."},"ExperimentPartitionsResponse":{"properties":{"experiment_id":{"type":"string","title":"Experiment Id"},"partitions":{"items":{"$ref":"#/components/schemas/ExperimentPartitionResponse"},"type":"array","title":"Partitions"}},"type":"object","required":["experiment_id","partitions"],"title":"ExperimentPartitionsResponse","description":"All active fine-tune partitions for one Experiment."},"ExperimentRenameRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"additionalProperties":false,"type":"object","required":["title"],"title":"ExperimentRenameRequest","description":"Payload for changing an Experiment display name."},"ExperimentReportPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor for the next page; absent at the end."}},"type":"object","required":["items"],"title":"ExperimentReportPage","description":"Stable keyset page of report items."},"ExperimentResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"project_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Version Id"},"team_id":{"type":"string","title":"Team Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Creator-only transcript session identifier."},"created_by":{"type":"string","title":"Created By"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"mode":{"$ref":"#/components/schemas/ExperimentMode"},"stage":{"$ref":"#/components/schemas/ExperimentStage"},"mode_locked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mode Locked At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completion_outcome":{"anyOf":[{"$ref":"#/components/schemas/ExperimentCompletionOutcome"},{"type":"null"}],"description":"Why a COMPLETE Experiment ended: incumbent_retained means the project's existing serving path won and no fine-tune was promoted, which EDD v2 section 8.1 calls a reportable success rather than a failure to find a winner. Always null on a non-COMPLETE Experiment. May also be null on a COMPLETE one -- pre-outcome history backfilled by ENG-5417 carries no outcome -- so a consumer counting outcomes must treat null as 'not recorded', never as a third outcome."},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"summary":{"$ref":"#/components/schemas/ExperimentAssetSummary"}},"type":"object","required":["id","project_id","project_version_id","team_id","created_by","title","mode","stage","mode_locked_at","last_activity_at","completed_at","cancelled_at","created_at","updated_at","summary"],"title":"ExperimentResponse","description":"Metadata for one durable Experiment."},"ExperimentStage":{"type":"string","enum":["scoping","preparing_data","training","evaluating","complete","blocked","cancelled"],"title":"ExperimentStage","description":"Agent-owned workflow stage of an Experiment (EDD section 0.2)."},"ExperimentTrainingJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version_number":{"type":"string","title":"Version Number"},"base_model":{"type":"string","title":"Base Model"},"status":{"type":"string","title":"Status"},"normalized_status":{"type":"string","title":"Normalized Status"},"is_active":{"type":"boolean","title":"Is Active"},"is_serving_incumbent":{"type":"boolean","title":"Is Serving Incumbent","default":false},"progress_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Percent"},"dataset_versions":{"items":{"$ref":"#/components/schemas/ExperimentJobDatasetResponse"},"type":"array","maxItems":100,"title":"Dataset Versions"},"dataset_versions_truncated":{"type":"boolean","title":"Dataset Versions Truncated"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"hub_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hub Model Id","description":"HuggingFace Hub repo ID set when a successful push-to-hub call completed for this job. The sole reliable signal that the checkpoint was published -- absence means never pushed, not necessarily private. Never derive a Hub link from any other field (e.g. a storage path); those aren't Hub identifiers."},"hub_model_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hub Model Private","description":"Whether the pushed Hub repo is private, as recorded at push time. Null for a job that has never been pushed, and for a push recorded before this field existed (ENG-6761) -- this means the visibility was not recorded, not that either visibility applies. Render null as a neutral 'pushed, visibility unknown' state rather than assuming either PUBLISHED or PRIVATE."}},"type":"object","required":["id","model_name","version_number","base_model","status","normalized_status","is_active","progress_percent","dataset_versions","dataset_versions_truncated","created_at","last_activity_at","started_at","completed_at"],"title":"ExperimentTrainingJobResponse","description":"Privacy-safe training attempt metadata for landing and Assets."},"FastinoExtension":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id"}},"type":"object","title":"FastinoExtension","description":"Fastino-specific extension fields appended to OpenAI-compatible responses.\n\nOpenAI's API contract reserves the unprefixed top-level keys (``id``,\n``choices``, ``usage``, …); custom data must live under a clearly\nnamespaced key. ``x_fastino`` is that key.\n\nAttributes:\n    inference_id: The Fastino-side identifier of the persisted\n        ``inferences`` row associated with this completion. Present\n        when persistence is enabled (``extra_body.store == True``)\n        and the row was successfully recorded; ``None`` for ad-hoc\n        requests that opted out of persistence. The frontend uses\n        this to poll ``GET /inferences/{id}`` for asynchronous\n        judge results without coupling the inference response\n        latency to the judge."},"FeatureFlagsResponse":{"properties":{"finetune_agent_enabled":{"type":"boolean","title":"Finetune Agent Enabled"},"billing_credits_page_enabled":{"type":"boolean","title":"Billing Credits Page Enabled"},"user_data_export_enabled":{"type":"boolean","title":"User Data Export Enabled"},"cancellation_immediate_refund_option_enabled":{"type":"boolean","title":"Cancellation Immediate Refund Option Enabled"},"prepaid_billing_enabled":{"type":"boolean","title":"Prepaid Billing Enabled"}},"type":"object","required":["finetune_agent_enabled","billing_credits_page_enabled","user_data_export_enabled","cancellation_immediate_refund_option_enabled","prepaid_billing_enabled"],"title":"FeatureFlagsResponse","description":"Resolved boolean feature flags for the requesting user.\n\nField naming follows the canonical agent names in the product:\n\n- ``finetune_agent_enabled``: Claude-powered Fine-tune chat agent.\n  Renamed from ``mle_agent_enabled`` by ENG-6245; ENG-6613 retired the\n  deprecated twin, so this is the only agent field published.\n- ``user_data_export_enabled``: Self-serve GDPR SAR export (ENG-2128).\n  Off by default and gating both the settings panel and the route, so\n  the UI cannot offer an archive the backend refuses to build.\n- ``cancellation_immediate_refund_option_enabled``: Whether the\n  \"cancel immediately + pro-rated refund\" button is shown alongside the\n  primary \"cancel — keep access until period end\" button. Also enforced\n  server-side on the cancellation endpoints, so disabling it actually\n  blocks the refund path, not just the button.\n- ``prepaid_billing_enabled``: Prepaid-credit onboarding — a new team starts\n  at a zero balance and is sent straight to Stripe Checkout to top up\n  (ENG-5956 cutoff). Defaults on; a Datadog Disabled env uses this code\n  default. Explicit Datadog false remains the incident kill switch.\n  Purchase-credits no longer refuses free-plan teams.\n\nENG-5651 withdrew ``research_agent_enabled`` (Deep Research, formerly\n``auto_agent_enabled``) and ``continuous_adaptation_agent_enabled``\n(the autonomous fine-tuning loop, formerly ``data_engine_agent_enabled``).\nBoth gated surfaces that no longer exist, so the fields are gone from the\ncontract rather than pinned to ``False``. The removal is temporary: the\nDatadog keys are deliberately left in place, so restoring either feature\nmeans re-adding its field and helper — not recreating the flag."},"FineTunedInventoryResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/InventoryProject"},"type":"array","title":"Projects","description":"Accessible projects on this page."},"traffic_window_seconds":{"type":"integer","title":"Traffic Window Seconds","description":"Width of the aggregated traffic window, in seconds."},"traffic_status":{"type":"string","enum":["available","unavailable"],"title":"Traffic Status","description":"'unavailable' when the traffic read failed; rows then carry null traffic."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for the next page; null on the last page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more projects remain after this page."}},"type":"object","required":["projects","traffic_window_seconds","traffic_status","has_more"],"title":"FineTunedInventoryResponse","description":"A page of fine-tuned inventory joined with live traffic."},"FinetunePlanApproveRequest":{"properties":{"revision_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Revision Hash"},"success_criterion":{"anyOf":[{"$ref":"#/components/schemas/SuccessCriterionEdit"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["revision_hash"],"title":"FinetunePlanApproveRequest","description":"Payload for authorising a proposed revision.\n\n``revision_hash`` is the anti-stale check: the caller echoes the hash of the\nrevision they were shown, so a revision that changed between rendering and\nclicking cannot be approved on the strength of the older display.\n\n``success_criterion`` is the one thing a caller may *change* here rather\nthan merely consent to. Decision 17 gives the agent the proposal, because it\nknows what is measurable for the task type, and the caller the last word,\nbecause it is their money and their definition of done. The edit is still\nbound by ``revision_hash``: it applies to the revision that was read, not to\nwhatever the plan has since become."},"FinetunePlanEnvelope":{"properties":{"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"allow_synthetic_data":{"type":"boolean","title":"Allow Synthetic Data","default":false},"allow_eval_upload":{"type":"boolean","title":"Allow Eval Upload","default":false},"allowed_base_models":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50,"title":"Allowed Base Models"},"baseline_model_ids":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Baseline Model Ids"},"allow_preview_deployment":{"type":"boolean","title":"Allow Preview Deployment","default":false},"allow_deployment":{"type":"boolean","title":"Allow Deployment","default":false},"success_metric":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Success Metric"},"success_comparison":{"anyOf":[{"$ref":"#/components/schemas/PlanSuccessComparison"},{"type":"null"}]},"success_threshold":{"anyOf":[{"type":"number","maximum":999999.999999,"minimum":1e-06},{"type":"null"}],"title":"Success Threshold"},"success_suite_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Success Suite Id"},"success_rounds_required":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Success Rounds Required","default":2}},"additionalProperties":false,"type":"object","required":["expires_at"],"title":"FinetunePlanEnvelope","description":"The machine-checked half of a plan (EDD section 6.1).\n\nEvery field here maps to a check on a real route. A field that does not\nbelongs in the intent instead -- that split is what keeps \"envelope\" an\nenforceable word rather than a decorative one. Note there is no spend\nlimit: owner-set limits are team- and project-scoped only (ENG-6083)."},"FinetunePlanIntent":{"properties":{"objective":{"type":"string","maxLength":4000,"minLength":1,"title":"Objective"},"success_criteria":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Success Criteria"},"baseline":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Baseline"},"dataset_reasoning":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Dataset Reasoning"},"prose_constraints":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Prose Constraints"},"extra":{"additionalProperties":{"type":"string","maxLength":4000,"minLength":1},"propertyNames":{"$ref":"#/components/schemas/FinetunePlanIntentExtraKey"},"type":"object","maxProperties":7,"title":"Extra"},"estimated_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)"},{"type":"null"}],"title":"Estimated Cost Usd"},"estimated_cost_low_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)"},{"type":"null"}],"title":"Estimated Cost Low Usd"},"estimated_cost_high_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)"},{"type":"null"}],"title":"Estimated Cost High Usd"}},"additionalProperties":false,"type":"object","required":["objective"],"title":"FinetunePlanIntent","description":"The recorded, rendered, never-checked half of a plan (EDD section 6.1).\n\n``estimated_cost_usd`` is server-derived at propose (ENG-6414) and shown\nbeside the work so a user can tell a rounding error from a serious bill.\nSpend is bounded by team and project limits (ENG-6083), not this row."},"FinetunePlanIntentExtraKey":{"type":"string","enum":["output_contract","data_quality","synthetic_data_policy","privacy_and_compliance","compute_and_timeline","deployment_and_monitoring","open_risks"],"title":"FinetunePlanIntentExtraKey","description":"Display-only detail categories collected by the clarifier interview."},"FinetunePlanIntentInput":{"properties":{"objective":{"type":"string","maxLength":4000,"minLength":1,"title":"Objective"},"success_criteria":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Success Criteria"},"baseline":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Baseline"},"dataset_reasoning":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Dataset Reasoning"},"prose_constraints":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Prose Constraints"},"extra":{"additionalProperties":{"type":"string","maxLength":4000,"minLength":1},"propertyNames":{"$ref":"#/components/schemas/FinetunePlanIntentExtraKey"},"type":"object","maxProperties":7,"title":"Extra"}},"additionalProperties":false,"type":"object","required":["objective"],"title":"FinetunePlanIntentInput","description":"The write shape of intent: everything an approver reads except the quote.\n\n``estimated_cost_usd`` is deliberately absent. The field is derived at\npropose from ``FinetunePlanQuoteBasis`` and lives only on the response\nmodel, so a caller-supplied figure is a 422 rather than a stored value."},"FinetunePlanListResponse":{"properties":{"plans":{"items":{"$ref":"#/components/schemas/FinetunePlanResponse"},"type":"array","title":"Plans"}},"additionalProperties":false,"type":"object","required":["plans"],"title":"FinetunePlanListResponse","description":"Every revision for one Experiment, newest revision first."},"FinetunePlanProposeRequest":{"properties":{"envelope":{"$ref":"#/components/schemas/FinetunePlanEnvelope"},"intent":{"$ref":"#/components/schemas/FinetunePlanIntentInput"},"quote":{"anyOf":[{"$ref":"#/components/schemas/FinetunePlanQuoteBasis-Input"},{"type":"null"}]},"requires_explicit_approval":{"type":"boolean","title":"Requires Explicit Approval","default":false}},"additionalProperties":false,"type":"object","required":["envelope","intent"],"title":"FinetunePlanProposeRequest","description":"Payload for appending a proposed plan revision.\n\nProposing grants nothing. It records what the clarifier and user settled on\nso the user can read it on a card and decide; only ``approve`` confers\nauthority. ``quote`` is required on any granting propose; the service\nderives ``estimated_cost_usd`` from it before the digest is taken. A\nfull revoke may omit it so a pre-ENG-6414 plan can be stopped without\ninventing a basis."},"FinetunePlanQuoteBasis-Input":{"properties":{"quote_model":{"type":"string","maxLength":200,"minLength":1,"title":"Quote Model"},"estimated_gpu_minutes":{"anyOf":[{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)"}],"title":"Estimated Gpu Minutes"},"estimated_instance_type":{"type":"string","maxLength":64,"minLength":1,"title":"Estimated Instance Type"}},"additionalProperties":false,"type":"object","required":["quote_model","estimated_gpu_minutes","estimated_instance_type"],"title":"FinetunePlanQuoteBasis","description":"Pricing inputs the server quotes from. Assumptions, not constraints.\n\nThe stored ``estimated_cost_usd`` is derived from these fields via\n``quote_cost_usd``. They are not hashed: they are inputs to a value that\nalready is."},"FinetunePlanQuoteBasis-Output":{"properties":{"quote_model":{"type":"string","maxLength":200,"minLength":1,"title":"Quote Model"},"estimated_gpu_minutes":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)","title":"Estimated Gpu Minutes"},"estimated_instance_type":{"type":"string","maxLength":64,"minLength":1,"title":"Estimated Instance Type"}},"additionalProperties":false,"type":"object","required":["quote_model","estimated_gpu_minutes","estimated_instance_type"],"title":"FinetunePlanQuoteBasis","description":"Pricing inputs the server quotes from. Assumptions, not constraints.\n\nThe stored ``estimated_cost_usd`` is derived from these fields via\n``quote_cost_usd``. They are not hashed: they are inputs to a value that\nalready is."},"FinetunePlanRejectRequest":{"properties":{"revision_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Revision Hash"}},"additionalProperties":false,"type":"object","required":["revision_hash"],"title":"FinetunePlanRejectRequest","description":"Payload for declining a proposed revision.\n\nDeliberately carries no free-text reason: nothing stores one, and a field\nthat validates and is then discarded misleads the caller. Recording why a\nrevision was declined needs a column of its own."},"FinetunePlanResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"experiment_id":{"type":"string","format":"uuid","title":"Experiment Id"},"revision":{"type":"integer","title":"Revision"},"revision_hash":{"type":"string","title":"Revision Hash"},"envelope":{"$ref":"#/components/schemas/FinetunePlanEnvelope"},"intent":{"$ref":"#/components/schemas/FinetunePlanIntent"},"quote":{"anyOf":[{"$ref":"#/components/schemas/FinetunePlanQuoteBasis-Output"},{"type":"null"}]},"is_current":{"type":"boolean","title":"Is Current"},"proposed_by":{"type":"string","format":"uuid","title":"Proposed By"},"proposed_at":{"type":"string","format":"date-time","title":"Proposed At"},"approved_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"rejected_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rejected By"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"}},"additionalProperties":false,"type":"object","required":["id","experiment_id","revision","revision_hash","envelope","intent","is_current","proposed_by","proposed_at","approved_by","approved_at","rejected_by","rejected_at"],"title":"FinetunePlanResponse","description":"One plan revision as returned to a user-authenticated caller."},"GenerateAsyncResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Job ID (same as dataset_id) for polling status"},"status":{"type":"string","title":"Status","description":"Initial job status: queued or generating","default":"generating"},"dataset_name":{"type":"string","title":"Dataset Name","description":"Name of the dataset being generated"},"task_type":{"type":"string","title":"Task Type","description":"Generation task type: ner, classification, or custom"},"is_seed":{"type":"boolean","title":"Is Seed","description":"Whether this is a seed generation job","default":false},"message":{"type":"string","title":"Message","description":"Human-readable status message","default":"Generation job started"}},"type":"object","required":["job_id","dataset_name","task_type"],"title":"GenerateAsyncResponse","description":"Response from async generation job creation (HTTP 202).\n\nReturned immediately when a background generation job is started.\nThe job_id (which is the dataset_id) can be used to poll for status."},"GenerateClassificationConstraintsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"labels":{"items":{"type":"string"},"type":"array","maxItems":250,"minItems":1,"title":"Labels","description":"List of classification labels"},"min_criteria":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Min Criteria","description":"Minimum number of constraints to generate","default":5}},"type":"object","required":["labels"],"title":"GenerateClassificationConstraintsRequest","description":"Classification constraint generation request"},"GenerateConstraintsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"constraints":{"items":{"$ref":"#/components/schemas/ConstraintRequest"},"type":"array","title":"Constraints"},"count":{"type":"integer","title":"Count"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage","description":"Estimated tokens used for constraint generation"}},"type":"object","required":["success","constraints","count"],"title":"GenerateConstraintsResponse","description":"Constraint generation response"},"GenerateJobStatus":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Job ID (same as dataset_id)"},"status":{"type":"string","title":"Status","description":"Job status: queued, generating, ready, failed"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data","description":"Generated data rows (only present when status is 'ready')"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"Number of generated rows (only present when status is 'ready')"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"Generation task type: ner, classification, or custom"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage","description":"Estimated tokens used (only present when status is 'ready')"},"dataset":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dataset","description":"Dataset info (only present when status is 'ready')"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message (only present when status is 'failed')"},"is_seed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Seed","description":"Whether this is a seed dataset"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Job creation timestamp"}},"type":"object","required":["job_id","status"],"title":"GenerateJobStatus","description":"Response from job status polling endpoint.\n\nReturns current status and, when complete, the generated data."},"GenerateNERConstraintsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"List of entity labels"},"min_criteria":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Min Criteria","description":"Minimum number of constraints to generate","default":5}},"type":"object","required":["labels"],"title":"GenerateNERConstraintsRequest","description":"NER constraint generation request"},"GenerateRecordsConstraintsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array","title":"Fields","description":"Field definitions for structured records"},"min_criteria":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Min Criteria","description":"Minimum number of constraints to generate","default":5}},"type":"object","required":["fields"],"title":"GenerateRecordsConstraintsRequest","description":"Records constraint generation request"},"GenerateRequest":{"properties":{"task_type":{"type":"string","enum":["ner","classification","custom","decoder","records","fields"],"title":"Task Type","description":"Type of generation task"},"dataset_name":{"type":"string","minLength":1,"title":"Dataset Name","description":"Name for the generated dataset"},"num_examples":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Num Examples","description":"Number of examples to generate","default":10},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context (required for decoder)"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","description":"Generation temperature","default":0.7},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality","description":"Generation quality: 'light', 'medium', or 'heavy'"},"generation_profile":{"type":"string","enum":["auto","fast","balanced","quality"],"title":"Generation Profile","description":"Queue/runtime execution profile. 'auto' selects a task-aware default.","default":"auto"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for log streaming"},"config_num_examples":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Config Num Examples","description":"Number of examples to use for config generation","default":5},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":250},{"type":"null"}],"title":"Labels","description":"Entity/classification labels (required for ner and classification)"},"classified_examples":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/NERClassifiedExample"},{"$ref":"#/components/schemas/ClassifiedExample"}]},"type":"array"},{"type":"null"}],"title":"Classified Examples","description":"Seed examples for generation. NER: {text, entities: [[span, label], ...], feedback?}. Classification: {text, label, feedback?}."},"multi_label":{"type":"boolean","title":"Multi Label","description":"Enable multi-label classification (classification only)","default":false},"class_balance":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Class Balance","description":"Optional class distribution map (classification only)"},"batch_size":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Batch Size","description":"Batch size for generation API calls","default":5},"negative_ratio":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":0.0},{"type":"null"}],"title":"Negative Ratio","description":"Percentage of rows with no labels/entities (negative samples). Applies to ner, and to classification only when multi_label=True — a no-op for single-label classification, which already expresses 'none of these apply' via its own label. For ner, note bench_use_cases.py's weekly quality benchmark separately caps the empty-entity row ratio at ner_empty_entity_row_ratio_max (0.35 by default); values above ~35 risk a dataset the platform's own quality gate rejects."},"fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array"},{"type":"null"}],"title":"Fields","description":"Field definitions for structured records (required for records)"},"input_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array"},{"type":"null"}],"title":"Input Fields","description":"Input field definitions (required for fields)"},"output_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array"},{"type":"null"}],"title":"Output Fields","description":"Output field definitions (required for fields)"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Natural language prompt describing the task (required for custom)"},"output_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Format","description":"Expected output schema for custom generation"},"infer_output_format":{"type":"boolean","title":"Infer Output Format","description":"Infer output format from prompt when output_format is absent","default":false},"instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction","description":"System instruction for decoder chat format"},"include_reasoning_trace":{"type":"boolean","title":"Include Reasoning Trace","description":"Whether to include reasoning traces (<think> blocks) in generated outputs for decoder tasks. Ignored when task_type is not 'decoder'.","default":false},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort for the underlying LLM (e.g., 'low', 'medium', 'high')"},"constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintRequest"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Custom constraints applied to all generated examples"},"multiplicator":{"anyOf":[{"$ref":"#/components/schemas/MultiplicatorRequest"},{"type":"null"}],"description":"Multiplicator for balanced distribution across choices"},"use_meta_synthesizer":{"type":"boolean","title":"Use Meta Synthesizer","description":"Use meta-synthesis to auto-generate diversity criteria","default":true},"min_criteria":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Min Criteria","description":"Minimum diversity criteria to generate","default":10},"target_choices":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Target Choices","description":"Number of choices to expand for diversity","default":15},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Project ID to assign the dataset to"},"type":{"type":"string","title":"Type","description":"Dataset type tag: 'training', 'evaluation', or 'split'","default":"training"},"visibility":{"type":"string","title":"Visibility","description":"Dataset visibility: 'private' or 'public'","default":"private"},"split_ratio":{"anyOf":[{"$ref":"#/components/schemas/SplitRatioConfig"},{"type":"null"}],"description":"Split ratio when type is 'split'. Ignored otherwise."},"output_style":{"anyOf":[{"type":"string","enum":["prose","code","mixed"]},{"type":"null"}],"title":"Output Style","description":"Decoder-only formatting policy: 'prose', 'code', or 'mixed'. Rejected when task_type is not decoder."}},"type":"object","required":["task_type","dataset_name"],"title":"GenerateRequest","description":"Unified async generation request for all task types.\n\nUse ``task_type`` to specify what kind of dataset to generate.\nAll generation goes through SQS with BackgroundTasks fallback.\n\nTask-specific required fields:\n- ``ner``: requires ``labels``\n- ``classification``: requires ``labels``\n- ``custom``: requires ``prompt``\n- ``decoder``: requires ``domain_description``\n- ``records``: requires ``fields``\n- ``fields``: requires ``input_fields`` and ``output_fields``"},"GenerateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"},"count":{"type":"integer","title":"Count"},"task_type":{"type":"string","title":"Task Type"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage","description":"Estimated tokens used for generation"},"dataset":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dataset","description":"Dataset info if saved to S3/database"}},"type":"object","required":["success","data","count","task_type"],"title":"GenerateResponse","description":"Generation response"},"GithubImportRequest":{"properties":{"repo":{"type":"string","title":"Repo","description":"GitHub repository, e.g. 'owner/repo' or a full URL"},"file_path":{"type":"string","title":"File Path","description":"Path to the data file inside the repository"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch","description":"Branch or ref to import from. Defaults to the default branch"},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name for the new Fastino dataset. Defaults to a slugified file base name"},"github_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Token","description":"GitHub personal access token for private repos or higher rate limits. Sandbox run keys must omit this field and can only import public repos."},"type":{"anyOf":[{"type":"string","enum":["training","evaluation","benchmark"]},{"type":"null"}],"title":"Type","description":"Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be created via this endpoint).","default":"training"}},"type":"object","required":["repo","file_path"],"title":"GithubImportRequest","description":"Request to import a single data file from a GitHub repository."},"GlinerJobStatus":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage"},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["job_id","status","created_at"],"title":"GlinerJobStatus","description":"Response from job status check."},"GlinerRequest":{"properties":{"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"**Deprecated** legacy task hint. One of: 'extract_entities', 'classify_text', 'extract_json', 'schema'. Omit for the unified GLiNER2 path. Submitting a legacy task value still succeeds but the response carries ``Deprecation: true`` and a ``Sunset`` header."},"text":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Text"},"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Schema","description":"Extraction schema. The flat ``list[str]`` of entity labels is deprecated; use the unified dict shape (``entities`` / ``classifications`` / ``structures`` / ``relations``) for forward compatibility. Deprecated submissions emit ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers."},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold","default":0.5},"include_confidence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Confidence","default":true},"include_spans":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Spans","default":true},"format_results":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Format Results","default":true}},"type":"object","required":["text","schema"],"title":"GlinerRequest","description":"Request for GLiNER-2 processing (sync)."},"GlinerResponse":{"properties":{"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Result"},"token_usage":{"type":"integer","title":"Token Usage"}},"type":"object","required":["result","token_usage"],"title":"GlinerResponse","description":"Response from GLiNER-2 processing."},"GrowDatasetRequest":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id","description":"ID of the existing dataset to grow from"},"new_dataset_name":{"type":"string","maxLength":255,"minLength":1,"title":"New Dataset Name","description":"Name for the new grown dataset"},"target_size":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Target Size","description":"Total number of examples in the final dataset"},"class_balance":{"type":"boolean","title":"Class Balance","description":"If True, balance classes equally. If False, generate equal examples per source example.","default":true},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Override domain description for generation context"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","description":"Generation temperature","default":0.7},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for log streaming"}},"type":"object","required":["dataset_id","new_dataset_name","target_size"],"title":"GrowDatasetRequest","description":"Request to grow an existing dataset by generating new examples.\n\nSupports both classification and NER datasets. When class_balance is enabled,\ngenerates equal examples per class. Otherwise, generates equal examples per\nsource example from the original dataset."},"GrowDatasetResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation succeeded"},"dataset":{"additionalProperties":true,"type":"object","title":"Dataset","description":"New dataset info (id, name, path, version)"},"original_size":{"type":"integer","title":"Original Size","description":"Number of examples in the original dataset"},"new_size":{"type":"integer","title":"New Size","description":"Total number of examples in the new dataset"},"generated_count":{"type":"integer","title":"Generated Count","description":"Number of new examples generated"},"distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Distribution","description":"Number of examples generated per class/label"},"token_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Usage","description":"Estimated tokens used for generation"}},"type":"object","required":["success","dataset","original_size","new_size","generated_count","distribution"],"title":"GrowDatasetResponse","description":"Response from dataset grow operation."},"HTTPValidationError":{"description":"OpenAI error envelope returned for request validation failures. Replaces FastAPI's default HTTPValidationError `{detail: [...]}`.","properties":{"error":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"errors":{"description":"Structured validation entries (location, type, line/column).","items":{"additionalProperties":true,"type":"object"},"title":"Errors","type":"array"},"message":{"title":"Message","type":"string"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"type":{"title":"Type","type":"string"}},"required":["message","type","param","code"],"title":"Error","type":"object"}},"required":["error"],"title":"HTTPValidationError","type":"object"},"HarnessScorerProgram":{"properties":{"scorer_id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,127}$","title":"Scorer Id"},"version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$","title":"Version"},"source_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Source Digest"},"dependency_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Dependency Digest"},"entrypoint":{"type":"string","maxLength":512,"minLength":1,"title":"Entrypoint"},"runtime_configuration":{"$ref":"#/components/schemas/JsonObject-Input"},"metric_names":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Metric Names"},"declared_egress":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Declared Egress"}},"additionalProperties":false,"type":"object","required":["scorer_id","version","source_digest","dependency_digest","entrypoint","metric_names"],"title":"HarnessScorerProgram","description":"Content-addressed benchmark program executed in the agent sandbox."},"HistogramBucket":{"properties":{"range":{"type":"string","title":"Range"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["range","count"],"title":"HistogramBucket"},"HuggingFacePullPreviewResponse":{"properties":{"preview_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Preview Rows","description":"Sample rows from the dataset (first 50 rows)"},"total_rows":{"type":"integer","title":"Total Rows","description":"Total number of rows in the dataset"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"List of column names"},"dataset_type":{"type":"string","title":"Dataset Type","description":"Inferred dataset type (classification, ner, custom)"},"schema_":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Schema","description":"Inferred schema mapping column names to data types"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Dataset metadata from HuggingFace"}},"type":"object","required":["preview_rows","total_rows","columns","dataset_type"],"title":"HuggingFacePullPreviewResponse","description":"Response containing preview data from a HuggingFace dataset pull (without saving)."},"HuggingFacePullRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id","description":"HuggingFace repo ID to pull from"},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name","description":"HuggingFace dataset configuration, distinct from the local Fastino name"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision","description":"Specific revision/branch to pull"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name for the local dataset (defaults to repo name)"},"hf_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hf Token","description":"HuggingFace API token. Required for user-authenticated imports. Sandbox run keys must omit this field and can only import public repos. Gated or private repos must be imported in the Fastino UI."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for SSE log streaming"},"column_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Column Mapping","description":"Column mapping from source to standard names"},"dataset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Type","description":"Dataset type (ner, classification, custom)"},"type":{"anyOf":[{"type":"string","enum":["training","evaluation","benchmark"]},{"type":"null"}],"title":"Type","description":"Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be created via this endpoint). This model is also bound to POST /felix/datasets/preview-from-hub, which ignores this field entirely -- nothing is persisted on a preview.","default":"training"}},"type":"object","required":["repo_id"],"title":"HuggingFacePullRequest","description":"Request to pull dataset from HuggingFace Hub."},"HuggingFacePushModelRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id","description":"HuggingFace repo ID (e.g., 'username/model-name')"},"hf_token":{"type":"string","title":"Hf Token","description":"HuggingFace API token with write permissions"},"private":{"type":"boolean","title":"Private","description":"Whether repo should be private","default":true},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message","description":"Optional commit message for the push"}},"type":"object","required":["repo_id","hf_token"],"title":"HuggingFacePushModelRequest","description":"Request to push a trained model to HuggingFace Hub"},"HuggingFacePushRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id","description":"HuggingFace repo ID (e.g., 'user/dataset')"},"private":{"type":"boolean","title":"Private","description":"Whether repo should be private","default":true},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message","description":"Commit message for the push"},"hf_token":{"type":"string","title":"Hf Token","description":"HuggingFace API token"}},"type":"object","required":["repo_id","hf_token"],"title":"HuggingFacePushRequest","description":"Request to push dataset to HuggingFace Hub."},"HuggingFaceSuiteSource":{"properties":{"repo_id":{"type":"string","maxLength":255,"minLength":3,"title":"Repo Id"},"revision":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Revision"},"config":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Config"},"split":{"type":"string","maxLength":255,"minLength":1,"title":"Split","default":"test"},"token":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Token","description":"Read token used only for import; it is never persisted."}},"additionalProperties":false,"type":"object","required":["repo_id"],"title":"HuggingFaceSuiteSource","description":"Pinned Hugging Face dataset source used to materialize suite cases."},"ImageContentBlock":{"properties":{"type":{"type":"string","const":"image","title":"Type","default":"image"},"source":{"$ref":"#/components/schemas/ImageSource"}},"type":"object","required":["source"],"title":"ImageContentBlock","description":"Anthropic image content block."},"ImageSource":{"properties":{"type":{"type":"string","enum":["base64","url"],"title":"Type"},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["type"],"title":"ImageSource","description":"Anthropic image source (base64 or HTTPS URL)."},"ImprovePromptRequest":{"properties":{"prompt":{"type":"string","minLength":1,"title":"Prompt","description":"The user's original prompt to improve"},"data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Type","description":"The dataset type (classification, entity_extraction, json_extraction)"}},"type":"object","required":["prompt"],"title":"ImprovePromptRequest","description":"Request to improve a dataset generation prompt."},"ImprovePromptResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"improved_prompt":{"type":"string","title":"Improved Prompt"},"summary":{"type":"string","title":"Summary","description":"Short summary of what was improved"}},"type":"object","required":["success","improved_prompt","summary"],"title":"ImprovePromptResponse","description":"Response containing the improved prompt."},"ImprovementCandidate":{"properties":{"project_id":{"type":"string","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"training_job_id":{"type":"string","title":"Training Job Id"},"adapter_name":{"type":"string","title":"Adapter Name"},"base_model":{"type":"string","title":"Base Model"},"score":{"type":"number","title":"Score"},"score_name":{"type":"string","title":"Score Name"},"eval_metrics":{"additionalProperties":true,"type":"object","title":"Eval Metrics"},"eval_sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Sample Count"},"evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Evaluated At"},"training_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Training Completed At"},"source":{"type":"string","enum":["agent_selected","evaluation_fallback"],"title":"Source"},"agent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Run Id"},"agent_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Remarks"},"evidence_grade":{"$ref":"#/components/schemas/EvidenceGrade","default":"unestablished"},"evidence_note":{"type":"string","title":"Evidence Note","default":""},"persisted_recipe_seed_repeat":{"$ref":"#/components/schemas/PersistedRecipeSeedRepeat","default":"unsupported"}},"type":"object","required":["project_id","project_name","training_job_id","adapter_name","base_model","score","score_name","eval_metrics","source"],"title":"ImprovementCandidate","description":"A deployable adapter candidate for the monitoring homepage.\n\nAttributes:\n    project_id: Project that owns the candidate adapter.\n    project_name: Display name of the project.\n    training_job_id: Training job backing the adapter.\n    adapter_name: Display name of the adapter.\n    base_model: Base model used by the adapter.\n    score: Backend-computed priority score.\n    score_name: Metric name used for the score.\n    eval_metrics: Raw evaluation metrics for display details.\n    eval_sample_count: Number of examples used by the evaluation.\n    evaluated_at: Evaluation completion timestamp.\n    training_completed_at: Training completion timestamp.\n    source: Selection source.\n    agent_run_id: Agent run that selected the candidate, if applicable.\n    agent_remarks: Agent remarks, if applicable.\n    evidence_grade: How far the backing score may be compared with another\n        score. Candidates are ordered by this before their scalar score, so a\n        score Fastino did not establish never outranks one it did.\n    evidence_note: Human-readable account of the score's provenance, for a\n        badge or tooltip next to the score.\n    persisted_recipe_seed_repeat: Whether a completed, comparably-scored\n        sibling job with the same persisted effective-recipe fingerprint\n        and a different reproducibility seed was observed.\n        ``no_persisted_match`` means none was found; the score may just\n        be seed luck. ``persisted_match_evaluated`` means one was found\n        and scored -- this does NOT mean the scores *agreed*.\n        ``unsupported`` means this gate doesn't apply to the candidate's\n        route because its architecture or provider does not honor seeds.\n        ``seed_not_recorded`` means the candidate has neither the\n        ``seed_recorded_at`` row marker nor a dispatched\n        ``resolved_recipe.seed``. Its persisted seed is therefore not\n        reproducibility evidence and is treated as unconfirmed, the same\n        as ``no_persisted_match``.\n        A row without an effective recipe fingerprint is likewise\n        ``no_persisted_match``; NULL legacy identities never match.\n        This state controls whether an agent-selected candidate is put\n        forward as confirmed; the fallback row remains visible for review."},"ImprovementCandidatesResponse":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/ImprovementCandidate"},"type":"array","title":"Candidates"}},"type":"object","required":["candidates"],"title":"ImprovementCandidatesResponse","description":"Response for listing monitoring improvement candidates.\n\nAttributes:\n    candidates: Improvement candidates after workspace-level filtering."},"ImprovementTimeseriesResponse":{"properties":{"base_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model Id"},"base_model_eval":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResponse"},{"type":"null"}]},"adapters":{"items":{"$ref":"#/components/schemas/AdapterTimeseriesEntry"},"type":"array","title":"Adapters"}},"type":"object","required":["adapters"],"title":"ImprovementTimeseriesResponse","description":"Grouped training-job + evals + base-model-eval for a project.\n\nThe ``adapters`` list is ordered by training-job creation date\ndescending (newest first). Re-sorting for display (e.g. ascending\nby score) is handled on the frontend.\n\nAttributes:\n    base_model_id: The shared base-model string used by adapters in\n        this project (e.g. ``\"base:deepseek-ai/DeepSeek-V4-Flash\"``).  None when the\n        project has no training jobs yet.\n    base_model_eval: Latest completed evaluation against the base model.\n        None when no base-model evaluation exists.\n    adapters: Training jobs with their evaluations, newest first."},"InferAdvancedRequest":{"properties":{"prompt":{"type":"string","minLength":1,"title":"Prompt","description":"The user's dataset generation prompt"},"data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Type","description":"The dataset type (classification, entity_extraction, json_extraction)"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"The labels / entity types / classes for the dataset"}},"type":"object","required":["prompt"],"title":"InferAdvancedRequest","description":"Request to infer constraints and multiplicator from a prompt."},"InferAdvancedResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"constraints":{"items":{"$ref":"#/components/schemas/InferredConstraint"},"type":"array","title":"Constraints","description":"Suggested constraints for the generation"},"multiplicator":{"anyOf":[{"$ref":"#/components/schemas/InferredMultiplicator"},{"type":"null"}],"description":"Suggested multiplicator for balanced distribution"}},"type":"object","required":["success"],"title":"InferAdvancedResponse","description":"Response containing inferred constraints and multiplicator."},"InferClassificationLabelsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"type":"string","title":"Domain Description","description":"Domain description for inferring classification labels"}},"type":"object","required":["domain_description"],"title":"InferClassificationLabelsRequest","description":"Classification label inference request"},"InferFieldsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"type":"string","title":"Domain Description","description":"Domain description for field inference"}},"type":"object","required":["domain_description"],"title":"InferFieldsRequest","description":"Request to infer fields from domain description"},"InferFieldsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"input_fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array","title":"Input Fields"},"output_fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array","title":"Output Fields"},"mode":{"type":"string","title":"Mode"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["success","input_fields","output_fields","mode","reasoning"],"title":"InferFieldsResponse","description":"Field inference response"},"InferLabelsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["success","labels","count"],"title":"InferLabelsResponse","description":"Label inference response"},"InferNERLabelsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"domain_description":{"type":"string","title":"Domain Description","description":"Domain description for inferring entity types"}},"type":"object","required":["domain_description"],"title":"InferNERLabelsRequest","description":"NER label inference request"},"InferenceFeedbackRequest":{"properties":{"verdict":{"type":"string","enum":["correct","incorrect"],"title":"Verdict","description":"Human judgment: 'correct' or 'incorrect'"},"corrected_output":{"anyOf":[{},{"type":"null"}],"title":"Corrected Output","description":"Expected output for incorrect verdicts (JSON structure matching task output)"},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Notes","description":"Optional reviewer notes"}},"type":"object","required":["verdict"],"title":"InferenceFeedbackRequest","description":"Request to submit human feedback on a specific inference.\n\nArgs:\n    verdict: Human judgment — correct or incorrect.\n    corrected_output: Expected output when verdict is incorrect.\n    notes: Optional free-text notes from the reviewer."},"InferenceFeedbackResponse":{"properties":{"inference_id":{"type":"string","title":"Inference Id","description":"Inference ID that was annotated"},"human_verdict":{"type":"string","title":"Human Verdict","description":"Stored human verdict"},"human_feedback_at":{"type":"string","format":"date-time","title":"Human Feedback At","description":"When the feedback was submitted"}},"type":"object","required":["inference_id","human_verdict","human_feedback_at"],"title":"InferenceFeedbackResponse","description":"Response after submitting human feedback.\n\nArgs:\n    inference_id: The inference that was annotated.\n    human_verdict: The stored verdict.\n    human_feedback_at: Timestamp of the feedback submission."},"InferenceListResponse":{"properties":{"inferences":{"items":{"$ref":"#/components/schemas/InferenceRecord"},"type":"array","title":"Inferences","description":"List of inference records"},"total":{"type":"integer","title":"Total","description":"Total count of inferences matching filters"},"limit":{"type":"integer","title":"Limit","description":"Page size limit"},"offset":{"type":"integer","title":"Offset","description":"Current offset"}},"type":"object","required":["inferences","total","limit","offset"],"title":"InferenceListResponse","description":"Response for listing inference history."},"InferenceRecord":{"properties":{"id":{"type":"string","title":"Id","description":"Unique inference ID"},"user_id":{"type":"string","title":"User Id","description":"User who made the inference"},"model_id":{"type":"string","title":"Model Id","description":"Model ID used for inference"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"Human-readable model name"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"Task type (legacy; may be NULL for new inferences)"},"input":{"type":"string","title":"Input","description":"Input text"},"output":{"anyOf":[{},{"type":"null"}],"title":"Output","description":"Inference output (JSON)"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms","description":"End-to-end latency in milliseconds"},"ttft_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttft Ms","description":"Streaming time to first visible output chunk in milliseconds; null for non-streaming calls and streams with no visible payload."},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens","description":"Token count"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens","description":"Non-cached input/prompt tokens, sourced from the metered requests row. None when no billing row was recorded."},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens","description":"Output/completion tokens, sourced from the metered requests row."},"cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Tokens","description":"Input tokens served from the provider prompt cache (cache hit)."},"cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Write Tokens","description":"Input tokens written into the provider prompt cache (cache creation). Zero for providers that bill writes as plain input."},"source":{"type":"string","title":"Source","description":"Source of the request (api or ui)","default":"api"},"status":{"type":"string","title":"Status","description":"Inference status: success or failed","default":"success"},"error_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Type","description":"Failure category when status is failed (validation, timeout, model_not_ready, model_not_found, model_not_supported, capacity_exhausted, internal)"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error detail when status is failed"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the inference was made"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project ID the model belongs to"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"Training job UUID that produced the model"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Inference provider (aws, modal, etc.). Rows predating a provider removal carry an 'archived_<provider>' label."},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model","description":"HuggingFace base model ID"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Extensible metadata (e.g. LLM judge results)"},"human_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Human Verdict","description":"Human reviewer verdict (correct/incorrect)"},"human_corrected_output":{"anyOf":[{},{"type":"null"}],"title":"Human Corrected Output","description":"Expected output from human reviewer"},"human_feedback_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Human Feedback Notes","description":"Optional reviewer notes"},"human_feedback_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Human Feedback At","description":"When human feedback was submitted"},"llmaj_verdict":{"anyOf":[{"type":"string","enum":["pass","fail","uncertain"]},{"type":"null"}],"title":"Llmaj Verdict","description":"LLMAJ judge verdict ('pass', 'fail', or 'uncertain'); None until judged."},"llmaj_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Llmaj Score","description":"LLMAJ judge confidence score in [0.0, 1.0]; None until judged."},"llmaj_judged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Llmaj Judged At","description":"Timestamp when LLMAJ judgment was recorded; None until judged."},"llmaj_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llmaj Reasoning","description":"LLMAJ judge reasoning/explanation; None until judged."}},"type":"object","required":["id","user_id","model_id","input","created_at"],"title":"InferenceRecord","description":"Stored inference record from the database.\n\nAttributes:\n    status: Inference outcome -- 'success' or 'failed'.\n    error_type: Failure category when status is 'failed'.\n    error_message: Error detail when status is 'failed'."},"InferredConstraint":{"properties":{"description":{"type":"string","title":"Description","description":"Human-readable constraint description"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices","description":"Optional choice list"},"probability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Probability","description":"Optional probability"}},"type":"object","required":["description"],"title":"InferredConstraint","description":"A single inferred constraint."},"InferredMultiplicator":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"The dimension prompt, e.g. 'The sentiment should be'"},"choices":{"items":{"type":"string"},"type":"array","title":"Choices","description":"Choices to balance across"}},"type":"object","required":["prompt","choices"],"title":"InferredMultiplicator","description":"An inferred multiplicator dimension."},"InitializeTimezoneRequest":{"properties":{"timezone":{"type":"string","maxLength":50,"title":"Timezone","description":"IANA timezone name to store when usage_reset_hour_changed_at is NULL."}},"type":"object","required":["timezone"],"title":"InitializeTimezoneRequest","description":"Request to set the team timezone once, on first use."},"InventoryBaseModelGroup":{"properties":{"base_model":{"type":"string","title":"Base Model","description":"HuggingFace identifier of the base model."},"variants":{"items":{"$ref":"#/components/schemas/InventoryVariant"},"type":"array","title":"Variants","description":"Variants derived from this base model."}},"type":"object","required":["base_model","variants"],"title":"InventoryBaseModelGroup","description":"Variants within a project that share one base model."},"InventoryProject":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"Project identifier."},"name":{"type":"string","title":"Name","description":"Project name."},"visibility":{"type":"string","enum":["private","team"],"title":"Visibility","description":"Project visibility."},"current_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Model Id","description":"Raw active_model_id pinned on the project, if any."},"base_models":{"items":{"$ref":"#/components/schemas/InventoryBaseModelGroup"},"type":"array","title":"Base Models","description":"Base-model groups, most recently trained first."},"variants_truncated":{"type":"boolean","title":"Variants Truncated","description":"True when the project has more variants than one page returns; the most recent are kept.","default":false}},"type":"object","required":["project_id","name","visibility","base_models"],"title":"InventoryProject","description":"One accessible project and its deployable model inventory."},"InventoryVariant":{"properties":{"kind":{"type":"string","enum":["lora","full","base"],"title":"Kind","description":"Serving-leg kind of this variant."},"variant_id":{"type":"string","title":"Variant Id","description":"Training-job UUID, or the catalog model id when kind is 'base'."},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"Training job behind this variant; null for a base model."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Customer-facing model name."},"version_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Number","description":"Version within the training lineage; null for a base model."},"root_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Job Id","description":"First job in this variant's version chain; null for v1 and base models."},"model_kind":{"anyOf":[{"type":"string","enum":["lora","full"]},{"type":"null"}],"title":"Model Kind","description":"Fine-tune kind the UI may label. Null when the persisted training type is unrecognised, so no claim is made."},"artifact_status":{"type":"string","enum":["ready","not_ready"],"title":"Artifact Status","description":"Whether a servable artifact was recorded for this variant."},"is_deployable":{"type":"boolean","title":"Is Deployable","description":"Whether this variant may be promoted to serve."},"deployability_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployability Reason","description":"Why the variant is not deployable; null when it is."},"is_current_model":{"type":"boolean","title":"Is Current Model","description":"Whether the project's active_model_id points at this variant."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When training was created."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When training finished."},"traffic":{"anyOf":[{"$ref":"#/components/schemas/VariantTraffic"},{"type":"null"}],"description":"Window traffic; null when the traffic read was unavailable."}},"type":"object","required":["kind","variant_id","artifact_status","is_deployable","is_current_model"],"title":"InventoryVariant","description":"One deployable artifact within a project's base-model group."},"InvitationActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"invitation_id":{"type":"string","title":"Invitation Id"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["success","message","invitation_id"],"title":"InvitationActionResponse","description":"Response model for accepting or declining an invitation."},"InvitationStatus":{"type":"string","enum":["pending","accepted","declined","expired"],"title":"InvitationStatus","description":"Status of a team invitation."},"InvoiceLinkResponse":{"properties":{"url":{"type":"string","title":"Url","description":"Stripe Hosted Invoice Page URL"}},"type":"object","required":["url"],"title":"InvoiceLinkResponse","description":"Response containing an authorized Stripe Hosted Invoice Page URL."},"JsonObject-Input":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},"JsonObject-Output":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},"JsonScalar":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"JsonValue-Input":{"anyOf":[{"$ref":"#/components/schemas/JsonScalar"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"}]},"JsonValue-Output":{"anyOf":[{"$ref":"#/components/schemas/JsonScalar"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"}]},"LabelCheckResult":{"properties":{"row_index":{"type":"integer","title":"Row Index"},"text":{"type":"string","title":"Text"},"current_label":{"type":"string","title":"Current Label"},"suggested_label":{"type":"string","title":"Suggested Label"},"confidence":{"type":"number","title":"Confidence"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["row_index","text","current_label","suggested_label","confidence","reasoning"],"title":"LabelCheckResult","description":"Result of checking a single label"},"LabelCorrelation":{"properties":{"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"matrix":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"Matrix"}},"type":"object","required":["labels","matrix"],"title":"LabelCorrelation"},"LabelDistribution":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["label","count","percentage"],"title":"LabelDistribution"},"LabelExistingClassificationRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"List of classification labels"},"inputs":{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1,"title":"Inputs","description":"List of texts to label"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"class_balance":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Class Balance","description":"Optional class distribution (must sum to 1.0)"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for log streaming"},"config_num_examples":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Config Num Examples","description":"Number of examples to generate for config","default":5},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","description":"Generation temperature","default":0.7},"batch_size":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Batch Size","description":"Number of samples to generate per API call","default":5},"constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintRequest"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Custom constraints"},"multi_label":{"type":"boolean","title":"Multi Label","description":"Enable multi-label classification (samples can have multiple labels)","default":false},"save_dataset":{"type":"boolean","title":"Save Dataset","description":"Save generated dataset to S3 and database","default":false},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name for the saved dataset (required if save_dataset=True)"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Project ID to assign the dataset to"}},"type":"object","required":["labels","inputs"],"title":"LabelExistingClassificationRequest","description":"Label existing texts for classification"},"LabelExistingFieldsRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"input_fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array","title":"Input Fields","description":"Input field definitions"},"output_fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array","title":"Output Fields","description":"Output field definitions"},"inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":1000,"minItems":1,"title":"Inputs","description":"List of input data dictionaries"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for log streaming"},"config_num_examples":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Config Num Examples","description":"Number of examples to generate for config","default":5},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","description":"Generation temperature","default":0.7},"constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintRequest"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Custom constraints"},"save_dataset":{"type":"boolean","title":"Save Dataset","description":"Save generated dataset to S3 and database","default":false},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name for the saved dataset (required if save_dataset=True)"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Project ID to assign the dataset to"}},"type":"object","required":["input_fields","output_fields","inputs"],"title":"LabelExistingFieldsRequest","description":"Label existing data with custom input/output fields"},"LabelExistingNERRequest":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (optional, uses authenticated user if not provided)"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"List of entity labels (e.g., ['PERSON', 'ORG', 'LOC'])"},"inputs":{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1,"title":"Inputs","description":"List of texts to label"},"domain_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Description","description":"Domain description for generation context"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for log streaming"},"config_num_examples":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Config Num Examples","description":"Number of examples to generate for config","default":5},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","description":"Generation temperature","default":0.7},"constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintRequest"},"type":"array"},{"type":"null"}],"title":"Constraints","description":"Custom constraints"},"save_dataset":{"type":"boolean","title":"Save Dataset","description":"Save generated dataset to S3 and database","default":false},"dataset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Name","description":"Name for the saved dataset (required if save_dataset=True)"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Project ID to assign the dataset to"}},"type":"object","required":["labels","inputs"],"title":"LabelExistingNERRequest","description":"Label existing texts for NER"},"LatencyTimeseriesPoint":{"properties":{"bucket_date":{"type":"string","title":"Bucket Date","description":"ISO date or datetime string"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"},"p50_latency_ms":{"type":"number","title":"P50 Latency Ms"},"p95_latency_ms":{"type":"number","title":"P95 Latency Ms"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["bucket_date","avg_latency_ms","p50_latency_ms","p95_latency_ms","request_count"],"title":"LatencyTimeseriesPoint","description":"One bucket of aggregated response latency."},"LatencyTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/LatencyTimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"LatencyTimeseriesResponse","description":"Latency timeseries for charts."},"LeaveTeamRequest":{"properties":{"transfer_plan":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Transfer Plan"}},"type":"object","title":"LeaveTeamRequest","description":"Optional transfer plan accompanying a leave-team request.\n\nThe plan resolves every row the leaving user owns in the team:\ntransfer to another current member (any role) by user UUID, or\n``\"delete\"`` to remove the row inside the leave transaction.\nSole-member leaves omit the plan entirely.\n\nAttributes:\n    transfer_plan: ``{resource_type: {row_id: target_user_id|\"delete\"}}``.\n        Empty/absent when the user owns nothing or is the sole\n        member of the team."},"LedgerBalanceResponse":{"properties":{"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"},"snapshot_month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Snapshot Month"},"entries_since":{"type":"integer","title":"Entries Since"},"composition":{"$ref":"#/components/schemas/WalletCompositionResponse"},"composition_drift":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Composition Drift"}},"type":"object","required":["total","snapshot_month","entries_since","composition","composition_drift"],"title":"LedgerBalanceResponse","description":"A team's exact balance plus the provenance a dispute needs.\n\nAttributes:\n    total: Exact balance in dollars, derived from the ledger. Negative is a\n        real overdraft, never clamped.\n    snapshot_month: Month of the snapshot the total was anchored on, or\n        null when the whole log was summed because no snapshot existed.\n    entries_since: How many entries were added to that anchor.\n    composition: Grant/purchased split, from the aggregator's cache and so\n        possibly staler than ``total``.\n    composition_drift: ``total`` minus the composition. Non-zero means the\n        aggregator is behind, and a client must not present the\n        composition as authoritative."},"LedgerBreakdownResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/LedgerBreakdownRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"LedgerBreakdownResponse","description":"Spend grouped over the ledger.\n\nAttributes:\n    rows: One row per group, largest spend first."},"LedgerBreakdownRow":{"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id"},"period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"},"spend":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spend"},"entries":{"type":"integer","title":"Entries"}},"type":"object","required":["spend","entries"],"title":"LedgerBreakdownRow","description":"One group of spend, keyed by whichever dimensions were requested.\n\nAttributes:\n    category: BillableKind of the work, when grouped by category.\n    model: Model that served it, when grouped by model.\n    provider: Provider that served it, when grouped by provider.\n    project_id: Owning project. Null is team-level spend, a real group.\n    experiment_id: Owning experiment, when grouped by experiment.\n    period_start: Inclusive UTC bucket start, when a grain was given.\n    spend: Positive dollars spent by this group.\n    entries: How many ledger entries it covers."},"ListAPIKeysResponse":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/APIKeyInfo"},"type":"array","title":"Keys"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["keys","count"],"title":"ListAPIKeysResponse","description":"Response model for listing API keys."},"ListMCPBindingsResponse":{"properties":{"pending":{"items":{"$ref":"#/components/schemas/MCPBindingInfo"},"type":"array","title":"Pending"},"active":{"items":{"$ref":"#/components/schemas/MCPBindingInfo"},"type":"array","title":"Active"}},"type":"object","required":["pending","active"],"title":"ListMCPBindingsResponse","description":"Pending and active bindings for a team."},"MCPAccessMode":{"type":"string","enum":["off","admin_approval","member_self_confirm"],"title":"MCPAccessMode","description":"Team policy for confirming MCP client bindings.\n\n``OFF`` is where every team starts: the MCP endpoint records no pending\nbinding at all. ``ADMIN_APPROVAL`` requires a ``MANAGE_TEAM`` human to\nconfirm each client. ``MEMBER_SELF_CONFIRM`` lets an existing member confirm\na client for themselves."},"MCPAccessModeResponse":{"properties":{"mode":{"$ref":"#/components/schemas/MCPAccessMode"},"can_manage":{"type":"boolean","title":"Can Manage"},"endpoint_url":{"type":"string","title":"Endpoint Url"}},"type":"object","required":["mode","can_manage","endpoint_url"],"title":"MCPAccessModeResponse","description":"The team's current MCP access mode plus whether the caller may change it."},"MCPBindingInfo":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"client_name":{"type":"string","title":"Client Name"},"requested_by":{"type":"string","title":"Requested By"},"confirmed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmed By"},"status":{"$ref":"#/components/schemas/MCPBindingStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","client_id","client_name","requested_by","confirmed_by","status","created_at"],"title":"MCPBindingInfo","description":"A single MCP client binding, pending or active."},"MCPBindingStatus":{"type":"string","enum":["pending","confirmed","revoked"],"title":"MCPBindingStatus","description":"Lifecycle of an MCP client binding (ENG-7326, E2).\n\nA binding is created ``PENDING`` when a client first reaches a team's MCP\nendpoint, becomes ``CONFIRMED`` once a human grants it, and ``REVOKED`` when\naccess is withdrawn."},"ManifestDataset":{"properties":{"id":{"type":"string","title":"Id","description":"Dataset UUID; an exact immutable version."},"name":{"type":"string","title":"Name","description":"Dataset name."},"version_number":{"type":"string","title":"Version Number","description":"Version within the dataset lineage."}},"type":"object","required":["id","name","version_number"],"title":"ManifestDataset","description":"One exact dataset version referenced by a milestone."},"ManifestExperiment":{"properties":{"id":{"type":"string","title":"Id","description":"Experiment UUID."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Agent-generated display name."},"stage":{"$ref":"#/components/schemas/ExperimentStage","description":"Workflow stage the Experiment reached."}},"type":"object","required":["id","stage"],"title":"ManifestExperiment","description":"One Experiment that belonged to a milestone."},"ManifestTrainingJob":{"properties":{"id":{"type":"string","title":"Id","description":"Training job UUID."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"Customer-facing model name."},"version_number":{"type":"string","title":"Version Number","description":"Version within the model lineage."},"base_model":{"type":"string","title":"Base Model","description":"Base model it was trained from."},"status":{"type":"string","title":"Status","description":"Raw persisted training status."},"deployable":{"type":"boolean","title":"Deployable","description":"Whether the artifact may serve traffic."},"not_deployable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Deployable Reason","description":"Stable reason code when the artifact cannot serve traffic."}},"type":"object","required":["id","version_number","base_model","status","deployable"],"title":"ManifestTrainingJob","description":"One training attempt recorded in a milestone's manifest."},"ManifestVersionRef":{"properties":{"id":{"type":"string","title":"Id","description":"Milestone UUID."},"number":{"type":"integer","title":"Number","description":"Monotonic per-project version number."},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective","description":"Goal set when the version opened."}},"type":"object","required":["id","number"],"title":"ManifestVersionRef","description":"Identity of the milestone a manifest describes."},"ModelBenchmarksResponse":{"properties":{"model_id":{"type":"string","title":"Model Id","description":"Canonical catalog model ID"},"coding":{"items":{"$ref":"#/components/schemas/BenchmarkScore"},"type":"array","title":"Coding","description":"Coding benchmarks, strongest first"},"agentic":{"items":{"$ref":"#/components/schemas/BenchmarkScore"},"type":"array","title":"Agentic","description":"Agentic benchmarks, strongest first"},"axes":{"items":{"$ref":"#/components/schemas/BenchmarkAxisSummary"},"type":"array","title":"Axes","description":"Per-axis summaries"},"source_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Note","description":"Attribution for the underlying figures"},"variant_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Note","description":"Caveat on how these figures map to the model served"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Most recent time we refreshed these figures"}},"type":"object","required":["model_id"],"title":"ModelBenchmarksResponse","description":"Roster benchmarks and axis means for a single base model."},"ModelDatasetsResponse":{"properties":{"training_datasets":{"items":{"$ref":"#/components/schemas/TrainingDatasetRow"},"type":"array","title":"Training Datasets"},"evaluation_datasets":{"items":{"$ref":"#/components/schemas/EvaluationDatasetRow"},"type":"array","title":"Evaluation Datasets"}},"type":"object","title":"ModelDatasetsResponse","description":"Datasets scoped to either a project or a base model.\n\nTraining rows come from ``datasets.type = 'training'``; evaluation\nrows come from ``datasets.type IN ('evaluation', 'benchmark')`` and\ncarry their most recent completed evaluation against the model."},"ModelDownloadResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"job_id":{"type":"string","title":"Job Id"},"download_url":{"type":"string","title":"Download Url"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","default":3600},"file_name":{"type":"string","title":"File Name"},"message":{"type":"string","title":"Message","default":"Download URL generated successfully"}},"type":"object","required":["success","job_id","download_url","file_name"],"title":"ModelDownloadResponse","description":"Response with presigned URL for model download"},"ModelLatencyTimeseriesPoint":{"properties":{"bucket_date":{"type":"string","title":"Bucket Date","description":"ISO date or datetime string"},"model":{"type":"string","title":"Model"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["bucket_date","model","avg_latency_ms","request_count"],"title":"ModelLatencyTimeseriesPoint","description":"One bucket of per-model latency for charts."},"ModelLatencyTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/ModelLatencyTimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"ModelLatencyTimeseriesResponse","description":"Per-model latency timeseries for charts."},"ModelMetrics":{"properties":{"inference_count":{"type":"integer","title":"Inference Count","description":"Number of inference rows in the last 24 hours. For a training-job id associated with a project, counts every inference against any model in that project (scoped by project_id). For orphan training jobs, counts by training_job_id. For base catalog ids, counts direct-base calls where model_id matches.","default":0},"error_count":{"type":"integer","title":"Error Count","description":"Inferences in the last 24 hours with status = 'failed'.","default":0},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms","description":"Average end-to-end latency over the last 24 hours, or null when no latency was recorded."},"avg_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Ttft Ms","description":"Average streaming time to first visible output chunk over the last 24 hours, or null when no TTFT was recorded."},"last_inference_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Inference At","description":"Most recent inference ``created_at`` observed in the last 24 hours, or null."},"latest_evaluation":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSummary"},{"type":"null"}],"description":"Most recent evaluation for this model id (all-time, status='complete')."},"inference_count_prev_24h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inference Count Prev 24H","description":"Inference count for the 24h window immediately before the current window (i.e. 48h ago to 24h ago). Used to compute the trend arrow on the KPI grid. Scoped to the requesting team."},"inference_count_all_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inference Count All Time","description":"All-time inference count with no time window, scoped to the requesting team. Shown as the caption below the 24h count on the monitoring KPI grid."},"p99_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency Ms","description":"p99 E2E latency in milliseconds over the last 24 hours. Distinct from ``avg_latency_ms``. Computed via Postgres ``percentile_cont(0.99) WITHIN GROUP (ORDER BY latency_ms)`` over the team's inferences."},"median_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Latency Ms","description":"Median (p50) E2E latency in milliseconds over the last 24 hours. Shown as the caption below p99 on the monitoring KPI grid."},"p99_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Ttft Ms","description":"p99 streaming TTFT in milliseconds over the last 24 hours."},"median_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Ttft Ms","description":"Median (p50) streaming TTFT in milliseconds over the last 24 hours."},"p99_ttft_ms_prev_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Ttft Ms Prev 24H","description":"p99 streaming TTFT for the prior 24h window."},"p99_latency_ms_prev_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency Ms Prev 24H","description":"p99 E2E latency for the prior 24h window. Used for the E2E latency trend arrow on the KPI grid."},"spend_24h_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend 24H Usd","description":"Estimated spend in USD attributed to this model in the last 24 hours. Computed as SUM(inferences.tokens) x input_price_per_million / 1_000_000 via the ``pricing.resolver`` lookup. Returns null when pricing is unavailable for the resolved model."},"spend_prev_24h_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Prev 24H Usd","description":"Spend for the prior 24h window. Used for the spend trend arrow."},"spend_per_1k_calls_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Per 1K Calls Usd","description":"Average cost per 1,000 inferences over the last 24 hours. Shown as the secondary caption on the Spend / 24h KPI cell. Null when ``spend_24h_usd`` is null or there are no inferences in the window."},"open_issue_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Issue Count","description":"Count of inferences in the last 24h where ``llmaj_verdict = 'incorrect'`` OR ``human_verdict = 'incorrect'``. Shown as the footer on the task model 'Inferences / 24hrs' stat card."}},"type":"object","title":"ModelMetrics","description":"Per-model metrics shown on the Models page and overview surfaces.\n\nCounts and latency are computed over the **last 24 hours** of\n``public.inferences`` rows. ``latest_evaluation`` is all-time and may\nbe ``None`` when the model has never been evaluated.\n\nAll counts and aggregates are **scoped to the requesting team** via the\nRLS-applied ``get_session()`` path — these are not cross-tenant fleet\nmetrics for base catalog ids."},"ModelMetricsRequest":{"properties":{"model_ids":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":0,"title":"Model Ids","description":"Model identifiers to compute metrics for. Accepts training-job UUIDs and base catalog ids."},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since","description":"Inclusive start of the rollup window (UTC). Defaults to 24 hours ago, preserving the legacy last-24h behaviour. Drives the page-level date picker on the models / routers surfaces."},"until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until","description":"Exclusive end of the rollup window (UTC). Defaults to now."}},"type":"object","required":["model_ids"],"title":"ModelMetricsRequest","description":"Batch request body for model metrics lookup."},"ModelMetricsResponse":{"properties":{"metrics":{"additionalProperties":{"$ref":"#/components/schemas/ModelMetrics"},"type":"object","title":"Metrics"}},"type":"object","title":"ModelMetricsResponse","description":"Batch response mapping input model id -> ModelMetrics.\n\nEvery requested id is present in ``metrics``; ids with no matching\ninference rows in the last 24 hours map to a zero-filled ``ModelMetrics``."},"ModelUsageTimeseriesPoint":{"properties":{"bucket_date":{"type":"string","title":"Bucket Date","description":"ISO date or datetime string"},"model":{"type":"string","title":"Model"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["bucket_date","model","request_count"],"title":"ModelUsageTimeseriesPoint","description":"One bucket of per-model usage for stacked bar charts."},"ModelUsageTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/ModelUsageTimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"ModelUsageTimeseriesResponse","description":"Per-model usage series for stacked bar charts."},"ModificationSummary":{"properties":{"duplicates_removed":{"type":"integer","title":"Duplicates Removed","default":0},"outliers_removed":{"type":"integer","title":"Outliers Removed","default":0},"samples_generated":{"type":"integer","title":"Samples Generated","default":0},"original_count":{"type":"integer","title":"Original Count","default":0},"final_count":{"type":"integer","title":"Final Count","default":0}},"type":"object","title":"ModificationSummary","description":"Summary of modifications applied during augmentation."},"MultiplicatorRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Multiplicator prompt (e.g., 'The sentiment should be')"},"choices":{"items":{"type":"string"},"type":"array","title":"Choices","description":"List of choices to balance across"}},"type":"object","required":["prompt","choices"],"title":"MultiplicatorRequest","description":"Multiplicator for balanced dataset distribution"},"NERClassifiedExample":{"properties":{"text":{"type":"string","title":"Text","description":"Example text"},"entities":{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Entities","description":"List of (entity_text, entity_type) tuples"},"feedback":{"anyOf":[{"type":"string","enum":["positive","negative"]},{"type":"null"}],"title":"Feedback","description":"User feedback: positive (upvote) or negative (downvote)"}},"type":"object","required":["text","entities"],"title":"NERClassifiedExample","description":"NER example with optional user feedback for improving generation."},"OutlierSample":{"properties":{"index":{"type":"integer","title":"Index"},"value":{"type":"number","title":"Value"},"z_score":{"type":"number","title":"Z Score"},"type":{"type":"string","title":"Type"},"sample":{"additionalProperties":true,"type":"object","title":"Sample"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint","description":"Content-based SHA-256 fingerprint for stable identification"}},"type":"object","required":["index","value","z_score","type","sample"],"title":"OutlierSample"},"OutlierThresholds":{"properties":{"mean_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mean Length"},"upper_bound_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Upper Bound Length"},"lower_bound_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lower Bound Length"}},"type":"object","title":"OutlierThresholds"},"OutliersAnalysis":{"properties":{"outlier_count":{"type":"integer","title":"Outlier Count"},"thresholds":{"$ref":"#/components/schemas/OutlierThresholds"},"samples":{"items":{"$ref":"#/components/schemas/OutlierSample"},"type":"array","title":"Samples"}},"type":"object","required":["outlier_count","thresholds","samples"],"title":"OutliersAnalysis"},"OverageSettingsResponse":{"properties":{"overage_enabled":{"type":"boolean","title":"Overage Enabled"},"topup_amount":{"type":"number","title":"Topup Amount","description":"Credits added per top-up charge (1 credit = $0.01)"},"topup_mode":{"type":"string","title":"Topup Mode","description":"Top-up mode: 'by' adds a fixed amount, 'to' restores balance to topup_amount","default":"by"},"charge_threshold":{"type":"number","title":"Charge Threshold","description":"Trigger charge when remaining credits drop below this"},"max_monthly_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Monthly Spend","description":"Optional per-team monthly auto-refill cap in credits (null uses platform default)"},"effective_monthly_cap":{"type":"number","title":"Effective Monthly Cap","description":"The monthly auto-refill cap actually enforced, in credits: the team's max_monthly_spend when it has selected one, and the platform default otherwise. Always populated, so a client never has to infer the ceiling in force from a null max_monthly_spend."},"current_month_charged":{"type":"number","title":"Current Month Charged","description":"Credits charged via overages this month"},"current_month_start":{"type":"string","title":"Current Month Start","description":"ISO timestamp of current billing month start"},"usage_reset_hour":{"type":"integer","title":"Usage Reset Hour","description":"Local hour when daily credits reset. 0-23 in usage_reset_timezone.","default":0},"usage_reset_timezone":{"type":"string","title":"Usage Reset Timezone","description":"IANA timezone used to interpret usage_reset_hour.","default":"UTC"},"usage_reset_hour_changed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Reset Hour Changed At","description":"ISO timestamp of last reset-hour change. Null if never changed."},"today_usage":{"type":"number","title":"Today Usage","description":"Credits consumed since midnight today in the team's usage_reset_timezone (falls back to UTC for invalid timezone names).","default":0.0}},"type":"object","required":["overage_enabled","topup_amount","charge_threshold","max_monthly_spend","effective_monthly_cap","current_month_charged","current_month_start"],"title":"OverageSettingsResponse","description":"Current overage billing settings for a team."},"OwnedResourceItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","label"],"title":"OwnedResourceItem","description":"One row the leaving user owns in a team."},"OwnedResourcesResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"is_sole_member":{"type":"boolean","title":"Is Sole Member"},"owned":{"additionalProperties":{"items":{"$ref":"#/components/schemas/OwnedResourceItem"},"type":"array"},"type":"object","title":"Owned"}},"type":"object","required":["is_sole_member","owned"],"title":"OwnedResourcesResponse","description":"Response for ``GET /teams/{team_id}/owned-resources``.\n\nEach key in ``owned`` is a stable resource-type identifier\n(``projects``, ``datasets``, ``training_jobs``, ``project_evaluation_runs``,\n``agent_runs``). Resource types with zero owned rows are omitted\nso the frontend can render an empty-state card directly when\n``len(owned) == 0`` (and also includes ``is_sole_member`` so the\nUI can route to the destructive sole-member-leave flow without a\nsecond round-trip)."},"PIIFinding":{"properties":{"row_index":{"type":"integer","title":"Row Index"},"column":{"type":"string","title":"Column"},"entity_type":{"type":"string","title":"Entity Type"},"text":{"type":"string","title":"Text"},"start":{"type":"integer","title":"Start"},"end":{"type":"integer","title":"End"},"score":{"type":"number","title":"Score"}},"type":"object","required":["row_index","column","entity_type","text","start","end","score"],"title":"PIIFinding","description":"A single PII finding"},"PaymentMethodInfo":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"card"},"brand":{"type":"string","title":"Brand"},"last4":{"type":"string","title":"Last4"},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Month"},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Year"},"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/BillingAddress"},{"type":"null"}]}},"type":"object","required":["id","brand","last4"],"title":"PaymentMethodInfo","description":"Information about a payment method.\n\n``brand`` and ``last4`` are always populated with a display-ready value\n(for non-card types like Link or bank accounts, the brand is the\nprovider name and ``last4`` may be an empty string). ``exp_month`` and\n``exp_year`` are only present for card-backed payment methods.\n``billing_name`` and ``billing_address`` mirror the Stripe billing\ndetails on file and are display-only."},"PendingInvitationsResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"invitations":{"items":{"$ref":"#/components/schemas/TeamInvitationResponse"},"type":"array","title":"Invitations"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["invitations","count"],"title":"PendingInvitationsResponse","description":"Response model for pending invitations for the current user."},"PersistedRecipeSeedRepeat":{"type":"string","enum":["unsupported","no_persisted_match","persisted_match_evaluated","seed_not_recorded"],"title":"PersistedRecipeSeedRepeat","description":"Whether an effective-recipe match under another seed was evaluated.\n\nThe public name remains stable, but equality now uses the dispatch-time\neffective recipe digest rather than reconstructed ORM columns (ENG-6562).\nScore agreement is not implied."},"PlanSuccessComparison":{"type":"string","enum":["beat_baseline","absolute_threshold"],"title":"PlanSuccessComparison","description":"What a plan's success threshold is measured against."},"PlatformBenchmarkResponse":{"properties":{"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"},"task_type":{"type":"string","title":"Task Type"},"source":{"type":"string","title":"Source"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"scorer_kind":{"type":"string","enum":["harness","llmaj","native"],"title":"Scorer Kind"},"scorer_config":{"$ref":"#/components/schemas/JsonObject-Output"}},"type":"object","required":["key","description","task_type","source","license","scorer_kind","scorer_config"],"title":"PlatformBenchmarkResponse","description":"One curated Fastino benchmark offered as an Evaluation Suite source."},"PresetDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"type":"string","title":"Task Type"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["id","name","description","task_type","config"],"title":"PresetDetail","description":"Preset detail with full configuration"},"PresetMetadata":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"task_type":{"type":"string","title":"Task Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["id","name","description","task_type"],"title":"PresetMetadata","description":"Preset metadata"},"PreviewDeploymentRequest":{"properties":{"training_job_id":{"type":"string","format":"uuid","title":"Training Job Id","description":"UUID of the exact fine-tuned version to prepare. Always a training job, never a project: a preview targets one artifact, not whatever the project currently routes to."}},"type":"object","required":["training_job_id"],"title":"PreviewDeploymentRequest","description":"Request body naming the exact version to make testable."},"PreviewDeploymentResponse":{"properties":{"training_job_id":{"type":"string","title":"Training Job Id","description":"The exact version this status describes."},"state":{"$ref":"#/components/schemas/PreviewState","description":"ready: a provider is serving this version now. warming/provisioning: in flight, poll again. inactive: servable but not loaded; activation is available. failed: the last attempt failed and may be retried. unavailable: the artifact cannot serve at all."},"detail":{"type":"string","title":"Detail","description":"Customer-safe explanation of the state."},"can_send_requests":{"type":"boolean","title":"Can Send Requests","description":"Whether an inference request against this version will be answered now. True for ready and warming -- a warming version is routable and the request itself brings the replica up, so the pane should send rather than wait for a state that only a request can advance."},"reason":{"anyOf":[{"$ref":"#/components/schemas/DeployabilityReason"},{"type":"null"}],"description":"Why the artifact is unusable; set only when state is unavailable."},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds","description":"How long to wait before polling again; set only for transient states."},"can_activate":{"type":"boolean","title":"Can Activate","description":"Whether this caller may trigger provisioning. False for members without the deploy permission, so the UI shows a truthful unavailable state instead of a button the server would reject."},"attempt_count":{"type":"integer","title":"Attempt Count","description":"How many activations have been requested for this version."},"retry_exhausted":{"type":"boolean","title":"Retry Exhausted","description":"Whether repeated failures have used up this version's retry budget. When true the state is failed but activation will be refused, so the UI should stop offering a retry and point at the version instead.","default":false}},"type":"object","required":["training_job_id","state","detail","can_send_requests","can_activate","attempt_count"],"title":"PreviewDeploymentResponse","description":"What a caller can currently do with one exact fine-tuned version."},"PreviewState":{"type":"string","enum":["ready","warming","provisioning","inactive","failed","unavailable"],"title":"PreviewState","description":"What a caller can do with an exact fine-tuned version right now."},"ProjectCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the project"},"icon":{"type":"string","maxLength":50,"title":"Icon","description":"Icon identifier for the project","default":"folder"},"repo":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Repo","description":"Optional repository reference or URL"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Optional project description"},"active_model_id":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Active Model Id","description":"Active model ID for inference"},"selected_model_id":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Selected Model Id","description":"[Deprecated] Use active_model_id instead."},"tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Tag","description":"Short kebab-case project label (e.g. web-navigation-agent). Set by whichever sandbox agent owns the project; the clustering agent that used to write it was deleted by ENG-6657."},"observations":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Observations","description":"Free-text agent notes about patterns observed"},"example":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Example","description":"Generated API example for the project"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID to assign this project to. Defaults to the user's personal team when omitted."},"visibility":{"type":"string","enum":["private","team"],"title":"Visibility","description":"Who can see this project: private (creator only) or team (all team members).","default":"private"},"adaptive_cadence":{"$ref":"#/components/schemas/AdaptiveCadence","description":"Adaptive fine-tuning is temporarily withdrawn, so this must be 'off' and defaults to 'off'. Any scheduled cadence (daily / weekly / monthly) is rejected with a 422.","default":"off"}},"type":"object","required":["name"],"title":"ProjectCreate","description":"Request model for creating a project."},"ProjectDatasetCountResponse":{"properties":{"project_id":{"type":"string","title":"Project Id"},"dataset_count":{"type":"integer","title":"Dataset Count"},"can_delete":{"type":"boolean","title":"Can Delete"}},"type":"object","required":["project_id","dataset_count","can_delete"],"title":"ProjectDatasetCountResponse","description":"Response model for getting dataset count for a project."},"ProjectDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["success","message","project_id"],"title":"ProjectDeleteResponse","description":"Response model for deleting a project."},"ProjectListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"projects":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Projects"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["projects","count"],"title":"ProjectListResponse","description":"Response model for listing projects."},"ProjectResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon","default":"folder"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"active_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Model Id"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"observations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observations"},"example":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Example"},"team_id":{"type":"string","title":"Team Id"},"visibility":{"type":"string","title":"Visibility","default":"private"},"adaptive_cadence":{"$ref":"#/components/schemas/AdaptiveCadence","default":"off"},"autonomy_enabled":{"type":"boolean","title":"Autonomy Enabled","default":true},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"selected_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Model Id","description":"Deprecated alias for active_model_id -- kept for backward compat.","readOnly":true}},"type":"object","required":["id","user_id","name","team_id","created_at","updated_at","selected_model_id"],"title":"ProjectResponse","description":"Response model for a single project."},"ProjectSeedRepeatStatusResponse":{"properties":{"statuses":{"additionalProperties":{"$ref":"#/components/schemas/PersistedRecipeSeedRepeat"},"type":"object","title":"Statuses"}},"type":"object","required":["statuses"],"title":"ProjectSeedRepeatStatusResponse","description":"Per-job persisted-recipe seed-repeat status for every job on a project.\n\nPowers the live `ImprovementTab` (ENG-6302), which renders every job as\nits own adapter row instead of the one candidate\n``/monitoring/improvement-candidates`` recommends.\n\nAttributes:\n    statuses: Training job ID -> persisted-recipe seed-repeat status.\n        See ``PersistedRecipeSeedRepeat`` for what each value means."},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"New name for the project"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon","description":"New icon identifier for the project"},"repo":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Repo","description":"New repository reference or URL"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"New project description"},"tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Tag","description":"Short kebab-case project label (e.g. web-navigation-agent). Set by whichever sandbox agent owns the project; the clustering agent that used to write it was deleted by ENG-6657."},"observations":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Observations","description":"Free-text agent notes about patterns observed"},"active_model_id":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Active Model Id","description":"Active model ID for inference"},"selected_model_id":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Selected Model Id","description":"[Deprecated] Use active_model_id instead."},"visibility":{"anyOf":[{"type":"string","enum":["private","team"]},{"type":"null"}],"title":"Visibility","description":"Who can see this project: private (creator only) or team (all team members)."},"adaptive_cadence":{"anyOf":[{"$ref":"#/components/schemas/AdaptiveCadence"},{"type":"null"}],"description":"Adaptive fine-tuning is temporarily withdrawn, so the only accepted value is 'off'. Any scheduled cadence (daily / weekly / monthly) is rejected with a 422. This does not change autonomy_enabled, which gates unrelated subsystems."}},"additionalProperties":false,"type":"object","title":"ProjectUpdate","description":"Request model for updating a project.\n\n``autonomy_enabled`` is not an accepted field and must not be sent\ndirectly. Sending an unknown field raises a 422. It is no longer derived\nfrom ``adaptive_cadence`` either (ENG-5651): it is a shared gate for\ninference clustering, usage taxonomy and LLMAJ, and an update carrying a\ncadence must not disturb it."},"ProjectVersionDetailResponse":{"properties":{"version":{"$ref":"#/components/schemas/ProjectVersionResponse"},"manifest":{"anyOf":[{"$ref":"#/components/schemas/CarryoverManifestPayload"},{"type":"null"}],"description":"Stored manifest; null for a milestone that has not been closed yet."}},"type":"object","required":["version"],"title":"ProjectVersionDetailResponse","description":"One milestone plus the manifest it was closed with."},"ProjectVersionListResponse":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/ProjectVersionResponse"},{"type":"null"}],"description":"The open milestone; null only before v1 exists."},"history":{"items":{"$ref":"#/components/schemas/ProjectVersionResponse"},"type":"array","title":"History","description":"Frozen and abandoned milestones, newest first. Read-only."}},"type":"object","title":"ProjectVersionListResponse","description":"Every milestone of a project, current first then history."},"ProjectVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"team_id":{"type":"string","title":"Team Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/ProjectVersionStatus"},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"carryover_summary":{"type":"string","title":"Carryover Summary"},"champion":{"anyOf":[{"$ref":"#/components/schemas/ChampionRef"},{"type":"null"}]},"created_by":{"type":"string","title":"Created By"},"closed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closed By"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","team_id","version_number","status","objective","carryover_summary","champion","created_by","closed_by","closed_at","created_at"],"title":"ProjectVersionResponse","description":"A single project milestone."},"ProjectVersionStatus":{"type":"string","enum":["current","frozen","abandoned"],"title":"ProjectVersionStatus","description":"Lifecycle of a project milestone version (EDD section 9.1)."},"PromotionEvidence":{"properties":{"recipe_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Fingerprint","description":"Fingerprint of the recipe that produced the promoted candidate"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id","description":"Experiment that drove the promotion, when a run key acted"},"finetune_plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finetune Plan Id","description":"Approved plan revision that authorised the promotion"},"selection_evaluation_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Evaluation Run Id","description":"Evaluation Suite run the promotion was decided on"}},"type":"object","title":"PromotionEvidence","description":"Allowlisted promotion evidence surfaced on ``deployment`` activity rows.\n\nMirrors the keys written into ``activity_events.metadata`` by\n``services.deployments.promotion_evidence.notify_owner_of_promotion``. Only\nthese four keys are exposed; anything else in the row's metadata is dropped\nso the API never leaks client attribution or Hub error detail. Every field\nis optional -- a promotion pressed by a human records no experiment/plan."},"PromptTokensDetails":{"properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens","default":0}},"type":"object","title":"PromptTokensDetails","description":"Per-input-class breakdown for OpenAI-shape usage payloads.\n\nMirrors OpenAI's ``prompt_tokens_details`` block and the industry\ncache-creation extension so clients reading\n``usage.prompt_tokens_details.cached_tokens`` /\n``cache_write_tokens`` keep working when Fastino relays a cache-aware\nupstream response. Both counts are subsets of ``prompt_tokens`` on the\nwire — that's the upstream contract Fastino relays faithfully.\n\nAttributes:\n    cached_tokens: Input tokens served from the upstream prompt cache\n        (cache read).\n    cache_write_tokens: Input tokens written into the upstream prompt\n        cache (cache creation). ``0`` for upstreams that bill writes\n        as plain input (OpenAI, vLLM)."},"PurchaseCreditsRequest":{"properties":{"amount_usd":{"type":"number","maximum":500.0,"exclusiveMinimum":0.0,"title":"Amount Usd","description":"Amount in USD to purchase (max $500 per transaction)"},"success_url":{"type":"string","title":"Success Url","description":"URL Stripe redirects to after a successful payment"},"cancel_url":{"type":"string","title":"Cancel Url","description":"URL Stripe redirects to if the purchase is cancelled"},"attempt_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}],"title":"Attempt Id","description":"Caller-generated id for this purchase attempt, stable across retries of it (e.g. a UUID). Guarantees the card is charged once per attempt; omit and same-minute retries are collapsed instead."}},"type":"object","required":["amount_usd","success_url","cancel_url"],"title":"PurchaseCreditsRequest","description":"Request to buy credits, in place on the saved card or via Checkout."},"PurchaseCreditsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url","description":"Stripe-hosted Checkout URL to redirect the user to"},"message":{"type":"string","title":"Message","description":"Human-readable status detail","default":""}},"type":"object","required":["success"],"title":"PurchaseCreditsResponse","description":"Response after a credit purchase attempt.\n\n``checkout_url`` is set when the buyer must finish on Stripe Checkout.\nIt is ``None`` when a saved card was charged and credits are already\ngranted."},"PushDatasetToHubResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"url":{"type":"string","title":"Url"},"repo_id":{"type":"string","title":"Repo Id"},"version":{"type":"string","title":"Version"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","url","repo_id","version","message"],"title":"PushDatasetToHubResponse","description":"Response model for pushing dataset to HuggingFace Hub"},"PushModelToHubResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"url":{"type":"string","title":"Url"},"repo_id":{"type":"string","title":"Repo Id"},"job_id":{"type":"string","title":"Job Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","url","repo_id","job_id","message"],"title":"PushModelToHubResponse","description":"Response model for pushing model to HuggingFace Hub"},"QualityMetricsResponse":{"properties":{"project_id":{"type":"string","title":"Project Id"},"pass_count":{"type":"integer","title":"Pass Count","description":"Inferences with llmaj_verdict='pass'.","default":0},"fail_count":{"type":"integer","title":"Fail Count","description":"Inferences with llmaj_verdict='fail'.","default":0},"uncertain_count":{"type":"integer","title":"Uncertain Count","description":"Inferences with llmaj_verdict='uncertain'.","default":0},"total_judged":{"type":"integer","title":"Total Judged","description":"Total inferences with any llmaj_verdict.","default":0},"pass_rate":{"type":"number","title":"Pass Rate","description":"Pass count / total judged.","default":0.0},"fail_rate":{"type":"number","title":"Fail Rate","description":"Fail count / total judged.","default":0.0}},"type":"object","required":["project_id"],"title":"QualityMetricsResponse","description":"LLMAJ quality metrics aggregation for a project.\n\nRehomed from ``schemas.agent_service`` by ENG-5651. The endpoint reports on\nLLM-as-a-judge verdicts over a project's inferences, which survive the\nContinuous Adaptation Agent withdrawal; it only lived beside the agent\nschemas by accident of where it was first written. Field names and types\nare unchanged, so the wire contract is identical."},"QualityTimeSeriesBucket":{"properties":{"ts":{"type":"string","format":"date-time","title":"Ts","description":"Bucket start (date_trunc'd) in UTC."},"llmaj_score_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Llmaj Score Avg","description":"Average ``llmaj_score`` over inferences in this bucket. Null when no inference in the bucket has a score."},"llmaj_correct_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Llmaj Correct Pct","description":"Fraction of judged inferences in this bucket where ``llmaj_verdict = 'pass'``. Null when no inference in the bucket has a verdict."},"sample_count":{"type":"integer","title":"Sample Count","description":"Number of inferences in this bucket with a non-null ``llmaj_score``.","default":0}},"type":"object","required":["ts"],"title":"QualityTimeSeriesBucket","description":"A single time-bucket sample of LLMAJ-derived quality metrics.\n\nComputed from ``public.inferences`` rows whose ``llmaj_verdict`` /\n``llmaj_score`` columns are populated by the asynchronous LLM-as-Judge\npipeline (see ``brain/services/data_engine/llmaj/handler.py``)."},"QualityTimeSeriesResponse":{"properties":{"model_id":{"type":"string","title":"Model Id","description":"Echo of the requested model id."},"interval":{"type":"string","enum":["day","week"],"title":"Interval","description":"``date_trunc`` bucket size used for the aggregation."},"since":{"type":"string","format":"date-time","title":"Since","description":"Inclusive start of the window (UTC)."},"until":{"type":"string","format":"date-time","title":"Until","description":"Exclusive end of the window (UTC)."},"series":{"items":{"$ref":"#/components/schemas/QualityTimeSeriesBucket"},"type":"array","title":"Series","description":"Buckets ordered by ``ts`` descending."}},"type":"object","required":["model_id","interval","since","until"],"title":"QualityTimeSeriesResponse","description":"Bucketed LLMAJ quality timeseries for a single model scope.\n\nReturns LLM-as-Judge pass-rate and score buckets for the requested\n``model_id`` over the requested window. Buckets are ordered by\n``ts`` descending. Empty windows return ``series=[]`` rather than 404.\n\nNo cross-model \"vs base\" comparison is provided. The codebase has no\npaired-evaluation pipeline, so a meaningful task-vs-base comparison\ncannot be derived from existing ``inferences`` data alone."},"RLConfig":{"properties":{"max_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Steps"},"kl_beta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kl Beta"},"group_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Size"},"sampling_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sampling Temperature"},"max_completion_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Length"},"logging_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Logging Steps"},"dpo_beta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dpo Beta"},"loss_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Type"},"reward_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reward Type"},"extras":{"additionalProperties":true,"type":"object","title":"Extras"}},"type":"object","title":"RLConfig"},"RecheckBillingResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"card_verified":{"type":"boolean","title":"Card Verified"},"card_fingerprint_present":{"type":"boolean","title":"Card Fingerprint Present"},"changed":{"type":"boolean","title":"Changed"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","card_verified","card_fingerprint_present","changed","message"],"title":"RecheckBillingResponse","description":"Result of a manual Stripe billing-state recheck for a team."},"RecordField":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","default":"str"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"allowed_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Values"}},"type":"object","required":["name"],"title":"RecordField","description":"Record field definition"},"RemovePaymentMethodRequest":{"properties":{"payment_method_id":{"type":"string","title":"Payment Method Id","description":"Stripe payment method ID to remove"}},"type":"object","required":["payment_method_id"],"title":"RemovePaymentMethodRequest","description":"Request model for removing a payment method."},"RemoveTeamPaymentMethodRequest":{"properties":{"payment_method_id":{"type":"string","title":"Payment Method Id","description":"Stripe payment method ID to remove"}},"type":"object","required":["payment_method_id"],"title":"RemoveTeamPaymentMethodRequest","description":"Request model for removing a team payment method."},"ReportFieldProvenance":{"properties":{"source_kind":{"$ref":"#/components/schemas/ReportSourceKind"},"source_id":{"type":"string","title":"Source Id"},"source_field":{"$ref":"#/components/schemas/ReportSourceField"}},"type":"object","required":["source_kind","source_id","source_field"],"title":"ReportFieldProvenance","description":"Exact table-kind, row, and column behind one normalized field."},"ReportItem":{"properties":{"source":{"$ref":"#/components/schemas/ReportSource"},"status":{"type":"string","title":"Status"},"timestamps":{"$ref":"#/components/schemas/ReportTimestamps"},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"final":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final"},"curation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curation"},"system_deficiencies":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Deficiencies"},"provenance":{"$ref":"#/components/schemas/ReportItemProvenance"}},"type":"object","required":["source","status","timestamps","provenance"],"title":"ReportItem","description":"One normalized item per AgentRun, AutoAgentRun, or Experiment."},"ReportItemProvenance":{"properties":{"structured":{"anyOf":[{"$ref":"#/components/schemas/ReportFieldProvenance"},{"type":"null"}]},"final":{"anyOf":[{"$ref":"#/components/schemas/ReportFieldProvenance"},{"type":"null"}]},"curation":{"anyOf":[{"$ref":"#/components/schemas/ReportFieldProvenance"},{"type":"null"}]},"system_deficiencies":{"anyOf":[{"$ref":"#/components/schemas/ReportFieldProvenance"},{"type":"null"}]}},"type":"object","required":["structured"],"title":"ReportItemProvenance","description":"Column-level provenance for all normalized report content."},"ReportSource":{"properties":{"kind":{"$ref":"#/components/schemas/ReportSourceKind"},"id":{"type":"string","title":"Id"}},"type":"object","required":["kind","id"],"title":"ReportSource","description":"Stable identity of the persisted report source."},"ReportSourceField":{"type":"string","enum":["report","final_report","data_curation_report","system_deficiencies","deliverables_json","curation_report"],"title":"ReportSourceField","description":"Persisted report column copied into a normalized content field."},"ReportSourceKind":{"type":"string","enum":["agent_run","auto_agent_run","experiment"],"title":"ReportSourceKind","description":"Persisted run table that supplied a normalized report item."},"ReportTimestamps":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["created_at"],"title":"ReportTimestamps","description":"Timestamps shared by both run types without inference."},"ResponsesReasoningRequest":{"properties":{"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort","description":"Optional reasoning effort hint, such as 'low', 'medium', or 'high'."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Optional Responses-style reasoning summary mode."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Switch for enabling reasoning on capable models."},"exclude":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exclude","description":"When supported by the upstream provider, exclude reasoning text from the response while still allowing the model to use reasoning."}},"additionalProperties":true,"type":"object","title":"ResponsesReasoningRequest","description":"Opt-in reasoning controls in OpenAI Responses format."},"ResponsesRequest":{"properties":{"model":{"type":"string","title":"Model"},"instructions":{"type":"string","title":"Instructions","default":""},"input":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"}],"title":"Input"},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tools"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Tool Choice","default":"auto"},"parallel_tool_calls":{"type":"boolean","title":"Parallel Tool Calls","default":false},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/ResponsesReasoningRequest"},{"type":"null"}]},"store":{"type":"boolean","title":"Store","description":"Whether to store response state for turn-to-turn continuation. When true, Fastino preserves the response for previous_response_id replay, including available tool-call and reasoning context.","default":true},"stream":{"type":"boolean","title":"Stream","default":false},"previous_response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Response Id","description":"Fastino inference ID or stored Responses wire ID to continue from. When present, Fastino reconstructs the prior turn from inference history and prepends it to the new input."},"include":{"items":{"type":"string"},"type":"array","title":"Include"},"service_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Tier"},"prompt_cache_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Cache Key"},"text":{"anyOf":[{"$ref":"#/components/schemas/ResponsesTextRequest"},{"type":"null"}]},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Output Tokens"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers"},"extra_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Body"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"**Deprecated.** Legacy task hint (``extract_entities`` / ``classify_text`` / ``extract_json`` / ``ner`` / ``schema``). The unified schema on ``text.format.schema`` disambiguates the task automatically. Submitting this field emits ``Deprecation: true`` and ``Sunset: <RFC 7231 date>`` headers on the response."},"include_confidence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Confidence","default":true},"include_spans":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Spans","default":true}},"additionalProperties":true,"type":"object","required":["model"],"title":"ResponsesRequest","description":"OpenAI-compatible Responses API request.\n\n``input`` accepts either a plain string (convenience shorthand used by the\nOpenAI SDK for simple text prompts) or a list of input items."},"ResponsesTextFormatRequest":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict"},"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","title":"ResponsesTextFormatRequest","description":"Structured-output controls for Responses text formatting."},"ResponsesTextRequest":{"properties":{"verbosity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verbosity"},"format":{"anyOf":[{"$ref":"#/components/schemas/ResponsesTextFormatRequest"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"ResponsesTextRequest","description":"Responses text controls."},"RowUpdate":{"properties":{"row_index":{"type":"integer","title":"Row Index","description":"Zero-based index of the row to update"},"changes":{"additionalProperties":true,"type":"object","title":"Changes","description":"Column name to new value mapping"}},"type":"object","required":["row_index","changes"],"title":"RowUpdate","description":"A single row update specification."},"ScanPhaseTimings":{"properties":{"resolve_ms":{"type":"number","title":"Resolve Ms"},"load_ms":{"type":"number","title":"Load Ms"},"prepare_ms":{"type":"number","title":"Prepare Ms"},"scan_ms":{"type":"number","title":"Scan Ms"},"pre_scan_ms":{"type":"number","title":"Pre Scan Ms","description":"Return everything that happens before the scan can start.\n\nSerialised rather than left to the caller: it is the figure both\nconsumers want, and summing three fields by hand is how a consumer\nsilently omits one when a phase is added.\n\nReturns:\n    Milliseconds spent resolving, loading and preparing.","readOnly":true}},"type":"object","required":["resolve_ms","load_ms","prepare_ms","scan_ms","pre_scan_ms"],"title":"ScanPhaseTimings","description":"Wall-clock cost of each phase of a scan, in milliseconds.\n\nA scan reports one latency, and that number cannot answer the question\noperators actually ask of it: was the time spent reaching the model, or in\nthe model. The two have opposite remedies -- a slow resolve/load is storage\nor query work, a slow scan is inference concurrency -- so a single figure\nsends every investigation back to guessing. ENG-6537 records a 3m25s scan\nwith no attribution at all, and the at-scale stress budget (90s) is\ncalibrated against a total that mixes both.\n\nThe split also has a second consumer: the client-abort stress probe has to\nabandon a scan *after* the process-wide admission gate is engaged, which is\nexactly ``pre_scan_ms`` later. Before this it used a static 5s guess that\nnothing verified (ENG-6723).\n\nAttributes:\n    resolve_ms: Resolving the dataset name to a row.\n    load_ms: Reading the dataset's records out of storage.\n    prepare_ms: Column selection/validation and materialising the frame.\n    scan_ms: The scan itself, including any regex fallback sweep."},"SetActiveTeamRequest":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"}},"type":"object","required":["team_id"],"title":"SetActiveTeamRequest","description":"Request body for POST /users/me/active-team."},"SetMCPAccessModeRequest":{"properties":{"mode":{"$ref":"#/components/schemas/MCPAccessMode"}},"type":"object","required":["mode"],"title":"SetMCPAccessModeRequest","description":"Request to change a team's MCP access mode."},"SignupAttributionRequest":{"properties":{"utm_source":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Term"},"gclid":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Gclid"},"twclid":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Twclid"},"rdt_cid":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Rdt Cid"}},"type":"object","title":"SignupAttributionRequest","description":"First-touch marketing attribution captured at signup.\n\nAll fields are optional. Only non-null values are persisted, and each field\nis written once (first non-null wins) so a later sign-in never overwrites\nthe original campaign. Values are length-bounded since they originate from\nuntrusted URL/cookie input.\n\nAttributes:\n    utm_source: Traffic source (e.g. 'google').\n    utm_medium: Marketing medium (e.g. 'cpc').\n    utm_campaign: Campaign name.\n    utm_content: Ad/content variant.\n    utm_term: Paid keyword (reserved for future use).\n    gclid: Google click id for ads conversion attribution.\n    twclid: X/Twitter click id for ads conversion attribution.\n    rdt_cid: Reddit click id for ads conversion attribution."},"SignupAttributionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"recorded":{"type":"boolean","title":"Recorded"}},"type":"object","required":["success","recorded"],"title":"SignupAttributionResponse","description":"Response for POST /users/me/attribution.\n\nAttributes:\n    success: Whether the request was processed without error.\n    recorded: Whether any attribution field was newly written (False when\n        nothing was supplied or every field was already set)."},"SpanFrequency":{"properties":{"text":{"type":"string","title":"Text"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["text","count"],"title":"SpanFrequency"},"SpendLimitResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"scope":{"type":"string","enum":["team","project"],"title":"Scope"},"team_id":{"type":"string","title":"Team Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"window_kind":{"anyOf":[{"type":"string","enum":["daily","monthly"]},{"type":"null"}],"title":"Window Kind"},"cap_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cap Usd"},"set_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set By"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["configured","scope","team_id"],"title":"SpendLimitResponse","description":"Live spend-limit config at one identity. Unset when configured is false."},"SplitRatio":{"properties":{"train":{"type":"number","title":"Train"},"val":{"type":"number","title":"Val"}},"type":"object","required":["train","val"],"title":"SplitRatio"},"SplitRatioConfig":{"properties":{"training":{"type":"number","maximum":0.95,"minimum":0.05,"title":"Training","description":"Fraction of data for training (0.05–0.95)","default":0.8},"evaluation":{"type":"number","maximum":0.95,"minimum":0.05,"title":"Evaluation","description":"Fraction of data for evaluation (0.05–0.95)","default":0.2}},"type":"object","title":"SplitRatioConfig","description":"Split ratio configuration for train/eval split datasets.\n\nValues are decimals (e.g. 0.8 for 80% training, 0.2 for 20% evaluation)."},"SplitsAnalysis":{"properties":{"train_count":{"type":"integer","title":"Train Count"},"val_count":{"type":"integer","title":"Val Count"},"train_distribution":{"items":{"$ref":"#/components/schemas/LabelDistribution"},"type":"array","title":"Train Distribution"},"val_distribution":{"items":{"$ref":"#/components/schemas/LabelDistribution"},"type":"array","title":"Val Distribution"},"split_ratio_actual":{"$ref":"#/components/schemas/SplitRatio"}},"type":"object","required":["train_count","val_count","train_distribution","val_distribution","split_ratio_actual"],"title":"SplitsAnalysis"},"StopJobRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why this candidate is being stopped"},"scores":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Scores","description":"Metric values used to decide the prune"},"checkpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint","description":"Checkpoint path or step associated with this stop"}},"type":"object","title":"StopJobRequest","description":"Optional prune evidence recorded when stopping a training job."},"StopJobResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["success","message","job_id","status"],"title":"StopJobResponse","description":"Response after stopping a training job"},"SuccessCriterionEdit":{"properties":{"success_metric":{"type":"string","maxLength":200,"minLength":1,"title":"Success Metric"},"success_comparison":{"$ref":"#/components/schemas/PlanSuccessComparison"},"success_threshold":{"type":"number","maximum":999999.999999,"minimum":1e-06,"title":"Success Threshold"},"success_suite_id":{"type":"string","format":"uuid","title":"Success Suite Id"},"success_rounds_required":{"type":"integer","maximum":10.0,"minimum":2.0,"title":"Success Rounds Required","default":2}},"additionalProperties":false,"type":"object","required":["success_metric","success_comparison","success_threshold","success_suite_id"],"title":"SuccessCriterionEdit","description":"A caller's replacement for the bar the agent proposed.\n\nWhole or nothing, exactly like the envelope's own criterion: a partial edit\nwould leave a bar the stopping rule reads as satisfiable and ends the run\nagainst, which is the failure decision 17 exists to prevent."},"SuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"SuccessResponse","description":"Generic success response."},"SupportContactRequest":{"properties":{"category":{"type":"string","maxLength":60,"minLength":1,"title":"Category"},"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"team_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Team Name"}},"type":"object","required":["category","subject","message"],"title":"SupportContactRequest","description":"A user-submitted support request from the in-app Support modal."},"SynthesisLogCreate":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"UUID grouping all entries for one synthesis session"},"entry_type":{"type":"string","enum":["prompt","seed_generation","seed_feedback","prompt_update","expansion","finalization"],"title":"Entry Type","description":"Type of log entry"},"content":{"additionalProperties":true,"type":"object","title":"Content","description":"Flexible payload keyed by entry_type"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id","description":"Dataset ID, set when already linked"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project ID for the session"}},"type":"object","required":["session_id","entry_type"],"title":"SynthesisLogCreate","description":"Request body for creating a single synthesis log entry."},"SynthesisLogDatasetResponse":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id"},"entries":{"items":{"$ref":"#/components/schemas/SynthesisLogEntry"},"type":"array","title":"Entries"}},"type":"object","required":["dataset_id","entries"],"title":"SynthesisLogDatasetResponse","description":"Response containing all synthesis log entries linked to a dataset."},"SynthesisLogEntry":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"session_id":{"type":"string","title":"Session Id"},"entry_type":{"type":"string","enum":["prompt","seed_generation","seed_feedback","prompt_update","expansion","finalization"],"title":"Entry Type"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","session_id","entry_type","content","created_at"],"title":"SynthesisLogEntry","description":"Single synthesis log entry returned from the API."},"SynthesisLogLinkRequest":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id","description":"Dataset UUID to associate with every entry in the session"}},"type":"object","required":["dataset_id"],"title":"SynthesisLogLinkRequest","description":"Request body for linking a synthesis session to a dataset."},"SynthesisLogSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"entries":{"items":{"$ref":"#/components/schemas/SynthesisLogEntry"},"type":"array","title":"Entries"}},"type":"object","required":["session_id","entries"],"title":"SynthesisLogSessionResponse","description":"Response containing all entries for a synthesis session."},"SystemContentBlock":{"properties":{"type":{"type":"string","title":"Type","default":"text"},"text":{"type":"string","title":"Text","default":""},"cache_control":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache Control"}},"type":"object","title":"SystemContentBlock","description":"A system content block in Anthropic format."},"TeamBillingFullStatusResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"has_payment_method":{"type":"boolean","title":"Has Payment Method"},"payment_methods":{"items":{"$ref":"#/components/schemas/PaymentMethodInfo"},"type":"array","title":"Payment Methods"},"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name","description":"Customer-level billing name on file in Stripe (display-only)."},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/BillingAddress"},{"type":"null"}],"description":"Customer-level billing address on file in Stripe (display-only)."}},"type":"object","required":["team_id","team_name","has_payment_method"],"title":"TeamBillingFullStatusResponse","description":"Full billing status for a team (for billing/admin/owner roles)."},"TeamBillingStatusResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"owner_name":{"type":"string","title":"Owner Name"},"has_payment_method":{"type":"boolean","title":"Has Payment Method"}},"type":"object","required":["team_id","team_name","owner_name","has_payment_method"],"title":"TeamBillingStatusResponse","description":"Response model for team billing status (limited info for team members)."},"TeamCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Name for the team"},"usage_reset_timezone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Usage Reset Timezone","description":"IANA timezone for the daily credit reset hour. Defaults to UTC when omitted."}},"type":"object","required":["name"],"title":"TeamCreate","description":"Request model for creating a team."},"TeamDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"team_id":{"type":"string","title":"Team Id"}},"type":"object","required":["success","message","team_id"],"title":"TeamDeleteResponse","description":"Response model for deleting a team."},"TeamInvitationCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address of the person to invite"},"role":{"$ref":"#/components/schemas/TeamRole","description":"Role to assign to the invitee","default":"viewer"}},"type":"object","required":["email"],"title":"TeamInvitationCreate","description":"Request model for inviting a member to a team."},"TeamInvitationResponse":{"properties":{"id":{"type":"string","title":"Id"},"team_id":{"type":"string","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/TeamRole"},"status":{"$ref":"#/components/schemas/InvitationStatus"},"invited_by":{"type":"string","title":"Invited By"},"inviter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Name"},"inviter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Email"},"created_at":{"type":"string","title":"Created At"},"expires_at":{"type":"string","title":"Expires At"},"email_sent":{"type":"boolean","title":"Email Sent","description":"Whether the invitation email was successfully handed off to SendGrid. Only meaningful on the create-invite response; list endpoints do not track historical delivery and default to True.","default":true}},"type":"object","required":["id","team_id","team_name","email","role","status","invited_by","created_at","expires_at"],"title":"TeamInvitationResponse","description":"Response model for a team invitation."},"TeamInvitationsListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"invitations":{"items":{"$ref":"#/components/schemas/TeamInvitationResponse"},"type":"array","title":"Invitations"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["invitations","count"],"title":"TeamInvitationsListResponse","description":"Response model for listing team invitations."},"TeamLeaveResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"team_id":{"type":"string","title":"Team Id"},"new_active_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Active Team Id"}},"type":"object","required":["success","message","team_id"],"title":"TeamLeaveResponse","description":"Response model for leaving a team."},"TeamListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"teams":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Teams"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["teams","count"],"title":"TeamListResponse","description":"Response model for listing teams."},"TeamMemberMfaStatus":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"has_mfa":{"type":"boolean","title":"Has Mfa"}},"type":"object","required":["user_id","email","has_mfa"],"title":"TeamMemberMfaStatus","description":"MFA enrollment status for a single team member.\n\n``has_mfa`` is True when the member has at least one verified TOTP\nfactor; failed admin-API lookups fall back to ``has_mfa=False`` with\nan empty ``email`` so the surface degrades rather than 500-ing."},"TeamMemberRemoveResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user_id":{"type":"string","title":"User Id"},"team_id":{"type":"string","title":"Team Id"}},"type":"object","required":["success","message","user_id","team_id"],"title":"TeamMemberRemoveResponse","description":"Response model for removing a team member."},"TeamMemberResponse":{"properties":{"id":{"type":"string","title":"Id"},"team_id":{"type":"string","title":"Team Id"},"user_id":{"type":"string","title":"User Id"},"role":{"$ref":"#/components/schemas/TeamRole"},"joined_at":{"type":"string","title":"Joined At"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Avatar Url"},"mfa_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mfa Enabled"},"mfa_factor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mfa Factor Count"}},"type":"object","required":["id","team_id","user_id","role","joined_at"],"title":"TeamMemberResponse","description":"Response model for a team member.\n\n``mfa_enabled`` and ``mfa_factor_count`` are sensitive targeting data\nand are populated only on the members-list response, and only for\ncallers holding ``MANAGE_BILLING`` — matching the gated\n``/teams/{id}/members/mfa-status`` surface. ``None`` means the field\nwas not populated (caller lacks the permission, or the endpoint does\nnot enrich it), never that MFA is disabled. Endpoints that do not\nenrich (e.g. role update) leave both fields ``None``."},"TeamMemberUsage":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"total_credits":{"type":"number","title":"Total Credits"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["user_id","email","full_name","total_credits","request_count"],"title":"TeamMemberUsage","description":"Usage information for a team member."},"TeamMembersListResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"members":{"items":{"$ref":"#/components/schemas/TeamMemberResponse"},"type":"array","title":"Members"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["members","count"],"title":"TeamMembersListResponse","description":"Response model for listing team members."},"TeamMembersMfaStatusResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/TeamMemberMfaStatus"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"TeamMembersMfaStatusResponse","description":"Response model for the gated members MFA-status surface."},"TeamResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner_id":{"type":"string","title":"Owner Id"},"zero_data_retention":{"type":"boolean","title":"Zero Data Retention","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"member_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Member Count"},"current_user_role":{"anyOf":[{"$ref":"#/components/schemas/TeamRole"},{"type":"null"}]},"capabilities":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Capabilities"},"max_seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Seats","description":"Cap on members plus pending invitations. Null means unlimited; a new team opens at the column's fail-closed default of 150 seats."},"max_api_keys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Api Keys","description":"Cap on active user-facing API keys, excluding internal run keys. Null means no team-specific cap, so the platform default applies; 0 forbids API keys."}},"type":"object","required":["id","name","owner_id","created_at","updated_at"],"title":"TeamResponse","description":"Response model for a single team."},"TeamRole":{"type":"string","enum":["owner","billing","admin","editor","viewer"],"title":"TeamRole","description":"Team member roles with hierarchical permissions.\n\nWire DTO mirror of the ORM ``TeamRoleType`` enum. Used only for API\nrequest/response serialization; authorization decisions route through the\nORM matrix (``database_tables.permissions``), never this enum."},"TeamRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/TeamRole","description":"New role for the team member"}},"type":"object","required":["role"],"title":"TeamRoleUpdate","description":"Request model for updating a member's role."},"TeamSettingsUpdate":{"properties":{"zero_data_retention":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Zero Data Retention","description":"Enable account-level Zero Data Retention: inference is not persisted and upstream gateways are told not to retain data."}},"type":"object","title":"TeamSettingsUpdate","description":"Allowed fields for PATCH /teams/{team_id}/settings."},"TeamUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"New name for the team"}},"type":"object","title":"TeamUpdate","description":"Request model for updating a team."},"TeamUsageResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"total_usage":{"type":"number","title":"Total Usage"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberUsage"},"type":"array","title":"Members"}},"type":"object","required":["team_id","team_name","total_usage","members"],"title":"TeamUsageResponse","description":"Response model for team member usage breakdown."},"TerminateJobResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"job_id":{"type":"string","title":"Job Id"},"deleted_checkpoints":{"type":"integer","title":"Deleted Checkpoints"}},"type":"object","required":["success","message","job_id","deleted_checkpoints"],"title":"TerminateJobResponse","description":"Response after terminating a training job"},"TokenVolumeTimeseriesPoint":{"properties":{"bucket_date":{"type":"string","title":"Bucket Date","description":"ISO date or datetime string"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["bucket_date","input_tokens","output_tokens","total_tokens","request_count"],"title":"TokenVolumeTimeseriesPoint","description":"One bucket of aggregated token volume."},"TokenVolumeTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/TokenVolumeTimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"TokenVolumeTimeseriesResponse","description":"Token volume timeseries for charts."},"ToolInfo":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","description"],"title":"ToolInfo","description":"Tool information."},"ToolsResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolInfo"},"type":"array","title":"Tools"},"client_type":{"type":"string","title":"Client Type"}},"type":"object","required":["tools","client_type"],"title":"ToolsResponse","description":"Response for tools endpoint."},"TrainingDatasetRow":{"properties":{"id":{"type":"string","title":"Id"},"dataset_name":{"type":"string","title":"Dataset Name"},"version_number":{"type":"string","title":"Version Number"},"dataset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Type","description":"Domain type of the dataset (ner, classification, custom, decoder)."},"generation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generation Type","description":"How the dataset was created: synthesize, upload, auto_relabel, manual_relabel, grow, external."},"sample_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Size"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/DatasetProvenance"},{"type":"null"}],"description":"Versioned durable lineage for this dataset, in the same shape GET /felix/datasets returns -- including that shape's redaction of user-authored task text from generator_context. Null on rows created before the provenance contract existed, so a consumer must keep its generation_type fallback (ENG-6625)."}},"type":"object","required":["id","dataset_name","version_number"],"title":"TrainingDatasetRow","description":"Dataset row rendered under the \"Training datasets\" section."},"TrainingJobBillingResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At","description":"When the job was dispatched to Modal (spawn / queue time)."},"compute_started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Started At","description":"When the training container actually began executing (ENG-6068). Distinct from started_at. FAILED/CANCELLED jobs bill only when this is set, so a null value here explains why billed=false."},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"billed":{"type":"boolean","title":"Billed","description":"Whether a billing request row exists for this job."},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"The requests.id row this job was billed against, if billed."},"charged_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Charged Usd","description":"Selling price actually charged for this job's GPU time."},"gpu_minutes":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Gpu Minutes","description":"Billed GPU minutes, derived from the billed request's duration_ms."},"billed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billed At","description":"When the billing request row was created."}},"type":"object","required":["job_id","status","billed"],"title":"TrainingJobBillingResponse","description":"Per-job billing outcome, verifiable by ``training_job_id`` (ENG-6131)."},"TrainingJobCreate":{"properties":{"model_name":{"type":"string","maxLength":100,"minLength":1,"title":"Model Name","description":"User-friendly name for the trained model"},"datasets":{"items":{"$ref":"#/components/schemas/DatasetReference"},"type":"array","minItems":1,"title":"Datasets","description":"Datasets to train on (supports multi-dataset training)"},"base_model":{"type":"string","minLength":1,"title":"Base Model","description":"HuggingFace model identifier (e.g. 'fastino/gliner2-base-v1', 'deepseek-ai/DeepSeek-V4-Flash', or 'nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16')."},"training_type":{"type":"string","enum":["full","lora"],"title":"Training Type","description":"Training type: 'full' or 'lora'","default":"lora"},"validation_data_percentage":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Validation Data Percentage","description":"Fraction of data held out for validation.","default":0.2},"nr_epochs":{"type":"integer","minimum":1.0,"title":"Nr Epochs","description":"Maximum training epochs. With early stopping enabled, training typically terminates well before this ceiling.","default":100},"learning_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Learning Rate","description":"Peak learning rate for AdamW. When omitted, the trainer's default applies — the per-model catalog rate (2e-4) for decoder LoRA on Modal, 2e-5 elsewhere. Pinning the old 2e-5 default on a decoder LoRA run under-trains the adapter by an order of magnitude."},"batch_size":{"type":"integer","minimum":1.0,"title":"Batch Size","description":"Training batch size. Prefer omitting this field so the training service applies the catalog default for ``base_model``. Explicit values equal to this Field default (4) that exceed the model's safe maximum are treated as legacy unset clients and clamped to the catalog default at the training service boundary; any other oversize value is rejected.","default":4},"seed":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"Seed","description":"Optional reproducibility seed for Modal decoder or GLiNER2 (encoder) training. Requests must pin provider_name to 'modal'; Fireworks and other unsupported architectures reject this field. When omitted, encoder and decoder jobs share the same trainer default (3407). Decoder contract: A pinned seed governs LoRA initialisation and the trainer's own RNG (dataloader shuffle order and dropout). It does not select the train/validation split: that partition uses a dedicated split seed so two runs that differ only in `seed` are scored on the same held-out rows. It does not make runs bit-identical: GPU reduction order stays non-deterministic, so metrics can differ between otherwise identical runs. Across six observed same-config decoder pairs, final validation loss agreed to within 6.8% relative and two pairs agreed exactly. Treat that as an observed envelope from production history, not a guaranteed bound. Encoder contract: A pinned seed governs dataset shuffle and auto-sizing downsample order, and the trainer's own weight-initialisation and dropout RNG. It does not select the train/validation split on a Brain-dispatched run: that partition is a fixed left-to-right split derived from validation_data_percentage (validation is the tail), independent of seed, so two runs that differ only in `seed` are scored on the same held-out rows. It does not make runs bit-identical: GPU reduction order stays non-deterministic (cuBLAS GEMM split-k and, unless the embedding-backward scatter/index_add path below applies), so metrics can still differ between identically-configured runs. Before encoder seed control existed, three identically-configured launches measured classification macro-F1 ranging 0.38–0.63 — treat pinning a seed as removing one real, measured source of that noise, not as a guaranteed bound on the rest. Every GLiNER2 job unconditionally pins cuDNN's own algorithm selection (the same flags GLiNER2's bundled Trainer sets) and enables torch.use_deterministic_algorithms in warn-only mode -- this is a fixed container default, not a per-request knob. The cuDNN pin currently costs nothing and changes nothing on this backbone: cuDNN governs convolution/pooling/RNN kernels, and this encoder's DeBERTa-v2 backbone has none, so pinning it has nothing to pin there; the throughput trade-off only materializes if a future backbone adds conv/pooling/RNN layers. The deterministic-algorithms half is not a no-op: it makes embedding-backward scatter/index_add deterministic on CUDA, narrowing -- but, since CUBLAS_WORKSPACE_CONFIG is not set, not closing -- the GPU-reduction-order gap above. It never raises instead of running (warn-only), so it is safe to always leave on, but for the same reason it does not guarantee bit-identical runs."},"save_steps":{"type":"integer","minimum":1.0,"title":"Save Steps","description":"Save checkpoint every N steps","default":100},"profile_training":{"type":"boolean","title":"Profile Training","description":"Enable structured training profiling for this run and persist a training_profile.json artifact.","default":false},"wandb_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wandb Api Key","description":"Optional W&B API key for logging"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project ID to associate with this training job. When omitted, the job is anchored to the caller's auto-managed \"Default\" project so it is always deployable and fleet-eligible."},"lora_r":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lora R","description":"LoRA rank. When omitted, the trainer's default applies: the per-model catalog rank for decoder LoRA on Modal (including 32 for the qualified Nemotron 3.5 Lightning profile), or 16 elsewhere."},"lora_alpha":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lora Alpha","description":"LoRA alpha. When omitted, the trainer's default applies: the per-model catalog alpha for decoder LoRA on Modal, or 32 elsewhere."},"lora_dropout":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lora Dropout","description":"LoRA dropout. When omitted, the trainer's default applies: the per-model catalog dropout for decoder LoRA on Modal, or 0.1 elsewhere."},"packing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Packing","description":"Pack multiple short examples into one training sequence. Applies to decoder dense-LoRA training only, which is the one backend that receives it. None uses the base model's catalog default, so omitting it leaves existing behaviour unchanged."},"mask_history":{"type":"boolean","title":"Mask History","description":"Decoder SFT loss masking knob. Dense decoder LoRA currently rejects true until assistant-only loss masking is supported by the active trainer. Defaults false to preserve the stock recipe.","default":false},"warmup_ratio":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Warmup Ratio","description":"Fraction of total training steps for linear LR warmup. Ignored when warmup_steps is set. When omitted, the trainer's default applies — the per-model catalog warmup (0.03) for decoder LoRA on Modal, none elsewhere."},"warmup_steps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Warmup Steps","description":"Absolute number of linear LR warmup steps. When set, takes priority over warmup_ratio."},"lr_scheduler_type":{"type":"string","title":"Lr Scheduler Type","description":"LR decay schedule after warmup: 'constant', 'linear', or 'cosine'.","default":"cosine"},"weight_decay":{"type":"number","minimum":0.0,"title":"Weight Decay","description":"AdamW weight decay (L2 penalty). 0 disables weight decay. Honoured by Modal decoder/dense-LoRA training paths. Not forwarded to GLiNER2 Modal training, which uses its own container default.","default":0.01},"early_stopping_patience":{"type":"integer","minimum":0.0,"title":"Early Stopping Patience","description":"Validation epochs without improvement before stopping. Requires validation_data_percentage > 0. Set to 0 to disable.","default":3},"early_stopping_min_delta":{"type":"number","minimum":0.0,"title":"Early Stopping Min Delta","description":"Minimum validation loss improvement to count as progress. Prevents early stopping from triggering on noise.","default":0.0001},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name","description":"Pin training to a specific provider (e.g. 'modal'). Bypasses automatic provider selection."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Canonical system prompt written to every decoder training row. When populated, it is persisted on ``training_jobs.system_prompt`` and re-injected by inference providers for API-direct callers that omit the ``system`` message (train/serve alignment), and prefills the inference-page system-prompt editor. Leave null for PAFT datasets, mixed-prompt uploads, or any case where no single prompt should be pinned at serve time. Ignored for non-decoder tasks."},"encoder_learning_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Encoder Learning Rate","description":"GLiNER only: learning rate applied to encoder parameters. When omitted, falls back to `learning_rate`."},"task_learning_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Task Learning Rate","description":"GLiNER only: learning rate applied to task-head parameters. When omitted, falls back to `learning_rate`."},"gradient_accumulation_steps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Gradient Accumulation Steps","description":"Accumulate gradients over N mini-batches before each optimizer step. Effective batch size = batch_size * N. Honoured by GLiNER and dense decoder LoRA training; when omitted, dense LoRA applies the per-model catalog default (8 for the H200 Nemotron 3.5 profiles, whose per-device batch is pinned to 1)."},"auto_data_sizing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Data Sizing","description":"GLiNER only. Opt-in: when true, downsample each training dataset to min(max_samples_per_dataset, max(min_samples_per_dataset, samples_per_label * num_labels)). When omitted or false, the full provided dataset is used (no silent downsampling). Defaults to false in the Modal container."},"min_samples_per_dataset":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Min Samples Per Dataset","description":"GLiNER only: lower bound for auto-sized dataset cap."},"max_samples_per_dataset":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Samples Per Dataset","description":"GLiNER only: upper bound for auto-sized dataset cap."},"samples_per_label":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Samples Per Label","description":"GLiNER only: scaling factor used when computing the auto-sized per-dataset cap."},"min_training_steps":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Training Steps","description":"GLiNER only: minimum number of optimizer steps; raises epoch count if the provided `nr_epochs` would yield fewer steps."},"training_algorithm":{"type":"string","enum":["sft","grpo","dpo"],"title":"Training Algorithm","description":"Training algorithm: 'sft' (default), 'grpo', or 'dpo'. GRPO and DPO are dispatched to the Modal RL entrypoint. GRPO requires rl_config.reward_type from the built-in menu; DPO requires {prompt, chosen, rejected} columns and optional rl_config.dpo_beta / loss_type.","default":"sft"},"rl_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rl Config","description":"Algorithm-specific hyperparameters for RL training. Supported keys (all optional unless noted, TRL-aligned defaults applied container-side): max_steps, kl_beta, group_size, sampling_temperature, max_completion_length, reward_type (GRPO; required, one of the built-in reward function names — see rl_training._BUILTIN_REWARDS); dpo_beta, loss_type (DPO); logging_steps (both; defaults to 25, lower for short smoke runs). When reward_type == 'llm_as_judge' (GRPO only) the judge call is routed through brain's '/v1/chat/completions' API authenticated with a per-run pio_sk_* key minted by ModalTrainingHandler._launch_and_monitor immediately before spawning the Modal function (the user never supplies the key — minted in the workqueue handler so the cleartext value never enters the SQS message body, injected into the Modal payload at spawn time, revoked from the post-training cleanup hook on terminal status). Additional knobs: llm_judge_model (HuggingFace model id, default 'claude-haiku-4-5' — must resolve to a brain catalog entry via resolve_catalog_model_id), llm_judge_rubric (template string with {prompt}/{completion}/{answer} placeholders; falls back to a generic faithfulness/quality rubric scored 1-10 when absent), llm_judge_score_scale (raw max score for normalisation to [0,1], default 10), llm_judge_timeout_s (HTTP timeout per judge call, default 30), llm_judge_max_concurrent (parallelism cap on judge HTTP calls, default 8), llm_judge_max_retries (per-row retry budget on transient HTTP errors, default 1), llm_judge_retry_backoff_s (sleep between retries, default 2.0)."}},"additionalProperties":false,"type":"object","required":["model_name","datasets","base_model"],"title":"TrainingJobCreate","description":"Request to create a training job."},"TrainingJobListResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"training_jobs":{"items":{"$ref":"#/components/schemas/TrainingJobResponse"},"type":"array","title":"Training Jobs"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total","description":"Total number of matching jobs (before pagination).","default":0},"has_more":{"type":"boolean","title":"Has More","description":"True when more results exist beyond this page.","default":false}},"type":"object","required":["success","training_jobs","count"],"title":"TrainingJobListResponse","description":"List of training jobs response."},"TrainingJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project ID this training job is associated with"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id","description":"Experiment whose agent trained this adapter, when one did. A composite foreign key pins it to the same project as project_id, so it is never an Experiment from elsewhere. Null for a job dispatched outside an Experiment -- a direct API call, or a job predating the column -- which means the owning Experiment is unknown, not that there is none. Adapter-scoped UI hand-offs read this to open the thread that produced the adapter instead of whichever of the project's Experiments happens to be the most recently active (ENG-7287)."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","default":"Unnamed Model"},"datasets":{"items":{"$ref":"#/components/schemas/DatasetReference"},"type":"array","title":"Datasets"},"base_model":{"type":"string","title":"Base Model"},"validation_data_percentage":{"type":"number","title":"Validation Data Percentage"},"nr_epochs":{"type":"integer","title":"Nr Epochs"},"learning_rate":{"type":"number","title":"Learning Rate"},"batch_size":{"type":"integer","title":"Batch Size"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Effective reproducibility seed for Modal decoder or GLiNER2 (encoder) training. Null for Fireworks, unknown, and other providers/architectures that cannot honor this contract, and also null for a legacy Modal decoder/encoder job created before seed provenance was recorded (ENG-6970): its seed is unknown, not reconstructed from the default the migration backfilled. A non-null value is always a genuinely recorded seed. Decoder contract: A pinned seed governs LoRA initialisation and the trainer's own RNG (dataloader shuffle order and dropout). It does not select the train/validation split: that partition uses a dedicated split seed so two runs that differ only in `seed` are scored on the same held-out rows. It does not make runs bit-identical: GPU reduction order stays non-deterministic, so metrics can differ between otherwise identical runs. Across six observed same-config decoder pairs, final validation loss agreed to within 6.8% relative and two pairs agreed exactly. Treat that as an observed envelope from production history, not a guaranteed bound. Encoder contract: A pinned seed governs dataset shuffle and auto-sizing downsample order, and the trainer's own weight-initialisation and dropout RNG. It does not select the train/validation split on a Brain-dispatched run: that partition is a fixed left-to-right split derived from validation_data_percentage (validation is the tail), independent of seed, so two runs that differ only in `seed` are scored on the same held-out rows. It does not make runs bit-identical: GPU reduction order stays non-deterministic (cuBLAS GEMM split-k and, unless the embedding-backward scatter/index_add path below applies), so metrics can still differ between identically-configured runs. Before encoder seed control existed, three identically-configured launches measured classification macro-F1 ranging 0.38–0.63 — treat pinning a seed as removing one real, measured source of that noise, not as a guaranteed bound on the rest. Every GLiNER2 job unconditionally pins cuDNN's own algorithm selection (the same flags GLiNER2's bundled Trainer sets) and enables torch.use_deterministic_algorithms in warn-only mode -- this is a fixed container default, not a per-request knob. The cuDNN pin currently costs nothing and changes nothing on this backbone: cuDNN governs convolution/pooling/RNN kernels, and this encoder's DeBERTa-v2 backbone has none, so pinning it has nothing to pin there; the throughput trade-off only materializes if a future backbone adds conv/pooling/RNN layers. The deterministic-algorithms half is not a no-op: it makes embedding-backward scatter/index_add deterministic on CUDA, narrowing -- but, since CUBLAS_WORKSPACE_CONFIG is not set, not closing -- the GPU-reduction-order gap above. It never raises instead of running (warn-only), so it is safe to always leave on, but for the same reason it does not guarantee bit-identical runs."},"resolved_recipe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resolved Recipe","description":"Immutable snapshot of what this job actually trained with, taken at dispatch: LoRA rank/alpha/dropout, learning rate, warmup ratio, gradient accumulation, packing, precision, attention backend, reasoning parser, container image, runtime profile, max sequence length, and seed, for every seed-capable provider/model. Null for jobs dispatched before the snapshot existed, and for providers that resolve no catalog recipe -- except Modal encoder and Modal RL strategies, which have no dense-LoRA catalog recipe but still return a non-null (seed) snapshot, since seed has no other persisted column. Read this rather than re-deriving from the catalog: the catalog reports what a job dispatched *today* would get, which is a different question."},"trained_model_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trained Model Path"},"hub_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hub Model Id","description":"HuggingFace repo id (e.g. 'username/model-name') set only after a successful push_training_job_to_hub call. This is the sole source of truth for whether a checkpoint has been pushed to the Hub -- it does not mean the repo is reachable by anyone other than the pusher: see hub_model_private for that. trained_model_path is an internal storage key and must never be parsed to infer a Hub repo id."},"hub_model_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hub Model Private","description":"Whether the pushed Hub repo is private, as recorded at push time. Null for a job that has never been pushed, and for a push recorded before this field existed (ENG-6761) -- this means the visibility was not recorded, not that either visibility applies. The request schema (HuggingFacePushModelRequest.private) defaults to True, but the only real caller (the CLI) always sends it explicitly, so that default is unreachable in practice -- null here means the visibility was never recorded, not that a caller omitted it. Render null as a neutral 'pushed, visibility unknown' state rather than assuming either PUBLISHED or PRIVATE."},"job_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Reference"},"instance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Type"},"status":{"type":"string","title":"Status"},"normalized_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Status","description":"Canonical status alias for compatibility handling (requested, running, complete, deployed, failed, cancelled)"},"is_terminal_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Terminal Status","description":"Whether this status is terminal for polling loops"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"model_auto_selected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Model Auto Selected"},"model_selection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Selection Reason"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"Task type derived from training datasets: 'ner', 'classification', 'custom', or 'decoder'"},"training_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Type","description":"Raw training method as persisted: 'lora', 'qlora', or 'full'."},"model_kind":{"anyOf":[{"type":"string","enum":["lora","full"]},{"type":"null"}],"title":"Model Kind","description":"Normalized fine-tune kind: 'lora' for adapters (lora/qlora) or 'full' for merged weights. Null when the persisted training type is unrecognised -- clients must not claim a kind in that case."},"artifact_ready":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Artifact Ready","description":"Whether an artifact location is recorded, so there is something to serve."},"provider_ready":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Provider Ready","description":"Whether a provider is already serving this artifact. False is not a deployment blocker: promotion provisions or re-warms a provider."},"is_deployable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deployable","description":"Whether this job passes server-side deployability validation for its own project. Authoritative -- the same check the deployment endpoints enforce."},"deployability_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployability Reason","description":"Why the job is not deployable (e.g. 'job_incomplete', 'missing_artifact', 'provider_incompatible'). Null when deployable."},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Merged labels from training datasets (entity types for NER, class labels for classification)"},"example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example","description":"Sample text to pre-load into inference input"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Training and evaluation metrics dictionary. Contains final_training_loss, final_validation_loss, best_validation_loss from training logs, and optional evaluation metrics (f1_score, precision_score, recall_score, accuracy) if an evaluation has been run."},"version_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Number","description":"Version number for this training job (e.g., '1', '2', '3')"},"root_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Job Id","description":"ID of the original/root training job this version derives from"},"provider_deployments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Deployments","description":"Provider-specific deployment metadata written by the training monitor, keyed by provider: {\"modal\": {...}}."},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name","description":"Training provider that handled this job (e.g. 'modal'). Jobs predating a provider removal carry an 'archived_<provider>' label."},"progress_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Percent","description":"Overall training completion percentage (0-100). Updated live during training."},"current_epoch":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Epoch","description":"Epoch currently in progress (1-indexed). Updated live during training."},"deployment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Status","description":"Deprecated. Always returns None -- deployment_status no longer exists.\n\nKept for backward compat with clients that read this field.","readOnly":true}},"type":"object","required":["id","user_id","datasets","base_model","validation_data_percentage","nr_epochs","learning_rate","batch_size","status","created_at","updated_at","deployment_status"],"title":"TrainingJobResponse","description":"Training job response model"},"TrainingJobUpdate":{"properties":{"project_id":{"anyOf":[{"type":"string","pattern":"(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}],"title":"Project Id","description":"Project ID (UUID) to assign the training job to, or null to unassign."}},"additionalProperties":false,"type":"object","title":"TrainingJobUpdate","description":"Thin PATCH body for ``PATCH /felix/training-jobs/{job_id}``.\n\nExposes only ``project_id``. Send ``null`` to unassign the training job\nfrom its current project. Unknown fields are rejected with HTTP 422.\n\nMovement semantics: this endpoint moves only the ``training_jobs.project_id``\nlabel. It does NOT cascade ``project_id`` updates to dependent rows\n(``deployments``, ``inferences``, ``project_evaluation_runs``) which each carry\ntheir own ``project_id``. Those records remain attached to their original\nproject. Callers needing aggregate-model movement must update the\ndependents explicitly."},"TrainingLogsResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"logs":{"items":{"$ref":"#/components/schemas/TrainingOutputLogEntry"},"type":"array","title":"Logs"},"total_logs":{"type":"integer","title":"Total Logs"}},"type":"object","required":["job_id","logs","total_logs"],"title":"TrainingLogsResponse","description":"Response containing training output logs for a job"},"TrainingOutputLogEntry":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"level":{"type":"string","title":"Level"},"message":{"type":"string","title":"Message"},"source":{"type":"string","title":"Source"}},"type":"object","required":["id","job_id","timestamp","level","message","source"],"title":"TrainingOutputLogEntry","description":"Single training output log entry (stdout/stderr)"},"TrainingPipelineBranchRequest":{"properties":{"from_stage_index":{"type":"integer","minimum":0.0,"title":"From Stage Index"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"stages":{"items":{"$ref":"#/components/schemas/TrainingPipelineStageCreate"},"type":"array","maxItems":10,"minItems":1,"title":"Stages"},"auto_deploy_final_stage":{"type":"boolean","title":"Auto Deploy Final Stage","default":true}},"additionalProperties":false,"type":"object","required":["from_stage_index","stages"],"title":"TrainingPipelineBranchRequest","description":"Request to branch a pipeline from an artifact-ready stage."},"TrainingPipelineControlResponse":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"active_stage_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Stage Index"}},"type":"object","required":["pipeline_id","status","message"],"title":"TrainingPipelineControlResponse","description":"Response for pipeline lifecycle control actions."},"TrainingPipelineCreate":{"properties":{"model_name":{"type":"string","title":"Model Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"stages":{"items":{"$ref":"#/components/schemas/TrainingPipelineStageCreate"},"type":"array","maxItems":10,"minItems":1,"title":"Stages"},"auto_deploy_final_stage":{"type":"boolean","title":"Auto Deploy Final Stage","default":true}},"additionalProperties":false,"type":"object","required":["model_name","stages"],"title":"TrainingPipelineCreate","description":"Request to create a multi-stage training pipeline."},"TrainingPipelineCreateResponse":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"status":{"type":"string","title":"Status"},"estimated_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Total Usd"},"stages":{"items":{"$ref":"#/components/schemas/TrainingPipelineStageCreateResponse"},"type":"array","title":"Stages"}},"type":"object","required":["pipeline_id","status","stages"],"title":"TrainingPipelineCreateResponse","description":"Created pipeline root and stage summary."},"TrainingPipelineDeployStageRequest":{"properties":{"reason":{"type":"string","title":"Reason","default":"pipeline_stage_deploy"}},"additionalProperties":false,"type":"object","title":"TrainingPipelineDeployStageRequest","description":"Request to deploy one artifact-ready pipeline stage."},"TrainingPipelineDeploymentControlResponse":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"project_id":{"type":"string","title":"Project Id"},"deployment_id":{"type":"string","title":"Deployment Id"},"stage_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage Job Id"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"}},"type":"object","required":["pipeline_id","project_id","deployment_id"],"title":"TrainingPipelineDeploymentControlResponse","description":"Response for pipeline deployment and rollback controls."},"TrainingPipelineDeploymentHistoryEntry":{"properties":{"stage_job_id":{"type":"string","title":"Stage Job Id"},"stage_index":{"type":"integer","title":"Stage Index"},"status":{"type":"string","title":"Status"},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name"},"normalized_adapter_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Adapter Path"},"provider_deployments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Deployments"},"deployed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deployed At"}},"type":"object","required":["stage_job_id","stage_index","status"],"title":"TrainingPipelineDeploymentHistoryEntry","description":"Deployment or artifact history derived from a pipeline stage."},"TrainingPipelineDeploymentHistoryResponse":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"deployments":{"items":{"$ref":"#/components/schemas/TrainingPipelineDeploymentHistoryEntry"},"type":"array","title":"Deployments"}},"type":"object","required":["pipeline_id","deployments"],"title":"TrainingPipelineDeploymentHistoryResponse","description":"Deployment history for one pipeline root."},"TrainingPipelineDetailResponse":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"status":{"type":"string","title":"Status"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"estimated_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Total Usd"},"total_stage_count":{"type":"integer","title":"Total Stage Count"},"completed_stage_count":{"type":"integer","title":"Completed Stage Count"},"active_stage_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Stage Index"},"progress_percent":{"type":"integer","title":"Progress Percent"},"paused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paused At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"branched_from_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branched From Job Id"},"pipeline_recipe":{"additionalProperties":true,"type":"object","title":"Pipeline Recipe"},"stages":{"items":{"$ref":"#/components/schemas/TrainingPipelineStageRead"},"type":"array","title":"Stages"},"deployment_history":{"items":{"$ref":"#/components/schemas/TrainingPipelineDeploymentHistoryEntry"},"type":"array","title":"Deployment History"}},"type":"object","required":["pipeline_id","status","total_stage_count","completed_stage_count","progress_percent","created_at","updated_at","pipeline_recipe","stages","deployment_history"],"title":"TrainingPipelineDetailResponse","description":"Detailed pipeline read response with stage lineage."},"TrainingPipelineEstimateResponse":{"properties":{"total_estimated_usd":{"type":"number","title":"Total Estimated Usd"},"total_estimated_minutes":{"type":"integer","title":"Total Estimated Minutes"},"stages":{"items":{"$ref":"#/components/schemas/TrainingPipelineStageEstimate"},"type":"array","title":"Stages"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions"},"confidence":{"type":"string","title":"Confidence"}},"type":"object","required":["total_estimated_usd","total_estimated_minutes","stages","assumptions","confidence"],"title":"TrainingPipelineEstimateResponse","description":"Read-only cost estimate for a training pipeline recipe."},"TrainingPipelineListItem":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"status":{"type":"string","title":"Status"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"estimated_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Total Usd"},"total_stage_count":{"type":"integer","title":"Total Stage Count"},"completed_stage_count":{"type":"integer","title":"Completed Stage Count"},"active_stage_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Stage Index"},"progress_percent":{"type":"integer","title":"Progress Percent"},"paused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paused At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["pipeline_id","status","total_stage_count","completed_stage_count","progress_percent","created_at","updated_at"],"title":"TrainingPipelineListItem","description":"Pipeline summary for list responses."},"TrainingPipelineListResponse":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/TrainingPipelineListItem"},"type":"array","title":"Pipelines"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["pipelines","limit","offset"],"title":"TrainingPipelineListResponse","description":"Paginated pipeline list response."},"TrainingPipelineRollbackRequest":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"}},"additionalProperties":false,"type":"object","required":["deployment_id"],"title":"TrainingPipelineRollbackRequest","description":"Request to roll a pipeline project back to an existing deployment."},"TrainingPipelineStageCreate":{"properties":{"base_model":{"type":"string","title":"Base Model"},"training_type":{"type":"string","enum":["full","lora","qlora"],"title":"Training Type","default":"lora"},"training_algorithm":{"type":"string","enum":["sft","dpo","grpo"],"title":"Training Algorithm","default":"sft"},"datasets":{"items":{"$ref":"#/components/schemas/DatasetReference"},"type":"array","minItems":1,"title":"Datasets"},"parent_stage_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Stage Index"},"merge_parent_before":{"type":"boolean","title":"Merge Parent Before","default":false},"rl_config":{"anyOf":[{"$ref":"#/components/schemas/RLConfig"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["base_model","datasets"],"title":"TrainingPipelineStageCreate","description":"One requested stage in a training pipeline recipe.\n\nPipeline v1 accepts only routing, dependency, and dataset shape fields.\nCreation dispatches stages with service-owned default hyperparameters until\nper-stage overrides are added to this schema."},"TrainingPipelineStageCreateResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"stage_index":{"type":"integer","title":"Stage Index"},"status":{"type":"string","title":"Status"},"job_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Reference"},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name"}},"type":"object","required":["job_id","stage_index","status"],"title":"TrainingPipelineStageCreateResponse","description":"Created pipeline stage summary."},"TrainingPipelineStageEstimate":{"properties":{"stage_index":{"type":"integer","title":"Stage Index"},"base_model":{"type":"string","title":"Base Model"},"training_type":{"type":"string","title":"Training Type"},"training_algorithm":{"type":"string","title":"Training Algorithm"},"dataset_count":{"type":"integer","title":"Dataset Count"},"dataset_row_count":{"type":"integer","title":"Dataset Row Count"},"estimated_minutes":{"type":"integer","title":"Estimated Minutes"},"estimated_usd":{"type":"number","title":"Estimated Usd"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions"}},"type":"object","required":["stage_index","base_model","training_type","training_algorithm","dataset_count","dataset_row_count","estimated_minutes","estimated_usd"],"title":"TrainingPipelineStageEstimate","description":"Estimated cost and duration for one pipeline stage."},"TrainingPipelineStageRead":{"properties":{"job_id":{"type":"string","title":"Job Id"},"stage_index":{"type":"integer","title":"Stage Index"},"status":{"type":"string","title":"Status"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"current_substep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Substep"},"base_model":{"type":"string","title":"Base Model"},"training_type":{"type":"string","title":"Training Type"},"training_algorithm":{"type":"string","title":"Training Algorithm"},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name"},"job_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Reference"},"parent_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Job Id"},"merge_parent_before":{"type":"boolean","title":"Merge Parent Before","default":false},"dataset_ids":{"items":{"type":"string"},"type":"array","title":"Dataset Ids"},"train_dataset_paths":{"items":{"type":"string"},"type":"array","title":"Train Dataset Paths"},"normalized_adapter_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Adapter Path"},"provider_deployments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Deployments"},"progress_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Percent"},"current_epoch":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Epoch"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["job_id","stage_index","status","base_model","training_type","training_algorithm","created_at","updated_at"],"title":"TrainingPipelineStageRead","description":"Read model for one persisted pipeline stage."},"UpdateModelNameRequest":{"properties":{"model_name":{"type":"string","maxLength":64,"minLength":1,"title":"Model Name","description":"New model name (alphanumeric, hyphens, underscores)"}},"type":"object","required":["model_name"],"title":"UpdateModelNameRequest","description":"Request to update a training job's model name"},"UpdateModelNameResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"job_id":{"type":"string","title":"Job Id"},"model_name":{"type":"string","title":"Model Name"}},"type":"object","required":["success","message","job_id","model_name"],"title":"UpdateModelNameResponse","description":"Response model for updating model name"},"UpdateOverageSettingsRequest":{"properties":{"overage_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overage Enabled"},"topup_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Topup Amount","description":"Credits per top-up (100 = $1)"},"topup_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topup Mode","description":"Top-up mode: 'by' or 'to'"},"charge_threshold":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Charge Threshold","description":"Remaining credits trigger"},"max_monthly_spend":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Monthly Spend","description":"Monthly auto-refill cap in credits (null uses platform default)"},"usage_reset_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Reset Hour","description":"Local hour for daily reset. Must be between 0 and 23."},"usage_reset_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Reset Timezone","description":"IANA timezone used to interpret usage_reset_hour."}},"type":"object","title":"UpdateOverageSettingsRequest","description":"Request to update overage billing settings."},"UpdateResourceProjectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"UpdateResourceProjectResponse","description":"Response for project assignment update."},"UpdateUserProfileRequest":{"properties":{"onboarded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Onboarded"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"agent_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Mode"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"},"preferred_framework":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Framework"},"adaptive_learning_cadence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adaptive Learning Cadence"},"team_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Size"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"training_opt_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Training Opt Out"}},"type":"object","title":"UpdateUserProfileRequest","description":"Request for updating user profile fields.\n\nAttributes:\n    onboarded: Mark onboarding as complete.\n    intent: User's chosen workflow intent from onboarding.\n    agent_mode: Preferred agent mode ('mle' or 'auto').\n    preferred_language: Preferred code language for inference snippets.\n    preferred_framework: Preferred API framework for inference snippets.\n    team_size: Self-reported team size bucket from onboarding.\n    org_name: Organisation name from onboarding (persisted + Attio).\n    use_case: Free-text use case from onboarding (persisted + Attio)."},"UpdateUserProfileResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"UpdateUserProfileResponse","description":"Response for user profile update."},"UpsertSpendLimitRequest":{"properties":{"window_kind":{"type":"string","enum":["daily","monthly"],"title":"Window Kind","description":"One window per identity. Setting monthly replaces a daily row."},"cap_usd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,19}0*$)\\d{0,10}\\.\\d{0,8}0*$)"}],"title":"Cap Usd","description":"Positive spend ceiling in dollars. Not teams.max_monthly_spend."}},"type":"object","required":["window_kind","cap_usd"],"title":"UpsertSpendLimitRequest","description":"Set or replace the one spend cap at a team or project identity."},"UsageHistoryRequest":{"properties":{"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date","description":"Start date in ISO format (YYYY-MM-DD)"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date","description":"End date in ISO format (YYYY-MM-DD)"}},"type":"object","title":"UsageHistoryRequest","description":"Request model for usage history."},"UsageHistoryResponse":{"properties":{"total_tokens":{"type":"integer","title":"Total Tokens"},"total_credits":{"type":"number","title":"Total Credits"},"total_cost":{"type":"number","title":"Total Cost"},"request_count":{"type":"integer","title":"Request Count"},"requests":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Requests"},"requests_limit":{"type":"integer","title":"Requests Limit","description":"Maximum detailed request rows included in this response.","default":100},"requests_truncated":{"type":"boolean","title":"Requests Truncated","description":"Whether more matching request rows exist than are returned.","default":false},"resource_breakdown_30d":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Resource Breakdown 30D"}},"type":"object","required":["total_tokens","total_credits","total_cost","request_count","requests"],"title":"UsageHistoryResponse","description":"Response model for usage history."},"UsageRequestItem":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","title":"Created At"},"credit_usage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Usage"},"token_usage":{"type":"integer","title":"Token Usage","default":0},"input_tokens":{"type":"integer","title":"Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","default":0},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens","default":0},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens","default":0},"cost":{"type":"number","title":"Cost","default":0.0},"endpoint":{"type":"string","title":"Endpoint","default":""},"model":{"type":"string","title":"Model","default":""},"workload_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workload Type"}},"type":"object","required":["id","created_at"],"title":"UsageRequestItem","description":"A single row from ``public.requests`` for the usage table UI."},"UsageRequestModelSummaryItem":{"properties":{"model":{"type":"string","title":"Model"},"request_count":{"type":"integer","title":"Request Count"},"total_credits":{"type":"number","title":"Total Credits","default":0.0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"total_input_tokens":{"type":"integer","title":"Total Input Tokens","default":0},"total_output_tokens":{"type":"integer","title":"Total Output Tokens","default":0},"total_cache_read_tokens":{"type":"integer","title":"Total Cache Read Tokens","default":0},"total_cache_write_tokens":{"type":"integer","title":"Total Cache Write Tokens","default":0},"total_cost":{"type":"number","title":"Total Cost","default":0.0},"last_request_at":{"type":"string","title":"Last Request At"}},"type":"object","required":["model","request_count","last_request_at"],"title":"UsageRequestModelSummaryItem","description":"Aggregated usage table row grouped by model."},"UsageRequestModelSummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UsageRequestModelSummaryItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UsageRequestModelSummaryResponse","description":"Full-range model summary for the usage table UI."},"UsageRequestsPageResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UsageRequestItem"},"type":"array","title":"Items"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total_count","page","page_size"],"title":"UsageRequestsPageResponse","description":"Paginated request log for the usage table UI."},"UsageTimeseriesPoint":{"properties":{"bucket_date":{"type":"string","title":"Bucket Date","description":"ISO date or datetime string"},"total_credits":{"type":"number","title":"Total Credits"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["bucket_date","total_credits","request_count"],"title":"UsageTimeseriesPoint","description":"One bucket of aggregated usage.\n\nFor daily granularity the value is an ISO date (``YYYY-MM-DD``).\nFor sub-daily intervals it is an ISO datetime (``YYYY-MM-DDTHH:MM:SS``)."},"UsageTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/UsageTimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"UsageTimeseriesResponse","description":"Daily usage series for charts."},"UsedModel":{"properties":{"model_id":{"type":"string","title":"Model Id","description":"Identifier the caller used for inference (base catalog id or fine-tuned model id). Stable grouping key for this row."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"Human-readable model name recorded on the inference, when set."},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model","description":"HuggingFace base model id for fine-tuned models; null for direct base-model calls."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project the model belongs to (fine-tunes only); null for base-model calls. Lets the client route a click to the project page."},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id","description":"Training job that produced the model (fine-tunes only); null for base-model calls."},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At","description":"Most recent ``created_at`` for this model across the user's inferences (excluding LLM-as-Judge calls)."},"inference_count":{"type":"integer","title":"Inference Count","description":"Lifetime count of the user's inferences against this model (excluding LLM-as-Judge calls).","default":0}},"type":"object","required":["model_id","last_used_at"],"title":"UsedModel","description":"A single model the user has run inference against.\n\nOne row per distinct ``inferences.model_id`` for the authenticated\nuser, carrying the most-recent usage timestamp and a lifetime call\ncount. Display-only attributes (``model_name``, ``base_model``,\n``project_id``, ``training_job_id``) let the client resolve a nice\nlabel and logo and route a click to the right detail page."},"UsedModelsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/UsedModel"},"type":"array","title":"Models","description":"Used models ordered by ``last_used_at`` descending."}},"type":"object","title":"UsedModelsResponse","description":"Distinct models a user has used, most-recently-used first.\n\nExcludes LLM-as-Judge (``source = 'llmaj'``) calls so the list only\nreflects models the user actually invoked. Scoped to the requesting\nuser — the ``service_role`` engine bypasses RLS, so the service\nfilters ``inferences.user_id`` explicitly."},"UserProfileResponse":{"properties":{"onboarded":{"type":"boolean","title":"Onboarded"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"agent_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Mode"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"},"preferred_framework":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Framework"},"active_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Team Id"},"adaptive_learning_cadence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adaptive Learning Cadence"},"team_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Size"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"training_opt_out":{"type":"boolean","title":"Training Opt Out","default":false},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["onboarded"],"title":"UserProfileResponse","description":"Response for GET /users/me — returns the user's public profile fields."},"UserRegistrationRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["refresh_token"],"title":"UserRegistrationRequest","description":"Request for user registration with Google OAuth.\n\nThe user's email and full name are intentionally NOT accepted from the\nclient — the brain always sources them from the immutable Supabase\nauth identity (JWT email + ``auth.users.user_metadata``). Accepting them\nfrom the request body was a phishing primitive (ENG-1214) that allowed\nany authenticated user to overwrite ``public.users.email`` for their\nown row with an arbitrary string, e.g. another user's address."},"UserRegistrationResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"}},"type":"object","required":["success","message"],"title":"UserRegistrationResponse","description":"Response for user registration."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantTraffic":{"properties":{"state":{"type":"string","enum":["receiving","inactive","unknown"],"title":"State","description":"Whether the variant served traffic in the window."},"attempts":{"type":"integer","title":"Attempts","description":"Qualifying customer attempts in the window."},"successes":{"type":"integer","title":"Successes","description":"Attempts that produced a usable response."},"failures":{"type":"integer","title":"Failures","description":"Attempts that failed; counted separately from successes."},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At","description":"Timestamp of the most recent attempt, if any."}},"type":"object","required":["state","attempts","successes","failures"],"title":"VariantTraffic","description":"Five-minute traffic counters for one variant."},"VersionCreateRequest":{"properties":{"revision_token":{"type":"string","minLength":1,"title":"Revision Token","description":"Token from the preview whose summary the caller reviewed."},"carryover_summary":{"type":"string","maxLength":20000,"title":"Carryover Summary","description":"Reviewed (and possibly edited) narrative to store on the closing milestone."},"objective":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Objective","description":"Objective for the new milestone."},"abandon":{"type":"boolean","title":"Abandon","description":"Close without a champion. Required when the milestone has none.","default":false},"carry_dataset_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Carry Dataset Ids","description":"Dataset versions to carry forward. Omit to carry every reference on the closing milestone."}},"additionalProperties":false,"type":"object","required":["revision_token","carryover_summary"],"title":"VersionCreateRequest","description":"Request body for closing the current milestone and opening the next."},"VersionCreateResponse":{"properties":{"closed":{"$ref":"#/components/schemas/ProjectVersionResponse","description":"The milestone that was frozen or abandoned."},"current":{"$ref":"#/components/schemas/ProjectVersionResponse","description":"The newly opened milestone."}},"type":"object","required":["closed","current"],"title":"VersionCreateResponse","description":"The outcome of a milestone transition."},"VersionDatasetListResponse":{"properties":{"datasets":{"items":{"$ref":"#/components/schemas/VersionDatasetResponse"},"type":"array","title":"Datasets"}},"type":"object","title":"VersionDatasetListResponse","description":"Every dataset reference carried by a milestone."},"VersionDatasetResponse":{"properties":{"dataset_id":{"type":"string","title":"Dataset Id"},"name":{"type":"string","title":"Name"},"version_number":{"type":"string","title":"Version Number"},"attached_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attached By"},"attached_at":{"type":"string","format":"date-time","title":"Attached At"},"source_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Version Id","description":"Milestone this reference was carried over from."}},"type":"object","required":["dataset_id","name","version_number","attached_at"],"title":"VersionDatasetResponse","description":"One dataset reference carried by a milestone."},"VersionPreviewResponse":{"properties":{"version_id":{"type":"string","title":"Version Id","description":"Milestone this preview describes."},"version_number":{"type":"integer","title":"Version Number"},"manifest":{"$ref":"#/components/schemas/CarryoverManifestPayload"},"summary":{"type":"string","title":"Summary","description":"Reviewable narrative carryover; the rendered manifest when the agent could not produce one."},"summary_is_fallback":{"type":"boolean","title":"Summary Is Fallback","description":"True when the narrative agent failed and the deterministic rendering was used."},"revision_token":{"type":"string","title":"Revision Token","description":"Hash of the manifest; required by the create call."},"champion":{"anyOf":[{"$ref":"#/components/schemas/ChampionRef"},{"type":"null"}],"description":"Champion currently recorded on the milestone."},"blockers":{"items":{"$ref":"#/components/schemas/ActiveWorkBlockerResponse"},"type":"array","title":"Blockers","description":"Unfinished work that must terminate before this milestone can close."},"can_close":{"type":"boolean","title":"Can Close","description":"Whether a create call would be accepted right now."},"carry_dataset_ids":{"items":{"type":"string"},"type":"array","title":"Carry Dataset Ids","description":"Dataset versions that would be carried into the next milestone by default."}},"type":"object","required":["version_id","version_number","manifest","summary","summary_is_fallback","revision_token","can_close"],"title":"VersionPreviewResponse","description":"What closing the current milestone would record."},"VersionTrainingJobListResponse":{"properties":{"training_jobs":{"items":{"$ref":"#/components/schemas/VersionTrainingJobResponse"},"type":"array","title":"Training Jobs"}},"type":"object","title":"VersionTrainingJobListResponse","description":"Training attempts attributed to a milestone."},"VersionTrainingJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version_number":{"type":"string","title":"Version Number"},"base_model":{"type":"string","title":"Base Model"},"status":{"type":"string","title":"Status"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this attempt is still running."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version_number","base_model","status","is_active","created_at"],"title":"VersionTrainingJobResponse","description":"One training attempt attributed to a milestone."},"WalletCompositionResponse":{"properties":{"granted_remaining":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Granted Remaining"},"purchased_remaining":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Purchased Remaining"}},"type":"object","required":["granted_remaining","purchased_remaining"],"title":"WalletCompositionResponse","description":"Grant-versus-purchased split of a wallet.\n\nAttributes:\n    granted_remaining: Unspent grant dollars. Drained before purchased.\n    purchased_remaining: Unspent paid dollars. May be negative."},"WeightsDeletionRequestResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"outcome":{"type":"string","enum":["received","refused","retired","retrained"],"title":"Outcome"},"decision_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Basis"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["request_id","outcome","created_at"],"title":"WeightsDeletionRequestResponse","description":"Response to ``POST /users/me/weights-deletion-request``.\n\nAttributes:\n    request_id: UUID of the recorded request.\n    outcome: The decision. Currently always ``refused`` — see\n        ``decision_basis`` and ``services.users.weights_deletion``.\n    decision_basis: The written reason for the outcome. Present whenever\n        the outcome is terminal; this is the Art. 12(4) response, so it\n        is returned to the requester rather than only stored.\n    decided_at: When the decision was recorded.\n    created_at: When the request was received."},"WorkspaceMetrics":{"properties":{"scope":{"type":"string","enum":["personal","team"],"title":"Scope","description":"Echo of the scope used to compute the rollup. ``personal`` aggregates the requesting user's inferences; ``team`` aggregates the user's active team.","default":"personal"},"window":{"type":"string","enum":["24h","7d","30d","90d","all"],"title":"Window","description":"Echo of the rolling window used to compute the rollup. One of ``24h``, ``7d``, ``30d``, ``90d``, ``all``.","default":"24h"},"inference_count":{"type":"integer","title":"Inference Count","description":"Number of inference rows in the selected window for the team.","default":0},"inference_count_previous":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inference Count Previous","description":"Inference count for the window immediately preceding the current one (equal length). For ``window='all'`` both windows are unbounded, so this equals ``inference_count``. Drives the trend arrow."},"inference_count_all_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inference Count All Time","description":"All-time inference count for the team with no time window."},"error_count":{"type":"integer","title":"Error Count","description":"Inferences in the selected window with status = 'failed'.","default":0},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms","description":"Average end-to-end latency over the selected window, or null when no latency was recorded."},"avg_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Ttft Ms","description":"Average streaming time to first visible output chunk over the selected window, or null when no TTFT was recorded."},"p99_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency Ms","description":"p99 E2E latency in milliseconds over the selected window, computed via ``percentile_cont(0.99) WITHIN GROUP (ORDER BY latency_ms)``."},"median_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Latency Ms","description":"Median (p50) E2E latency in milliseconds over the selected window."},"p99_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Ttft Ms","description":"p99 streaming TTFT in milliseconds over the selected window."},"median_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Ttft Ms","description":"Median (p50) streaming TTFT in milliseconds over the selected window."},"p99_ttft_ms_previous":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Ttft Ms Previous","description":"p99 streaming TTFT for the preceding window of equal length."},"p99_latency_ms_previous":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency Ms Previous","description":"p99 E2E latency for the preceding window of equal length. For ``window='all'`` both windows are unbounded, so this equals ``p99_latency_ms``. Drives the E2E latency trend arrow on the KPI grid."},"spend_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Usd","description":"Workspace spend in USD over the selected window, summed across all models the team called. Null when pricing is unavailable for every called model."},"spend_previous_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Previous Usd","description":"Workspace spend for the preceding window of equal length. For ``window='all'`` both windows are unbounded, so this equals ``spend_usd``."},"spend_per_1k_calls_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Per 1K Calls Usd","description":"Average cost per 1,000 inferences over the selected window."},"open_issue_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Issue Count","description":"Count of inferences in the selected window where ``llmaj_verdict = 'incorrect'`` OR ``human_verdict = 'incorrect'``."},"last_inference_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Inference At","description":"Most recent inference ``created_at`` observed in the selected window, or null."}},"type":"object","title":"WorkspaceMetrics","description":"Workspace-wide metrics for the monitoring page KPI grid.\n\nAggregates inference rows over a rolling window selected by the caller\n(``window``), scoped by ``scope``: ``personal`` filters by the requesting\nuser, ``team`` filters by the user's active team (every member sees the\nsame totals). The previous-window fields are computed against the\nimmediately preceding window of equal length so the UI can render trend\ndeltas; for ``window=\"all\"`` both windows are unbounded so each\n``*_previous`` field equals its current counterpart and the UI hides the\nresulting zero deltas. ``inference_count_all_time`` is independent of the\nwindow.\n\nScoping is applied as an explicit ``user_id`` / ``team_id`` predicate, not\nvia RLS — the ``service_role`` async engine bypasses Postgres RLS."},"AnthropicError":{"description":"Anthropic error envelope returned when the request includes `anthropic-version`. Distinct from the OpenAI `{error: {message, type, param, code}}` body.","properties":{"error":{"properties":{"message":{"title":"Message","type":"string"},"type":{"title":"Type","type":"string"}},"required":["type","message"],"title":"Error","type":"object"},"type":{"enum":["error"],"title":"Type","type":"string"}},"required":["type","error"],"title":"AnthropicError","type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Fastino API key supplied in the X-API-Key header."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Supabase access token or Fastino API key supplied as a Bearer token."}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}