{"openapi":"3.1.0","info":{"title":"AIbroker","description":"Centralized key broker for AI provider API keys","version":"0.1.0"},"paths":{"/":{"get":{"tags":["landing"],"summary":"Landing","description":"Public landing — bilingual EN/RU, default EN.","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/favicon.svg":{"get":{"tags":["landing"],"summary":"Favicon Svg","description":"SVG favicon — modern browsers prefer this for crisp tab-strip rendering.","operationId":"favicon_svg_favicon_svg_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"tags":["landing"],"summary":"Favicon Ico","description":"Browsers that request /favicon.ico by default — serve the same SVG.\nModern browsers (2020+) accept image/svg+xml at any path. Avoids the\n404 in dev consoles and keeps one source of truth for the icon.","operationId":"favicon_ico_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/robots.txt":{"get":{"tags":["landing"],"summary":"Robots Txt","description":"Allow indexing of public pages; block admin / dashboard / api callbacks.","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["landing"],"summary":"Sitemap Xml","description":"Standard XML sitemap with hreflang alternates for EN/RU.","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["landing"],"summary":"Llms Txt","description":"LLM-friendly site descriptor (Jeremy Howard's proposed /llms.txt).\nPlain markdown — crawlers like Perplexity, ChatGPT browse, Claude search\nuse it as a hint of what content matters and how it's structured.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/healthz":{"get":{"tags":["health"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/v1/health":{"get":{"tags":["health"],"summary":"Health Summary","description":"Per-provider alive/dead/cooldown counts. Surface for ops dashboards.","operationId":"health_summary_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Summary V1 Health Get"}}}}}}},"/v1/chat":{"post":{"tags":["proxy"],"summary":"Chat","operationId":"chat_v1_chat_post","parameters":[{"name":"capability","in":"query","required":false,"schema":{"type":"string","default":"chat:fast","title":"Capability"}},{"name":"X-Project-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embed":{"post":{"tags":["proxy"],"summary":"Embed Endpoint","operationId":"embed_endpoint_v1_embed_post","parameters":[{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"voyage","title":"Provider"}},{"name":"X-Project-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/key":{"post":{"tags":["vending"],"summary":"Vend Key","operationId":"vend_key_v1_key_post","parameters":[{"name":"X-Project-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"post":{"tags":["vending"],"summary":"Report Usage","operationId":"report_usage_v1_usage_post","parameters":[{"name":"X-Project-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReport"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Usage V1 Usage Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/release":{"post":{"tags":["vending"],"summary":"Release","operationId":"release_v1_release_post","parameters":[{"name":"X-Project-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Release V1 Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects":{"post":{"tags":["admin"],"summary":"Create Project","operationId":"create_project_admin_projects_post","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin"],"summary":"List Projects","operationId":"list_projects_admin_projects_get","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectOut"},"title":"Response List Projects Admin Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/keys":{"post":{"tags":["admin"],"summary":"Create Key","operationId":"create_key_admin_keys_post","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin"],"summary":"List Keys","operationId":"list_keys_admin_keys_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Keys Admin Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/keys/{key_id}/disable":{"post":{"tags":["admin"],"summary":"Disable Key","operationId":"disable_key_admin_keys__key_id__disable_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Disable Key Admin Keys  Key Id  Disable Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/keys/{key_id}":{"delete":{"tags":["admin"],"summary":"Delete Key","operationId":"delete_key_admin_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Key Admin Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"get":{"tags":["dashboard"],"summary":"Login Page","operationId":"login_page_login_get","parameters":[{"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"}}}}}}},"/api/tg_login":{"get":{"tags":["dashboard"],"summary":"Tg Login Callback","operationId":"tg_login_callback_api_tg_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/logout":{"get":{"tags":["dashboard"],"summary":"Logout","operationId":"logout_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"tags":["dashboard"],"summary":"Dashboard","operationId":"dashboard_dashboard_get","parameters":[{"name":"flash","in":"query","required":false,"schema":{"type":"string","default":"","title":"Flash"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/projects/{project_id}":{"get":{"tags":["dashboard"],"summary":"Dashboard Project Detail","operationId":"dashboard_project_detail_dashboard_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/keys/create":{"post":{"tags":["dashboard"],"summary":"Dash Create Key","operationId":"dash_create_key_dashboard_keys_create_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dash_create_key_dashboard_keys_create_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/keys/{key_id}/disable":{"post":{"tags":["dashboard"],"summary":"Dash Toggle Key","operationId":"dash_toggle_key_dashboard_keys__key_id__disable_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/keys/{key_id}/delete":{"post":{"tags":["dashboard"],"summary":"Dash Delete Key","operationId":"dash_delete_key_dashboard_keys__key_id__delete_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/keys/{key_id}/edit":{"post":{"tags":["dashboard"],"summary":"Dash Edit Key","operationId":"dash_edit_key_dashboard_keys__key_id__edit_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dash_edit_key_dashboard_keys__key_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/projects/{project_id}/edit":{"post":{"tags":["dashboard"],"summary":"Dash Edit Project","operationId":"dash_edit_project_dashboard_projects__project_id__edit_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dash_edit_project_dashboard_projects__project_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/projects/create":{"post":{"tags":["dashboard"],"summary":"Dash Create Project","operationId":"dash_create_project_dashboard_projects_create_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dash_create_project_dashboard_projects_create_post"}}},"required":true},"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":{"ApiKeyCreate":{"properties":{"provider":{"type":"string","maxLength":50,"minLength":2,"title":"Provider"},"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label"},"token":{"type":"string","minLength":8,"title":"Token","description":"plaintext token; encrypted before storage"},"tier":{"type":"string","pattern":"^(free|paid|trial)$","title":"Tier","default":"free"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"is_reserve":{"type":"boolean","title":"Is Reserve","default":false},"daily_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Cost Cap Usd"},"monthly_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Cap Usd"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["provider","label","token"],"title":"ApiKeyCreate"},"ApiKeyOut":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"tier":{"type":"string","title":"Tier"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"is_reserve":{"type":"boolean","title":"Is Reserve"},"is_active":{"type":"boolean","title":"Is Active"},"is_alive":{"type":"boolean","title":"Is Alive"},"daily_used":{"type":"integer","title":"Daily Used"},"daily_cost_used_usd":{"type":"number","title":"Daily Cost Used Usd"},"daily_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Cost Cap Usd"},"cooldown_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooldown Until"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"error_count":{"type":"integer","title":"Error Count"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["id","provider","label","tier","scopes","is_reserve","is_active","is_alive","daily_used","daily_cost_used_usd","daily_cost_cap_usd","cooldown_until","last_used_at","error_count","notes"],"title":"ApiKeyOut"},"Body_dash_create_key_dashboard_keys_create_post":{"properties":{"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"token":{"type":"string","title":"Token"},"tier":{"type":"string","title":"Tier","default":"free"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"is_reserve":{"type":"boolean","title":"Is Reserve","default":false},"daily_cost_cap_usd":{"type":"string","title":"Daily Cost Cap Usd","default":""}},"type":"object","required":["provider","label","token"],"title":"Body_dash_create_key_dashboard_keys_create_post"},"Body_dash_create_project_dashboard_projects_create_post":{"properties":{"name":{"type":"string","title":"Name"},"owner_email":{"type":"string","title":"Owner Email","default":""},"allowed_scopes":{"type":"string","title":"Allowed Scopes","default":"llm:chat,llm:embed"},"daily_cost_cap_usd":{"type":"string","title":"Daily Cost Cap Usd","default":""}},"type":"object","required":["name"],"title":"Body_dash_create_project_dashboard_projects_create_post"},"Body_dash_edit_key_dashboard_keys__key_id__edit_post":{"properties":{"label":{"type":"string","title":"Label"},"tier":{"type":"string","title":"Tier","default":"free"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"is_reserve":{"type":"boolean","title":"Is Reserve","default":false},"daily_cost_cap_usd":{"type":"string","title":"Daily Cost Cap Usd","default":""},"token":{"type":"string","title":"Token","default":""}},"type":"object","required":["label"],"title":"Body_dash_edit_key_dashboard_keys__key_id__edit_post"},"Body_dash_edit_project_dashboard_projects__project_id__edit_post":{"properties":{"name":{"type":"string","title":"Name"},"allowed_scopes":{"type":"string","title":"Allowed Scopes","default":""},"daily_cost_cap_usd":{"type":"string","title":"Daily Cost Cap Usd","default":""},"owner_email":{"type":"string","title":"Owner Email","default":""}},"type":"object","required":["name"],"title":"Body_dash_edit_project_dashboard_projects__project_id__edit_post"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","minItems":1,"title":"Messages"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"override provider's default model"},"max_tokens":{"type":"integer","title":"Max Tokens","default":1024},"temperature":{"type":"number","title":"Temperature","default":0.7},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format"},"workflow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"}},"type":"object","required":["messages"],"title":"ChatRequest"},"ChatResponse":{"properties":{"text":{"type":"string","title":"Text"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"tokens_in":{"type":"integer","title":"Tokens In"},"tokens_out":{"type":"integer","title":"Tokens Out"},"cost_usd":{"type":"number","title":"Cost Usd"},"latency_ms":{"type":"integer","title":"Latency Ms"},"key_label":{"type":"string","title":"Key Label"}},"type":"object","required":["text","provider","model","tokens_in","tokens_out","cost_usd","latency_ms","key_label"],"title":"ChatResponse"},"EmbedRequest":{"properties":{"input":{"items":{"type":"string"},"type":"array","maxItems":128,"minItems":1,"title":"Input"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"workflow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"}},"type":"object","required":["input"],"title":"EmbedRequest"},"EmbedResponse":{"properties":{"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"tokens_in":{"type":"integer","title":"Tokens In"},"cost_usd":{"type":"number","title":"Cost Usd"},"latency_ms":{"type":"integer","title":"Latency Ms"},"key_label":{"type":"string","title":"Key Label"}},"type":"object","required":["embeddings","provider","model","tokens_in","cost_usd","latency_ms","key_label"],"title":"EmbedResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"scope":{"type":"string","title":"Scope"},"lease_seconds":{"anyOf":[{"type":"integer","maximum":3600.0,"minimum":10.0},{"type":"null"}],"title":"Lease Seconds"},"workflow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"},"request_meta":{"additionalProperties":true,"type":"object","title":"Request Meta"}},"type":"object","required":["provider","scope"],"title":"KeyRequest"},"KeyResponse":{"properties":{"lease_id":{"type":"string","title":"Lease Id"},"api_key_id":{"type":"integer","title":"Api Key Id"},"provider":{"type":"string","title":"Provider"},"key":{"type":"string","title":"Key"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["lease_id","api_key_id","provider","key","expires_at"],"title":"KeyResponse"},"ProjectCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-z][a-z0-9_-]*$","title":"Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"allowed_scopes":{"items":{"type":"string"},"type":"array","title":"Allowed Scopes"},"daily_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Cost Cap Usd"},"monthly_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Cap Usd"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectCreated":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"allowed_scopes":{"items":{"type":"string"},"type":"array","title":"Allowed Scopes"},"daily_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Cost Cap Usd"},"monthly_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Cap Usd"},"is_active":{"type":"boolean","title":"Is Active"},"project_key_prefix":{"type":"string","title":"Project Key Prefix"},"notes":{"type":"string","title":"Notes"},"project_key":{"type":"string","title":"Project Key","description":"show ONCE on creation; not retrievable"}},"type":"object","required":["id","name","owner_email","allowed_scopes","daily_cost_cap_usd","monthly_cost_cap_usd","is_active","project_key_prefix","notes","project_key"],"title":"ProjectCreated"},"ProjectOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"allowed_scopes":{"items":{"type":"string"},"type":"array","title":"Allowed Scopes"},"daily_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Cost Cap Usd"},"monthly_cost_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Cap Usd"},"is_active":{"type":"boolean","title":"Is Active"},"project_key_prefix":{"type":"string","title":"Project Key Prefix"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["id","name","owner_email","allowed_scopes","daily_cost_cap_usd","monthly_cost_cap_usd","is_active","project_key_prefix","notes"],"title":"ProjectOut"},"UsageReport":{"properties":{"lease_id":{"type":"string","title":"Lease Id"},"status":{"type":"string","pattern":"^(ok|rate_limit|auth_fail|error)$","title":"Status"},"tokens_in":{"type":"integer","title":"Tokens In","default":0},"tokens_out":{"type":"integer","title":"Tokens Out","default":0},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Kind"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"retry_after_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After S"}},"type":"object","required":["lease_id","status"],"title":"UsageReport"},"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"}}}}