{"openapi":"3.1.0","info":{"title":"Crowe Logic Foundry","description":"Control Plane. Auth, Workspaces, Plans, Model Gateway","version":"0.2.5"},"paths":{"/api/update/{platform}/{quality}/{commit}":{"get":{"tags":["updates"],"summary":"Check Update","description":"VS Code update probe endpoint.\n\nReturns 204 (no update) when the client is already on the latest\ncommit, or a JSON manifest pointing at the new build otherwise.","operationId":"check_update_api_update__platform___quality___commit__get","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"quality","in":"path","required":true,"schema":{"type":"string","title":"Quality"}},{"name":"commit","in":"path","required":true,"schema":{"type":"string","title":"Commit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/update/healthz":{"get":{"tags":["updates"],"summary":"Update Healthz","description":"Cheap liveness probe for the updates subsystem.","operationId":"update_healthz_api_update_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Update Healthz Api Update Healthz Get"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/plans":{"get":{"summary":"Public Plans","description":"Public plan listing for the pricing page. No auth required.","operationId":"public_plans_api_public_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing":{"get":{"summary":"Pricing Page","description":"Public pricing page. Reads from /api/public/plans; no auth.","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/ide/launch":{"post":{"summary":"Ide Launch","description":"Mint a handoff URL the browser can open to drop into a remote IDE session.","operationId":"ide_launch_api_ide_launch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/start-free":{"post":{"summary":"Start Free","description":"Single-call free-tier signup. Creates user + org + workspace + PAT\nand returns the raw PAT exactly once. The \"Start Free\" path on the\nlanding page calls this; the landing page then displays the PAT and\na \"Sign in with API Token\" handoff to the VS Code extension.\n\nIdempotency: if email already exists, we return 409 with a hint to\nuse the magic-link login flow instead. We don't silently issue a new\nPAT to a known email because that would let a stranger steal access\nto an existing workspace by guessing the address.","operationId":"start_free_api_auth_start_free_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartFreeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartFreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/refresh":{"post":{"summary":"Refresh","operationId":"refresh_api_auth_refresh_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"summary":"Auth Me","operationId":"auth_me_api_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/plans":{"get":{"summary":"List Plans","operationId":"list_plans_api_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array","title":"Response List Plans Api Plans Get"}}}}}}},"/api/workspaces":{"get":{"summary":"List Workspaces","operationId":"list_workspaces_api_workspaces_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceResponse"},"title":"Response List Workspaces Api Workspaces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Workspace","operationId":"create_workspace_api_workspaces_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/keys":{"post":{"summary":"Create Api Key","operationId":"create_api_key_api_workspaces__workspace_id__keys_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Api Keys","operationId":"list_api_keys_api_workspaces__workspace_id__keys_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeySummary"},"title":"Response List Api Keys Api Workspaces  Workspace Id  Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/keys/{key_id}":{"delete":{"summary":"Revoke Api Key","operationId":"revoke_api_key_api_workspaces__workspace_id__keys__key_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/entitlements/{resource}":{"get":{"summary":"Check Entitlement","description":"Check whether a workspace can use a resource (tokens, vision, ide, agents).","operationId":"check_entitlement_api_workspaces__workspace_id__entitlements__resource__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"resource","in":"path","required":true,"schema":{"type":"string","title":"Resource"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementCheck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/usage":{"get":{"summary":"Get Usage","operationId":"get_usage_api_workspaces__workspace_id__usage_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Record Usage","description":"Record a usage event. Called by the model gateway and agent workers.","operationId":"record_usage_api_workspaces__workspace_id__usage_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"event_type","in":"query","required":true,"schema":{"type":"string","title":"Event Type"}},{"name":"quantity","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Quantity"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout/public":{"post":{"summary":"Public Checkout","description":"Create a Stripe Checkout session for a not-yet-registered visitor.\n\nCalled by the landing page CTAs. Stores email + tier_key in the\nsession metadata so the checkout.session.completed webhook can\nprovision the user, workspace, and API key after payment.\nNo authentication required; Stripe handles email verification.","operationId":"public_checkout_api_billing_checkout_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout/session/{session_id}":{"get":{"summary":"Get Checkout Result","description":"Return the API key provisioned for a completed Checkout session.\n\nCalled by the success page on load. Only returns the key once\n(subsequent calls return 410 Gone). Stripe session id is the\none-time token that authorizes this read; after the first\nsuccessful read we mark the pending row as claimed.","operationId":"get_checkout_result_api_billing_checkout_session__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"}}}}}}},"/api/workspaces/{workspace_id}/credits":{"get":{"summary":"Get Credits","description":"Return the workspace's current credit balance and tier.","operationId":"get_credits_api_workspaces__workspace_id__credits_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/credits/consume":{"post":{"summary":"Consume Credits","description":"Atomically decrement credits. Returns 402 if insufficient balance.\n\nCallers should send the full estimated credit cost for a turn\nbefore the turn starts. If the estimate later turns out to have\nbeen wrong (tool overage, synth was skipped, etc.) the CLI sends\na corrective transaction with a negative or positive delta and\nreason='correction'.","operationId":"consume_credits_api_workspaces__workspace_id__credits_consume_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditConsumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/research":{"post":{"summary":"Run Research","description":"Run a Crowe Research Engine query, debiting workspace credits up front.\n\nAuth: workspace-scoped PAT or owner JWT (same model as credits/consume).\nCost: fixed per depth via RESEARCH_DEPTH_CREDITS. Insufficient credits\nreturns 402 before any LLM call. Engine errors return 502 with the\nengine's reason code in the body.","operationId":"run_research_api_research_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/credits/refill":{"post":{"summary":"Refill Credits","description":"Refill the workspace's credits to the tier allocation.\n\nCalled by the Stripe webhook on invoice.paid and\ncustomer.subscription.updated so a successful payment immediately\nrestores usage. Also callable by workspace owners for manual\nadjustments (audit logged as reason='manual_refill').","operationId":"refill_credits_api_workspaces__workspace_id__credits_refill_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditRefillRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/webhook":{"post":{"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nFlow:\n1. Verify signature (400 on failure).\n2. Atomic idempotency check: insert into billing_events keyed by\n   stripe_event_id. If the row already existed, treat as a replay\n   and return 200 without running handlers.\n3. Dispatch to per-event-type handler.\n4. Mark event processed.\n\nThe reconciliation logic itself lives in module-level _handle_*\nhelpers so unit tests can drive them directly.","operationId":"stripe_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/gateway/catalog":{"get":{"tags":["gateway"],"summary":"List Model Catalog","description":"Return the public model catalog without requiring an API key.","operationId":"list_model_catalog_api_gateway_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/gateway/chat":{"post":{"tags":["gateway"],"summary":"Gateway Chat","description":"Metered model gateway. Enforces plan-based model access and records usage.","operationId":"gateway_chat_api_gateway_chat_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/chat/stream":{"post":{"tags":["gateway"],"summary":"Gateway Chat Stream","description":"Streaming model gateway. Emits crowe-stream v0 events as SSE.\n\nBehind CROWE_STREAM_ENABLED so the rollout is reversible without a\nredeploy. Plan gating mirrors /chat exactly so streamed access can\nnever exceed the user's tier.\n\nToken accounting note: the v0 renderer counts SDK content deltas\n(one increment per feed call), which is approximately the\ncompletion_tokens count but does not include prompt_tokens. We\nrecord what we have on the done event; v1 of the protocol adds the\nreal provider usage block (gap #3 in the spec) at which point this\nbecomes accurate. The endpoint is dogfood-only until that lands.","operationId":"gateway_chat_stream_api_gateway_chat_stream_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/models":{"get":{"tags":["gateway"],"summary":"List Available Models","description":"Return models available for this API key's plan, with CroweLM display fields.","operationId":"list_available_models_api_gateway_models_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/me":{"get":{"tags":["gateway"],"summary":"Gateway Me","description":"Return the caller's plan + this-month budget state (two-bucket aware).\n\nPowers ``crowe-logic whoami`` so the user sees flagship vs standard token\nusage against their limits, not just the tier name. Read-only; mirrors the\naccounting in ``_enforce_token_budget``. Free/anon principals report the\ndaily turn cap instead of monthly token budgets.","operationId":"gateway_me_api_gateway_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/health":{"get":{"tags":["billing"],"summary":"Money Loop Health","description":"Readiness of the whole revenue path — each link's state + remediation.\n\nReturns no secret values, only configured/valid flags. HTTP 200 when\nready, 503 when any link is down (so a synthetic monitor can alert on it).\nSee control_plane/monetization_health.py.","operationId":"money_loop_health_api_billing_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout session for plan subscription.","operationId":"create_checkout_session_api_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout/self":{"post":{"tags":["billing"],"summary":"Create Self Checkout","description":"Checkout for the signed-in Crowe ID user (the `crowe-logic upgrade` rail).\n\nThe session and its subscription carry ``crowe_email`` metadata; the\nwebhook write-through stamps ``crowe_tier`` on the Keycloak user when\npayment lands, and the next token refresh unlocks the plan.","operationId":"create_self_checkout_api_billing_checkout_self_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/portal/self":{"post":{"tags":["billing"],"summary":"Create Self Portal","description":"Verified Crowe ID billing; only supported identity subscriptions switch.","operationId":"create_self_portal_api_billing_portal_self_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal Session","description":"Create a Stripe Customer Portal session for self-service management.","operationId":"create_portal_session_api_billing_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/subscription/{workspace_id}":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Get subscription status for a workspace.","operationId":"get_subscription_api_billing_subscription__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/usage/report":{"post":{"tags":["billing"],"summary":"Report Usage","description":"Report aggregated token usage to Stripe for billing.\n\nCalled by a scheduled job — aggregates unreported usage_events\nand creates Stripe usage records for metered billing.","operationId":"report_usage_api_billing_usage_report_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/config":{"get":{"tags":["billing"],"summary":"Billing Config","description":"Return public billing configuration for the frontend.","operationId":"billing_config_api_billing_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup":{"get":{"tags":["web"],"summary":"Signup Form","operationId":"signup_form_signup_get","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"pro","title":"Plan"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["web"],"summary":"Signup Submit","operationId":"signup_submit_signup_post","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"pro","title":"Plan"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_signup_submit_signup_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"get":{"tags":["web"],"summary":"Login Form","operationId":"login_form_login_get","parameters":[{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["web"],"summary":"Login Submit","operationId":"login_submit_login_post","parameters":[{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"get":{"tags":["web"],"summary":"Logout","operationId":"logout_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/checkout":{"get":{"tags":["web"],"summary":"Checkout","description":"Create a Stripe Checkout Session and redirect to Stripe's hosted page.","operationId":"checkout_checkout_get","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Interval"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/success":{"get":{"tags":["web"],"summary":"Billing Success","operationId":"billing_success_billing_success_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/cancel":{"get":{"tags":["web"],"summary":"Billing Cancel","operationId":"billing_cancel_billing_cancel_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/account":{"get":{"tags":["web"],"summary":"Account Page","operationId":"account_page_account_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/account/tokens":{"post":{"tags":["web"],"summary":"Account Create Token","operationId":"account_create_token_account_tokens_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_account_create_token_account_tokens_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/tokens/{token_id}/revoke":{"post":{"tags":["web"],"summary":"Account Revoke Token","operationId":"account_revoke_token_account_tokens__token_id__revoke_post","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"get":{"tags":["web"],"summary":"Billing Portal","operationId":"billing_portal_billing_portal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent/v1/chat":{"post":{"summary":"Agent Chat","operationId":"agent_chat_api_agent_v1_chat_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-PAYMENT","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/wallet/topup":{"post":{"summary":"Wallet Topup","description":"Out-of-band crowe-credit top-up of an agent wallet (ops / Stripe-webhook seam).\n\nFail-closed: disabled unless X402_ADMIN_TOKEN is set, and requires a matching\nX-Admin-Token (constant-time compare). Idempotent on ``idempotency_key`` so a\nretried top-up never double-credits. Lets an agent be funded before on-chain\nsettlement is wired, so a real agent-paid completion can happen today.","operationId":"wallet_topup_api_agent_v1_wallet_topup_post","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/x402":{"get":{"summary":"Well Known X402","description":"Machine-readable price catalog — agents crawl this to learn cost before paying.\n\nThe on-chain (\"exact\") scheme is listed only when a real treasury address is\nconfigured (X402_BASE_PAYTO), matching the 402 envelope. No fake schemes.","operationId":"well_known_x402__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent":{"get":{"summary":"Well Known Agent","description":"A2A-style agent card describing Crowe's agent-payable services.","operationId":"well_known_agent__well_known_agent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/anonymous/register":{"post":{"tags":["anonymous"],"summary":"Register Device","description":"Mint an anonymous device token. No PII; rate limited per source IP.","operationId":"register_device_v1_anonymous_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Device V1 Anonymous Register Post"}}}}}}},"/api/gateway/media/models":{"get":{"tags":["media"],"summary":"List Media Models","description":"Public catalog with per-unit credit pricing. No auth, mirrors /catalog.","operationId":"list_media_models_api_gateway_media_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/gateway/media/quote":{"post":{"tags":["media"],"summary":"Quote","description":"Price a request without running it.","operationId":"quote_api_gateway_media_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/media/image":{"post":{"tags":["media"],"summary":"Generate Image Route","operationId":"generate_image_route_api_gateway_media_image_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/media/video":{"post":{"tags":["media"],"summary":"Generate Video Route","operationId":"generate_video_route_api_gateway_media_video_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/media/animate":{"post":{"tags":["media"],"summary":"Animate Image Route","operationId":"animate_image_route_api_gateway_media_animate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gateway/media/asset/sora/{video_id}":{"get":{"tags":["media"],"summary":"Download Sora Asset","description":"Stream a finished Sora clip back to the caller.\n\nAuthenticated deliberately. The Azure content URL requires our API key, so\nproxying here is what lets a customer fetch their clip without ever being\nhanded a credential that would let them generate more.","operationId":"download_sora_asset_api_gateway_media_asset_sora__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/strains":{"post":{"tags":["mycology"],"summary":"Create Strain","operationId":"create_strain_mycology_strains_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Strain"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Strain"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mycology"],"summary":"List Strains","operationId":"list_strains_mycology_strains_get","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Strain"},"title":"Response List Strains Mycology Strains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/strains/{strain_id}":{"get":{"tags":["mycology"],"summary":"Get Strain","operationId":"get_strain_mycology_strains__strain_id__get","parameters":[{"name":"strain_id","in":"path","required":true,"schema":{"type":"string","title":"Strain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Strain"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/grow-logs":{"post":{"tags":["mycology"],"summary":"Create Grow Log","operationId":"create_grow_log_mycology_grow_logs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowLog"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowLog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mycology"],"summary":"List Grow Logs","operationId":"list_grow_logs_mycology_grow_logs_get","parameters":[{"name":"strain_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strain Id"}},{"name":"phase","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/GrowthPhase"},{"type":"null"}],"title":"Phase"}},{"name":"contaminated","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contaminated"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrowLog"},"title":"Response List Grow Logs Mycology Grow Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/grow-logs/{log_id}":{"get":{"tags":["mycology"],"summary":"Get Grow Log","operationId":"get_grow_log_mycology_grow_logs__log_id__get","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowLog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/grow-logs/{log_id}/phase":{"patch":{"tags":["mycology"],"summary":"Update Phase","operationId":"update_phase_mycology_grow_logs__log_id__phase_patch","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}},{"name":"phase","in":"query","required":true,"schema":{"$ref":"#/components/schemas/GrowthPhase"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/protocols":{"get":{"tags":["mycology"],"summary":"List Protocols","operationId":"list_protocols_mycology_protocols_get","parameters":[{"name":"species","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Species"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CultivationProtocol"},"title":"Response List Protocols Mycology Protocols Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["mycology"],"summary":"Create Protocol","operationId":"create_protocol_mycology_protocols_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CultivationProtocol"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CultivationProtocol"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/protocols/{protocol_id}":{"get":{"tags":["mycology"],"summary":"Get Protocol","operationId":"get_protocol_mycology_protocols__protocol_id__get","parameters":[{"name":"protocol_id","in":"path","required":true,"schema":{"type":"string","title":"Protocol Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CultivationProtocol"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/harvests":{"post":{"tags":["mycology"],"summary":"Record Harvest","operationId":"record_harvest_mycology_harvests_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestRecord"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mycology"],"summary":"List Harvests","operationId":"list_harvests_mycology_harvests_get","parameters":[{"name":"grow_log_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HarvestRecord"},"title":"Response List Harvests Mycology Harvests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/environment":{"post":{"tags":["mycology"],"summary":"Record Environment","operationId":"record_environment_mycology_environment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentReading"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/environment/{grow_log_id}":{"get":{"tags":["mycology"],"summary":"Get Environment History","operationId":"get_environment_history_mycology_environment__grow_log_id__get","parameters":[{"name":"grow_log_id","in":"path","required":true,"schema":{"type":"string","title":"Grow Log Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mycology/analytics/contamination-rate":{"get":{"tags":["mycology"],"summary":"Contamination Rate","operationId":"contamination_rate_mycology_analytics_contamination_rate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mycology/analytics/yield-summary":{"get":{"tags":["mycology"],"summary":"Yield Summary","operationId":"yield_summary_mycology_analytics_yield_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mycology/sop/generate":{"post":{"tags":["mycology"],"summary":"Generate Sop","description":"Generate a Standard Operating Procedure based on species and substrate.","operationId":"generate_sop_mycology_sop_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SOPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/analyze":{"post":{"tags":["vision"],"summary":"Analyze Image","description":"Analyze an uploaded image using the vision pipeline.","operationId":"analyze_image_vision_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_image_vision_analyze_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/analyze-url":{"post":{"tags":["vision"],"summary":"Analyze Image Url","description":"Analyze an image fetched from a remote URL.","operationId":"analyze_image_url_vision_analyze_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/contamination-check":{"post":{"tags":["vision"],"summary":"Check Contamination","description":"Specialized contamination detection endpoint.","operationId":"check_contamination_vision_contamination_check_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_check_contamination_vision_contamination_check_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContaminationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/contamination-check-url":{"post":{"tags":["vision"],"summary":"Check Contamination Url","description":"Run contamination detection against an image URL.","operationId":"check_contamination_url_vision_contamination_check_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContaminationUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContaminationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/analyses":{"get":{"tags":["vision"],"summary":"List Analyses","operationId":"list_analyses_vision_analyses_get","parameters":[{"name":"grow_log_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"}},{"name":"analysis_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AnalysisType"},{"type":"null"}],"title":"Analysis Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisionAnalysis"},"title":"Response List Analyses Vision Analyses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/analyses/{analysis_id}":{"get":{"tags":["vision"],"summary":"Get Analysis","operationId":"get_analysis_vision_analyses__analysis_id__get","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vision/health":{"get":{"tags":["vision"],"summary":"Vision Health","operationId":"vision_health_vision_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/research/papers":{"post":{"tags":["research"],"summary":"Add Paper","operationId":"add_paper_research_papers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paper"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paper"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["research"],"summary":"List Papers","operationId":"list_papers_research_papers_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResearchDomain"},{"type":"null"}],"title":"Domain"}},{"name":"keyword","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keyword"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Paper"},"title":"Response List Papers Research Papers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/papers/{paper_id}":{"get":{"tags":["research"],"summary":"Get Paper","operationId":"get_paper_research_papers__paper_id__get","parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paper"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/literature/search":{"post":{"tags":["research"],"summary":"Search Literature","description":"Search scientific literature (delegates to research agent tools).","operationId":"search_literature_research_literature_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteratureSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/experiments":{"post":{"tags":["research"],"summary":"Create Experiment","operationId":"create_experiment_research_experiments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["research"],"summary":"List Experiments","operationId":"list_experiments_research_experiments_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExperimentStatus"},{"type":"null"}],"title":"Status"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResearchDomain"},{"type":"null"}],"title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Experiment"},"title":"Response List Experiments Research Experiments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/experiments/{exp_id}":{"get":{"tags":["research"],"summary":"Get Experiment","operationId":"get_experiment_research_experiments__exp_id__get","parameters":[{"name":"exp_id","in":"path","required":true,"schema":{"type":"string","title":"Exp Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/experiments/{exp_id}/status":{"patch":{"tags":["research"],"summary":"Update Experiment Status","operationId":"update_experiment_status_research_experiments__exp_id__status_patch","parameters":[{"name":"exp_id","in":"path","required":true,"schema":{"type":"string","title":"Exp Id"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ExperimentStatus"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/experiments/{exp_id}/data-point":{"post":{"tags":["research"],"summary":"Add Data Point","operationId":"add_data_point_research_experiments__exp_id__data_point_post","parameters":[{"name":"exp_id","in":"path","required":true,"schema":{"type":"string","title":"Exp Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data Point"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/notes":{"post":{"tags":["research"],"summary":"Create Note","operationId":"create_note_research_notes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchNote"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchNote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["research"],"summary":"List Notes","operationId":"list_notes_research_notes_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResearchDomain"},{"type":"null"}],"title":"Domain"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResearchNote"},"title":"Response List Notes Research Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/protocols/generate":{"post":{"tags":["research"],"summary":"Generate Protocol","description":"Generate a research protocol template.","operationId":"generate_protocol_research_protocols_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolGenerationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/research/analytics/overview":{"get":{"tags":["research"],"summary":"Research Overview","operationId":"research_overview_research_analytics_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/compound/compounds":{"post":{"tags":["compound-discovery"],"summary":"Create Compound","operationId":"create_compound_compound_compounds_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compound"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compound-discovery"],"summary":"List Compounds","operationId":"list_compounds_compound_compounds_get","parameters":[{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CompoundSource"},{"type":"null"}],"title":"Source Type"}},{"name":"compound_class","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CompoundClass"},{"type":"null"}],"title":"Compound Class"}},{"name":"bioactivity","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BioactivityType"},{"type":"null"}],"title":"Bioactivity"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DevelopmentStage"},{"type":"null"}],"title":"Stage"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Compound"},"title":"Response List Compounds Compound Compounds Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/compounds/{compound_id}":{"get":{"tags":["compound-discovery"],"summary":"Get Compound","operationId":"get_compound_compound_compounds__compound_id__get","parameters":[{"name":"compound_id","in":"path","required":true,"schema":{"type":"string","title":"Compound Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/assays":{"post":{"tags":["compound-discovery"],"summary":"Record Assay","operationId":"record_assay_compound_assays_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioactivityAssay"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioactivityAssay"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compound-discovery"],"summary":"List Assays","operationId":"list_assays_compound_assays_get","parameters":[{"name":"compound_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compound Id"}},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BioactivityType"},{"type":"null"}],"title":"Activity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BioactivityAssay"},"title":"Response List Assays Compound Assays Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/admet":{"post":{"tags":["compound-discovery"],"summary":"Predict Admet","operationId":"predict_admet_compound_admet_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ADMETPrediction"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ADMETPrediction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/admet/{compound_id}":{"get":{"tags":["compound-discovery"],"summary":"Get Admet","operationId":"get_admet_compound_admet__compound_id__get","parameters":[{"name":"compound_id","in":"path","required":true,"schema":{"type":"string","title":"Compound Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ADMETPrediction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/admet/predict-lipinski":{"post":{"tags":["compound-discovery"],"summary":"Check Lipinski","description":"Check Lipinski's Rule of Five for oral drug-likeness.","operationId":"check_lipinski_compound_admet_predict_lipinski_post","parameters":[{"name":"compound_id","in":"query","required":true,"schema":{"type":"string","title":"Compound Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/targets":{"post":{"tags":["compound-discovery"],"summary":"Add Target","operationId":"add_target_compound_targets_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetInteraction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetInteraction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compound-discovery"],"summary":"List Targets","operationId":"list_targets_compound_targets_get","parameters":[{"name":"compound_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compound Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TargetInteraction"},"title":"Response List Targets Compound Targets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/sar":{"post":{"tags":["compound-discovery"],"summary":"Create Sar Analysis","operationId":"create_sar_analysis_compound_sar_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SARAnalysis"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SARAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compound-discovery"],"summary":"List Sar Analyses","operationId":"list_sar_analyses_compound_sar_get","parameters":[{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BioactivityType"},{"type":"null"}],"title":"Activity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SARAnalysis"},"title":"Response List Sar Analyses Compound Sar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compound/analytics/pipeline":{"get":{"tags":["compound-discovery"],"summary":"Compound Pipeline","description":"Overview of compound discovery pipeline.","operationId":"compound_pipeline_compound_analytics_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/compound/analytics/organisms":{"get":{"tags":["compound-discovery"],"summary":"Organisms Summary","description":"Summary of source organisms in the compound library.","operationId":"organisms_summary_compound_analytics_organisms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/knowledge/embeddings/index":{"post":{"tags":["Knowledge Plane"],"summary":"Index Content","description":"Index a piece of content for semantic search.","operationId":"index_content_knowledge_embeddings_index_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/embeddings/search":{"get":{"tags":["Knowledge Plane"],"summary":"Semantic Search","description":"Semantic search across all indexed content.","operationId":"semantic_search_knowledge_embeddings_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Natural language search query","title":"Query"},"description":"Natural language search query"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source Type"},"description":"Filter by source type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"},"title":"Response Semantic Search Knowledge Embeddings Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/embeddings/stats":{"get":{"tags":["Knowledge Plane"],"summary":"Embedding Stats","description":"Get embedding store statistics.","operationId":"embedding_stats_knowledge_embeddings_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/knowledge/graph/edges":{"post":{"tags":["Knowledge Plane"],"summary":"Add Edge","description":"Add a relationship to the knowledge graph.","operationId":"add_edge_knowledge_graph_edges_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeEdge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Plane"],"summary":"List Edges","description":"List knowledge graph edges with optional filters.","operationId":"list_edges_knowledge_graph_edges_get","parameters":[{"name":"from_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Type"}},{"name":"relation","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation"}},{"name":"to_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/graph/neighbors":{"get":{"tags":["Knowledge Plane"],"summary":"Get Neighbors","description":"Get neighbors of an entity in the knowledge graph.","operationId":"get_neighbors_knowledge_graph_neighbors_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","title":"Entity Type"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"relation","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation"}},{"name":"max_depth","in":"query","required":false,"schema":{"type":"integer","maximum":3,"minimum":1,"default":1,"title":"Max Depth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GraphNeighbor"},"title":"Response Get Neighbors Knowledge Graph Neighbors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/graph/stats":{"get":{"tags":["Knowledge Plane"],"summary":"Graph Stats","description":"Get knowledge graph statistics.","operationId":"graph_stats_knowledge_graph_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/knowledge/taxonomy/species":{"get":{"tags":["Knowledge Plane"],"summary":"List Species","description":"List species in the taxonomy.","operationId":"list_species_knowledge_taxonomy_species_get","parameters":[{"name":"genus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genus"}},{"name":"edibility","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edibility"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Species"},"title":"Response List Species Knowledge Taxonomy Species Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Knowledge Plane"],"summary":"Create Species","description":"Add a species to the taxonomy.","operationId":"create_species_knowledge_taxonomy_species_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Species"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Species"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/taxonomy/species/{species_id}":{"get":{"tags":["Knowledge Plane"],"summary":"Get Species","description":"Get a species by ID.","operationId":"get_species_knowledge_taxonomy_species__species_id__get","parameters":[{"name":"species_id","in":"path","required":true,"schema":{"type":"string","title":"Species Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Species"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge/taxonomy/species/{species_id}/compounds":{"get":{"tags":["Knowledge Plane"],"summary":"Species Compounds","description":"Get all compounds produced by a species (via knowledge graph).","operationId":"species_compounds_knowledge_taxonomy_species__species_id__compounds_get","parameters":[{"name":"species_id","in":"path","required":true,"schema":{"type":"string","title":"Species Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/config":{"get":{"tags":["Dashboard"],"summary":"Dashboard Config","description":"Expose same-host dashboard configuration for local and remote deploys.","operationId":"dashboard_config_dashboard_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/service-health":{"get":{"tags":["Dashboard"],"summary":"Dashboard Service Health","description":"Check IDE-adjacent service health server-side to avoid browser CORS issues.","operationId":"dashboard_service_health_dashboard_service_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/{path}":{"get":{"tags":["Dashboard"],"summary":"Serve Dashboard","description":"Serve the single-page dashboard application.","operationId":"serve_dashboard_dashboard__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Serve Dashboard","description":"Serve the single-page dashboard application.","operationId":"serve_dashboard_dashboard_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["Dashboard"],"summary":"Serve Dashboard","description":"Serve the single-page dashboard application.","operationId":"serve_dashboard__get","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ADMETCategory":{"type":"string","enum":["favorable","moderate","unfavorable","unknown"],"title":"ADMETCategory"},"ADMETPrediction":{"properties":{"compound_id":{"type":"string","title":"Compound Id"},"absorption":{"$ref":"#/components/schemas/ADMETCategory","default":"unknown"},"distribution":{"$ref":"#/components/schemas/ADMETCategory","default":"unknown"},"metabolism":{"$ref":"#/components/schemas/ADMETCategory","default":"unknown"},"excretion":{"$ref":"#/components/schemas/ADMETCategory","default":"unknown"},"toxicity":{"$ref":"#/components/schemas/ADMETCategory","default":"unknown"},"oral_bioavailability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oral Bioavailability"},"bbb_penetration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bbb Penetration"},"cyp_inhibition":{"items":{"type":"string"},"type":"array","title":"Cyp Inhibition"},"herg_risk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Herg Risk"},"lipinski_violations":{"type":"integer","title":"Lipinski Violations","default":0},"predicted_at":{"type":"string","format":"date-time","title":"Predicted At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["compound_id"],"title":"ADMETPrediction"},"AgentChatRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{},"type":"array","title":"Messages"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"}},"type":"object","required":["model","messages"],"title":"AgentChatRequest"},"AnalysisType":{"type":"string","enum":["contamination","growth_stage","species_id","morphology","general"],"title":"AnalysisType"},"AnimateRequest":{"properties":{"image":{"type":"string","title":"Image","description":"Public https URL of the seed image"},"prompt":{"type":"string","title":"Prompt"},"model":{"type":"string","title":"Model","default":"sora"},"seconds":{"type":"number","maximum":60.0,"exclusiveMinimum":0.0,"title":"Seconds","default":5.0},"resolution":{"type":"string","title":"Resolution","default":"720P"},"aspect_ratio":{"type":"string","title":"Aspect Ratio","default":"16:9"}},"type":"object","required":["image","prompt"],"title":"AnimateRequest"},"ApiKeyCreate":{"properties":{"label":{"type":"string","title":"Label","default":"default"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":["chat","vision","agents"]}},"type":"object","title":"ApiKeyCreate"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"label":{"type":"string","title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["id","key","key_prefix","label","scopes"],"title":"ApiKeyResponse"},"ApiKeySummary":{"properties":{"id":{"type":"string","title":"Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"label":{"type":"string","title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"revoked":{"type":"boolean","title":"Revoked","default":false},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","key_prefix","label","scopes"],"title":"ApiKeySummary"},"BioactivityAssay":{"properties":{"id":{"type":"string","title":"Id"},"compound_id":{"type":"string","title":"Compound Id"},"activity_type":{"$ref":"#/components/schemas/BioactivityType"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"assay_type":{"type":"string","title":"Assay Type","default":"in_vitro"},"ic50_um":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ic50 Um"},"ec50_um":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ec50 Um"},"mic_ug_ml":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mic Ug Ml"},"inhibition_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Inhibition Pct"},"concentration_tested":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concentration Tested"},"cell_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Line"},"result_summary":{"type":"string","title":"Result Summary"},"reference_paper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Paper Id"},"tested_at":{"type":"string","format":"date-time","title":"Tested At"}},"type":"object","required":["compound_id","activity_type","result_summary"],"title":"BioactivityAssay"},"BioactivityType":{"type":"string","enum":["antimicrobial","antitumor","anti_inflammatory","antioxidant","immunomodulatory","neuroprotective","hepatoprotective","antiviral","antidiabetic","cardiovascular"],"title":"BioactivityType"},"Body_account_create_token_account_tokens_post":{"properties":{"label":{"type":"string","title":"Label"}},"type":"object","required":["label"],"title":"Body_account_create_token_account_tokens_post"},"Body_analyze_image_vision_analyze_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"analysis_type":{"$ref":"#/components/schemas/AnalysisType","default":"general"},"grow_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","required":["file"],"title":"Body_analyze_image_vision_analyze_post"},"Body_check_contamination_vision_contamination_check_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"grow_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"}},"type":"object","required":["file"],"title":"Body_check_contamination_vision_contamination_check_post"},"Body_login_submit_login_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"Body_login_submit_login_post"},"Body_signup_submit_signup_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email","password"],"title":"Body_signup_submit_signup_post"},"CheckoutRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"plan_id":{"type":"string","title":"Plan Id"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["workspace_id","plan_id"],"title":"CheckoutRequest"},"Compound":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"iupac_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iupac Name"},"formula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formula"},"molecular_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Molecular Weight"},"smiles":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smiles"},"inchi_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inchi Key"},"source_organism":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Organism"},"source_type":{"$ref":"#/components/schemas/CompoundSource","default":"fungal"},"compound_class":{"$ref":"#/components/schemas/CompoundClass","default":"other"},"development_stage":{"$ref":"#/components/schemas/DevelopmentStage","default":"identified"},"bioactivities":{"items":{"$ref":"#/components/schemas/BioactivityType"},"type":"array","title":"Bioactivities"},"cas_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cas Number"},"pubchem_cid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pubchem Cid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name"],"title":"Compound"},"CompoundClass":{"type":"string","enum":["terpene","polysaccharide","phenolic","alkaloid","peptide","polyketide","steroid","lipid","other"],"title":"CompoundClass"},"CompoundSource":{"type":"string","enum":["fungal","plant","marine","synthetic","semi_synthetic","endophytic"],"title":"CompoundSource"},"ContaminationResult":{"properties":{"detected":{"type":"boolean","title":"Detected"},"severity":{"$ref":"#/components/schemas/ContaminationSeverity"},"contaminant_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contaminant Type"},"confidence":{"type":"number","title":"Confidence"},"affected_area_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Affected Area Pct"},"recommendation":{"type":"string","title":"Recommendation"},"analysis_details":{"type":"string","title":"Analysis Details"}},"type":"object","required":["detected","severity","confidence","recommendation","analysis_details"],"title":"ContaminationResult"},"ContaminationSeverity":{"type":"string","enum":["none","suspected","mild","moderate","severe"],"title":"ContaminationSeverity"},"ContaminationType":{"type":"string","enum":["trichoderma","cobweb","black_mold","bacterial","lipstick","none","unknown"],"title":"ContaminationType"},"ContaminationUrlRequest":{"properties":{"image_url":{"type":"string","title":"Image Url"},"grow_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"}},"type":"object","required":["image_url"],"title":"ContaminationUrlRequest"},"CreditBalance":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"tier_key":{"type":"string","title":"Tier Key"},"balance":{"type":"integer","title":"Balance"},"allocation":{"type":"integer","title":"Allocation"},"reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset At"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["workspace_id","tier_key","balance","allocation"],"title":"CreditBalance"},"CreditConsumeRequest":{"properties":{"amount":{"type":"integer","title":"Amount"},"reason":{"type":"string","title":"Reason","default":"turn"},"model_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Label"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["amount"],"title":"CreditConsumeRequest"},"CreditRefillRequest":{"properties":{"tier_key":{"type":"string","title":"Tier Key"},"allocation":{"type":"integer","title":"Allocation"},"reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset At"}},"type":"object","required":["tier_key","allocation"],"title":"CreditRefillRequest"},"CultivationProtocol":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"species":{"type":"string","title":"Species"},"substrate":{"$ref":"#/components/schemas/SubstrateType"},"spawn_rate_pct":{"type":"number","title":"Spawn Rate Pct","default":10.0},"colonization_temp_c":{"type":"number","title":"Colonization Temp C","default":24.0},"colonization_humidity_pct":{"type":"number","title":"Colonization Humidity Pct","default":95.0},"fruiting_temp_c":{"type":"number","title":"Fruiting Temp C","default":18.0},"fruiting_humidity_pct":{"type":"number","title":"Fruiting Humidity Pct","default":90.0},"fruiting_co2_ppm":{"type":"integer","title":"Fruiting Co2 Ppm","default":800},"light_hours":{"type":"number","title":"Light Hours","default":12.0},"fae_exchanges_per_hour":{"type":"integer","title":"Fae Exchanges Per Hour","default":4},"expected_colonization_days":{"type":"integer","title":"Expected Colonization Days","default":14},"expected_fruiting_days":{"type":"integer","title":"Expected Fruiting Days","default":7},"expected_be_pct":{"type":"number","title":"Expected Be Pct","default":100.0},"steps":{"items":{"type":"string"},"type":"array","title":"Steps"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","species","substrate"],"title":"CultivationProtocol"},"DevelopmentStage":{"type":"string","enum":["identified","isolated","characterized","in_vitro","in_vivo","preclinical","clinical"],"title":"DevelopmentStage"},"EdgeRequest":{"properties":{"from_type":{"type":"string","title":"From Type"},"from_id":{"type":"string","title":"From Id"},"relation":{"type":"string","title":"Relation"},"to_type":{"type":"string","title":"To Type"},"to_id":{"type":"string","title":"To Id"},"weight":{"type":"number","title":"Weight","default":1.0},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["from_type","from_id","relation","to_type","to_id"],"title":"EdgeRequest"},"EmbeddingRecord":{"properties":{"id":{"type":"string","title":"Id"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"chunk_index":{"type":"integer","title":"Chunk Index","default":0},"content":{"type":"string","title":"Content"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["source_type","source_id","content"],"title":"EmbeddingRecord"},"EntitlementCheck":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"}},"type":"object","required":["allowed"],"title":"EntitlementCheck"},"EnvironmentReading":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"grow_log_id":{"type":"string","title":"Grow Log Id"},"temp_c":{"type":"number","title":"Temp C"},"humidity_pct":{"type":"number","title":"Humidity Pct"},"co2_ppm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Co2 Ppm"},"light_lux":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Light Lux"},"vpd_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vpd Kpa"}},"type":"object","required":["grow_log_id","temp_c","humidity_pct"],"title":"EnvironmentReading"},"Experiment":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"hypothesis":{"type":"string","title":"Hypothesis"},"methodology":{"type":"string","title":"Methodology"},"status":{"$ref":"#/components/schemas/ExperimentStatus","default":"planned"},"domain":{"$ref":"#/components/schemas/ResearchDomain","default":"mycology"},"variables":{"additionalProperties":true,"type":"object","title":"Variables"},"controls":{"items":{"type":"string"},"type":"array","title":"Controls"},"expected_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Outcome"},"actual_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Outcome"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"data_points":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data Points"},"related_papers":{"items":{"type":"string"},"type":"array","title":"Related Papers"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["title","hypothesis","methodology"],"title":"Experiment"},"ExperimentStatus":{"type":"string","enum":["planned","in_progress","completed","failed","cancelled"],"title":"ExperimentStatus"},"GatewayRequest":{"properties":{"stream":{"type":"boolean","title":"Stream","default":false},"model":{"type":"string","title":"Model"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"}},"type":"object","required":["model","messages"],"title":"GatewayRequest"},"GatewayResponse":{"properties":{"id":{"type":"string","title":"Id"},"model":{"type":"string","title":"Model"},"content":{"type":"string","title":"Content"},"usage":{"additionalProperties":true,"type":"object","title":"Usage"},"latency_ms":{"type":"integer","title":"Latency Ms"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"}},"type":"object","required":["id","model","content","usage","latency_ms"],"title":"GatewayResponse"},"GraphNeighbor":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"relation":{"type":"string","title":"Relation"},"direction":{"type":"string","title":"Direction"},"weight":{"type":"number","title":"Weight","default":1.0},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["entity_type","entity_id","relation","direction"],"title":"GraphNeighbor"},"GrowLog":{"properties":{"id":{"type":"string","title":"Id"},"strain_id":{"type":"string","title":"Strain Id"},"batch_code":{"type":"string","title":"Batch Code"},"substrate":{"$ref":"#/components/schemas/SubstrateType"},"phase":{"$ref":"#/components/schemas/GrowthPhase","default":"inoculation"},"inoculation_date":{"type":"string","format":"date","title":"Inoculation Date"},"spawn_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spawn Weight G"},"substrate_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Substrate Weight G"},"temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temp C"},"humidity_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Humidity Pct"},"co2_ppm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Co2 Ppm"},"contamination":{"$ref":"#/components/schemas/ContaminationType","default":"none"},"harvest_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Harvest Weight G"},"biological_efficiency_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Biological Efficiency Pct"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"images":{"items":{"type":"string"},"type":"array","title":"Images"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["strain_id","batch_code","substrate","inoculation_date"],"title":"GrowLog"},"GrowthPhase":{"type":"string","enum":["inoculation","colonization","primordia","fruiting","harvest","rest"],"title":"GrowthPhase"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HarvestRecord":{"properties":{"id":{"type":"string","title":"Id"},"grow_log_id":{"type":"string","title":"Grow Log Id"},"flush_number":{"type":"integer","title":"Flush Number","default":1},"harvest_date":{"type":"string","format":"date","title":"Harvest Date"},"wet_weight_g":{"type":"number","title":"Wet Weight G"},"dry_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dry Weight G"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["grow_log_id","harvest_date","wet_weight_g"],"title":"HarvestRecord"},"ImageRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"model":{"type":"string","title":"Model","default":"flux"},"count":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"Count","default":1}},"type":"object","required":["prompt"],"title":"ImageRequest"},"IndexRequest":{"properties":{"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"content":{"type":"string","title":"Content"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["source_type","source_id","content"],"title":"IndexRequest"},"KnowledgeEdge":{"properties":{"id":{"type":"string","title":"Id"},"from_type":{"type":"string","title":"From Type"},"from_id":{"type":"string","title":"From Id"},"relation":{"type":"string","title":"Relation"},"to_type":{"type":"string","title":"To Type"},"to_id":{"type":"string","title":"To Id"},"weight":{"type":"number","title":"Weight","default":1.0},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["from_type","from_id","relation","to_type","to_id"],"title":"KnowledgeEdge"},"LiteratureSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"domain":{"anyOf":[{"$ref":"#/components/schemas/ResearchDomain"},{"type":"null"}]},"max_results":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Results","default":20},"sources":{"items":{"$ref":"#/components/schemas/PaperSource"},"type":"array","title":"Sources"}},"type":"object","required":["query"],"title":"LiteratureSearchRequest"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"Paper":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"authors":{"items":{"type":"string"},"type":"array","title":"Authors"},"abstract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abstract"},"doi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doi"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"source":{"$ref":"#/components/schemas/PaperSource","default":"manual"},"domain":{"$ref":"#/components/schemas/ResearchDomain","default":"mycology"},"publication_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publication Date"},"journal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journal"},"keywords":{"items":{"type":"string"},"type":"array","title":"Keywords"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["title"],"title":"Paper"},"PaperSource":{"type":"string","enum":["pubmed","google_scholar","arxiv","biorxiv","mycological_research","manual"],"title":"PaperSource"},"PlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"max_seats":{"type":"integer","title":"Max Seats"},"max_concurrent_sessions":{"type":"integer","title":"Max Concurrent Sessions"},"max_ide_hours_month":{"type":"integer","title":"Max Ide Hours Month"},"vision_quota_month":{"type":"integer","title":"Vision Quota Month"},"storage_limit_gb":{"type":"integer","title":"Storage Limit Gb"},"token_budget_month":{"type":"integer","title":"Token Budget Month"},"agent_jobs_month":{"type":"integer","title":"Agent Jobs Month"}},"type":"object","required":["id","display_name","max_seats","max_concurrent_sessions","max_ide_hours_month","vision_quota_month","storage_limit_gb","token_budget_month","agent_jobs_month"],"title":"PlanResponse"},"PortalRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url"}},"type":"object","required":["workspace_id"],"title":"PortalRequest"},"ProtocolGenerationRequest":{"properties":{"title":{"type":"string","title":"Title"},"objective":{"type":"string","title":"Objective"},"domain":{"$ref":"#/components/schemas/ResearchDomain","default":"mycology"},"materials":{"items":{"type":"string"},"type":"array","title":"Materials"},"constraints":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constraints"}},"type":"object","required":["title","objective"],"title":"ProtocolGenerationRequest"},"PublicCheckoutRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"tier_key":{"type":"string","title":"Tier Key"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["email","tier_key"],"title":"PublicCheckoutRequest"},"QuoteRequest":{"properties":{"kind":{"type":"string","title":"Kind"},"model":{"type":"string","title":"Model"},"seconds":{"type":"number","title":"Seconds","default":5.0},"resolution":{"type":"string","title":"Resolution","default":"720P"},"count":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"Count","default":1}},"type":"object","required":["kind","model"],"title":"QuoteRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"ResearchDomain":{"type":"string","enum":["mycology","biotech","compound_discovery","cultivation","genetics","ecology","medicinal","industrial"],"title":"ResearchDomain"},"ResearchNote":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"domain":{"$ref":"#/components/schemas/ResearchDomain","default":"mycology"},"related_papers":{"items":{"type":"string"},"type":"array","title":"Related Papers"},"related_experiments":{"items":{"type":"string"},"type":"array","title":"Related Experiments"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["title","content"],"title":"ResearchNote"},"ResearchRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"question":{"type":"string","title":"Question"},"depth":{"type":"string","title":"Depth","default":"normal"},"budget_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Usd"}},"type":"object","required":["workspace_id","question"],"title":"ResearchRequest"},"SARAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"compound_ids":{"items":{"type":"string"},"type":"array","title":"Compound Ids"},"activity_type":{"$ref":"#/components/schemas/BioactivityType"},"scaffold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scaffold"},"key_pharmacophores":{"items":{"type":"string"},"type":"array","title":"Key Pharmacophores"},"sar_findings":{"items":{"type":"string"},"type":"array","title":"Sar Findings"},"optimization_suggestions":{"items":{"type":"string"},"type":"array","title":"Optimization Suggestions"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["compound_ids","activity_type"],"title":"SARAnalysis"},"SOPRequest":{"properties":{"species":{"type":"string","title":"Species"},"substrate":{"$ref":"#/components/schemas/SubstrateType"},"scale":{"type":"string","title":"Scale","default":"small"},"include_contamination_protocol":{"type":"boolean","title":"Include Contamination Protocol","default":true}},"type":"object","required":["species","substrate"],"title":"SOPRequest"},"SearchResult":{"properties":{"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"content":{"type":"string","title":"Content"},"score":{"type":"number","title":"Score"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["source_type","source_id","content","score"],"title":"SearchResult"},"SelfCheckoutRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id","default":"pro"},"interval":{"type":"string","title":"Interval","default":"month"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","title":"SelfCheckoutRequest"},"Species":{"properties":{"id":{"type":"string","title":"Id"},"scientific_name":{"type":"string","title":"Scientific Name"},"common_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Common Name"},"kingdom":{"type":"string","title":"Kingdom","default":"Fungi"},"phylum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phylum"},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family"},"genus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genus"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"edibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edibility"},"habitat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Habitat"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["scientific_name"],"title":"Species"},"StartFreeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email"],"title":"StartFreeRequest"},"StartFreeResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"workspace_id":{"type":"string","title":"Workspace Id"},"api_key":{"type":"string","title":"Api Key"},"plan_id":{"type":"string","title":"Plan Id","default":"personal"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"}},"type":"object","required":["user_id","email","workspace_id","api_key","next_steps"],"title":"StartFreeResponse"},"Strain":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"species":{"type":"string","title":"Species"},"variety":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variety"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"isolation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Isolation Date"},"generation":{"type":"integer","title":"Generation","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"optimal_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Optimal Temp C"},"optimal_humidity_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Optimal Humidity Pct"},"colonization_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Colonization Days"},"fruiting_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fruiting Days"},"active":{"type":"boolean","title":"Active","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["name","species"],"title":"Strain"},"SubstrateType":{"type":"string","enum":["hardwood_sawdust","straw","grain","supplemented_sawdust","masters_mix","log","agar","liquid_culture","custom"],"title":"SubstrateType"},"TargetInteraction":{"properties":{"id":{"type":"string","title":"Id"},"compound_id":{"type":"string","title":"Compound Id"},"target_name":{"type":"string","title":"Target Name"},"target_type":{"type":"string","title":"Target Type","default":"protein"},"uniprot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uniprot Id"},"pdb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdb Id"},"interaction_type":{"type":"string","title":"Interaction Type","default":"inhibitor"},"binding_affinity_nm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Binding Affinity Nm"},"docking_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Docking Score"},"validated":{"type":"boolean","title":"Validated","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["compound_id","target_name"],"title":"TargetInteraction"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":86400},"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["access_token","user_id","email"],"title":"TokenResponse"},"TopupRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"amount":{"type":"integer","title":"Amount"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","default":"admin-topup"}},"type":"object","required":["client_id","amount","idempotency_key"],"title":"TopupRequest"},"UsageResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"tokens":{"type":"integer","title":"Tokens","default":0},"tool_calls":{"type":"integer","title":"Tool Calls","default":0},"vision_jobs":{"type":"integer","title":"Vision Jobs","default":0},"ide_hours":{"type":"number","title":"Ide Hours","default":0},"agent_jobs":{"type":"integer","title":"Agent Jobs","default":0}},"type":"object","required":["workspace_id","period_start","period_end"],"title":"UsageResponse"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"type":"string","title":"Role","default":"researcher"}},"type":"object","required":["id","email"],"title":"UserResponse"},"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"},"VideoRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"model":{"type":"string","title":"Model","default":"sora"},"seconds":{"type":"number","maximum":60.0,"exclusiveMinimum":0.0,"title":"Seconds","default":5.0},"resolution":{"type":"string","title":"Resolution","default":"720P"},"aspect_ratio":{"type":"string","title":"Aspect Ratio","default":"16:9"}},"type":"object","required":["prompt"],"title":"VideoRequest"},"VisionAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"analysis_type":{"$ref":"#/components/schemas/AnalysisType"},"image_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Hash"},"backend":{"type":"string","title":"Backend","default":"unknown"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"results":{"additionalProperties":true,"type":"object","title":"Results"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"grow_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["analysis_type"],"title":"VisionAnalysis"},"VisionUrlRequest":{"properties":{"image_url":{"type":"string","title":"Image Url"},"analysis_type":{"$ref":"#/components/schemas/AnalysisType","default":"general"},"grow_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grow Log Id"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","required":["image_url"],"title":"VisionUrlRequest"},"WorkspaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"ws_type":{"type":"string","title":"Ws Type","default":"personal"},"plan_id":{"type":"string","title":"Plan Id","default":"personal"}},"type":"object","required":["name","slug"],"title":"WorkspaceCreate"},"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"ws_type":{"type":"string","title":"Ws Type"},"plan_id":{"type":"string","title":"Plan Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","org_id","name","slug","ws_type","plan_id","status"],"title":"WorkspaceResponse"}}}}