{"openapi":"3.1.0","info":{"title":"zntapi · 智能体 API","version":"0.1.0"},"paths":{"/api/auth/enter":{"post":{"summary":"Enter","operationId":"enter_api_auth_enter_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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/Credentials"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me":{"get":{"summary":"Me","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/logout":{"post":{"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models":{"get":{"summary":"Models","operationId":"models_api_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/{model_id}/integration":{"get":{"summary":"Model Integration","operationId":"model_integration_api_models__model_id__integration_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"target","in":"query","required":false,"schema":{"enum":["agent","curl"],"type":"string","default":"agent","title":"Target"}},{"name":"shell","in":"query","required":false,"schema":{"enum":["bash","powershell"],"type":"string","default":"bash","title":"Shell"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Private Integration","operationId":"private_integration_api_models__model_id__integration_post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys":{"get":{"summary":"Keys","operationId":"keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"New Key","operationId":"new_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{key_id}/reveal":{"post":{"summary":"Reveal Key","operationId":"reveal_key_api_keys__key_id__reveal_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{key_id}":{"delete":{"summary":"Revoke Key","operationId":"revoke_key_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wallet":{"get":{"summary":"Wallet","operationId":"wallet_api_wallet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/recharge/purchase-qr":{"get":{"summary":"Purchase Qr","operationId":"purchase_qr_api_recharge_purchase_qr_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/redeem":{"post":{"summary":"Redeem","operationId":"redeem_api_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/redeem-batches":{"get":{"summary":"Redeem Batches","operationId":"redeem_batches_api_admin_redeem_batches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"New Redeem Batch","operationId":"new_redeem_batch_api_admin_redeem_batches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemBatchInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/redeem-batches/{batch_id}/export":{"get":{"summary":"Export Redeem Batch","operationId":"export_redeem_batch_api_admin_redeem_batches__batch_id__export_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/redeem-batches/{batch_id}/revoke":{"post":{"summary":"Revoke Redeem Batch","operationId":"revoke_redeem_batch_api_admin_redeem_batches__batch_id__revoke_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/payment-settings":{"get":{"summary":"Payment Settings","operationId":"payment_settings_api_admin_payment_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Save Payment Settings","operationId":"save_payment_settings_api_admin_payment_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSettingsInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/usage":{"get":{"summary":"Usage","operationId":"usage_api_usage_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ledger":{"get":{"summary":"Ledger","operationId":"ledger_api_ledger_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/topups":{"get":{"summary":"Topups","operationId":"topups_api_topups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"New Topup","operationId":"new_topup_api_topups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/topups/{order_id}":{"get":{"summary":"Topup Details","operationId":"topup_details_api_topups__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/topups/{order_id}/qr":{"get":{"summary":"Topup Qr","operationId":"topup_qr_api_topups__order_id__qr_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/topups/{order_id}/refresh":{"post":{"summary":"Refresh Topup","operationId":"refresh_topup_api_topups__order_id__refresh_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payments/alipay/notify":{"post":{"summary":"Alipay Notify","operationId":"alipay_notify_api_payments_alipay_notify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/payments/yunmianqian/notify":{"post":{"summary":"Yunmianqian Notify","operationId":"yunmianqian_notify_api_payments_yunmianqian_notify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/providers":{"get":{"summary":"Providers","operationId":"providers_api_admin_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Save Provider","operationId":"save_provider_api_admin_providers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models":{"get":{"summary":"Admin Models","operationId":"admin_models_api_admin_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Save Model","operationId":"save_model_api_admin_models_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/routes":{"get":{"summary":"Admin Routes","operationId":"admin_routes_api_admin_routes_get","parameters":[{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Save Route","operationId":"save_route_api_admin_routes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRouteInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"summary":"Admin Users","operationId":"admin_users_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/credits":{"post":{"summary":"Admin Credit","operationId":"admin_credit_api_admin_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/requests":{"get":{"summary":"Admin Requests","operationId":"admin_requests_api_admin_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending_review","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/requests/{request_id}/resolve":{"post":{"summary":"Resolve","operationId":"resolve_api_admin_requests__request_id__resolve_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/audit":{"get":{"summary":"Audit","operationId":"audit_api_admin_audit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/models":{"get":{"summary":"Api Models","operationId":"api_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/requests/{request_id}":{"get":{"summary":"Request Status","operationId":"request_status_api_v1_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"summary":"Invoke","operationId":"invoke_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/responses":{"post":{"summary":"Invoke","operationId":"invoke_v1_responses_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/chat/completions":{"post":{"summary":"Invoke","operationId":"invoke_v1_chat_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/reports/summary":{"get":{"tags":["admin reports"],"summary":"Summary","operationId":"summary_api_admin_reports_summary_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reports/users":{"get":{"tags":["admin reports"],"summary":"Users","operationId":"users_api_admin_reports_users_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":254,"default":"","title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reports/users/{user_id}":{"get":{"tags":["admin reports"],"summary":"User Detail","operationId":"user_detail_api_admin_reports_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reports/requests":{"get":{"tags":["admin reports"],"summary":"Requests","operationId":"requests_api_admin_reports_requests_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"User Id"}},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Model Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Status"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reports/topups":{"get":{"tags":["admin reports"],"summary":"Topups","operationId":"topups_api_admin_reports_topups_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"User Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Status"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reports/ledger":{"get":{"tags":["admin reports"],"summary":"Ledger","operationId":"ledger_api_admin_reports_ledger_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"User Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Kind"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Credentials":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"},"captcha":{"type":"string","maxLength":64,"minLength":1,"title":"Captcha"}},"additionalProperties":false,"type":"object","required":["email","password","captcha"],"title":"Credentials"},"CreditInput":{"properties":{"user_id":{"type":"string","title":"User Id"},"amount":{"anyOf":[{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"string"}],"title":"Amount"},"reason":{"type":"string","maxLength":500,"minLength":5,"title":"Reason"},"idempotency_key":{"type":"string","maxLength":100,"minLength":8,"pattern":"^[A-Za-z0-9_.:-]+$","title":"Idempotency Key"}},"additionalProperties":false,"type":"object","required":["user_id","amount","reason","idempotency_key"],"title":"CreditInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationInput":{"properties":{"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"target":{"type":"string","enum":["agent","curl"],"title":"Target","default":"agent"},"shell":{"type":"string","enum":["bash","powershell"],"title":"Shell","default":"bash"}},"additionalProperties":false,"type":"object","title":"IntegrationInput"},"KeyInput":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name","default":"默认 Key"},"budget":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Budget"},"model_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Model Ids"},"rpm":{"type":"integer","maximum":600.0,"minimum":1.0,"title":"Rpm","default":60},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","title":"KeyInput"},"ModelInput":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9_.:/-]{1,120}$","title":"Id"},"name":{"type":"string","maxLength":140,"minLength":1,"title":"Name"},"provider_id":{"type":"string","title":"Provider Id"},"upstream_model":{"type":"string","maxLength":140,"minLength":1,"pattern":"^[a-zA-Z0-9_.:/-]+$","title":"Upstream Model"},"category":{"type":"string","const":"text","title":"Category"},"protocol":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages"],"title":"Protocol"},"description":{"type":"string","maxLength":600,"title":"Description","default":""},"enabled":{"type":"boolean","title":"Enabled","default":false},"input_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Input Price"},"output_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Output Price"},"cached_input_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cached Input Price"},"cache_write_30m_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cache Write 30M Price"},"cache_write_12h_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cache Write 12H Price"},"cache_write_5m_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cache Write 5M Price"},"cache_write_1h_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cache Write 1H Price"},"pricing_metadata":{"additionalProperties":true,"type":"object","title":"Pricing Metadata"},"price_unit":{"type":"string","enum":["per_million_tokens","per_request","per_1000_characters"],"title":"Price Unit","default":"per_million_tokens"},"max_request_cost":{"anyOf":[{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Max Request Cost"},"max_output_tokens":{"type":"integer","maximum":65536.0,"minimum":1.0,"title":"Max Output Tokens","default":4096},"max_input_bytes":{"type":"integer","maximum":1048576.0,"minimum":256.0,"title":"Max Input Bytes","default":65536},"capabilities":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Capabilities"},"order_index":{"type":"integer","title":"Order Index","default":100}},"additionalProperties":false,"type":"object","required":["id","name","provider_id","upstream_model","category","protocol"],"title":"ModelInput"},"ModelRouteInput":{"properties":{"model_id":{"type":"string","title":"Model Id"},"provider_id":{"type":"string","title":"Provider Id"},"upstream_model":{"type":"string","maxLength":140,"minLength":1,"pattern":"^[a-zA-Z0-9_.:/-]+$","title":"Upstream Model"},"protocol":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages"],"title":"Protocol"},"priority":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Priority","default":100},"enabled":{"type":"boolean","title":"Enabled","default":false},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"}},"additionalProperties":false,"type":"object","required":["model_id","provider_id","upstream_model","protocol"],"title":"ModelRouteInput"},"PaymentSettingsInput":{"properties":{"purchase_url":{"type":"string","maxLength":1000,"title":"Purchase Url","default":""}},"additionalProperties":false,"type":"object","title":"PaymentSettingsInput"},"ProviderInput":{"properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,80}$","title":"Id"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"base_url":{"type":"string","maxLength":500,"title":"Base Url"},"api_key_env":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,99}$"},{"type":"null"}],"title":"Api Key Env"},"api_key":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Api Key"},"enabled":{"type":"boolean","title":"Enabled","default":false},"allow_private":{"type":"boolean","title":"Allow Private","default":false},"allow_insecure_http":{"type":"boolean","title":"Allow Insecure Http","default":false},"extra_headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Extra Headers"}},"additionalProperties":false,"type":"object","required":["id","name","base_url"],"title":"ProviderInput"},"RedeemBatchInput":{"properties":{"amount":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":1.0},{"type":"string"}],"title":"Amount"},"count":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Count"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","default":"云猫充值码"}},"additionalProperties":false,"type":"object","required":["amount","count"],"title":"RedeemBatchInput"},"RedeemInput":{"properties":{"code":{"type":"string","maxLength":100,"title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"RedeemInput"},"ResolveInput":{"properties":{"action":{"type":"string","enum":["release","charge"],"title":"Action"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Amount","default":"0"},"reason":{"type":"string","maxLength":500,"minLength":5,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["action","reason"],"title":"ResolveInput"},"TopupInput":{"properties":{"amount":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":1.0},{"type":"string"}],"title":"Amount"}},"additionalProperties":false,"type":"object","required":["amount"],"title":"TopupInput"},"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"}}}}