basePath: / definitions: auth.User: properties: apiKeyId: type: string apiKeyName: type: string apiKeyPrefix: type: string apiKeyScopes: items: type: string type: array apiKeySecret: type: string gatewayTenantId: type: string gatewayUserId: type: string role: items: type: string type: array source: type: string sso_id: type: string sub: type: string tenantId: type: string tenantKey: type: string userGroupId: type: string userGroupKey: type: string userGroupKeys: items: type: string type: array username: type: string type: object httpapi.APIKeyListResponse: properties: items: items: $ref: '#/definitions/store.APIKey' type: array type: object httpapi.AccessRuleListResponse: properties: items: items: $ref: '#/definitions/store.AccessRule' type: array type: object httpapi.AuditLogListResponse: properties: items: items: $ref: '#/definitions/store.AuditLog' type: array type: object httpapi.AuthResponse: properties: accessToken: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... type: string expiresIn: example: 86400 type: integer tokenType: example: Bearer type: string user: $ref: '#/definitions/auth.User' type: object httpapi.BaseModelListResponse: properties: items: items: $ref: '#/definitions/store.BaseModel' type: array type: object httpapi.CatalogProviderListResponse: properties: items: items: $ref: '#/definitions/store.CatalogProvider' type: array type: object httpapi.ChatMessage: properties: content: example: Hello type: string role: example: user type: string type: object httpapi.CompatibleResponse: properties: choices: items: additionalProperties: true type: object type: array id: example: chatcmpl-123 type: string model: example: gpt-4o-mini type: string object: example: chat.completion type: string usage: additionalProperties: true type: object type: object httpapi.ErrorEnvelope: properties: error: $ref: '#/definitions/httpapi.ErrorPayload' type: object httpapi.ErrorPayload: properties: code: example: rate_limit type: string message: example: invalid json body type: string status: example: 400 type: integer type: object httpapi.HealthResponse: properties: env: example: development type: string identityMode: example: standalone type: string ok: example: true type: boolean service: example: easyai-ai-gateway type: string type: object httpapi.ModelCatalogFilterOption: properties: count: type: integer iconPath: type: string label: type: string value: type: string type: object httpapi.ModelCatalogFilters: properties: capabilities: items: $ref: '#/definitions/httpapi.ModelCatalogFilterOption' type: array providers: items: $ref: '#/definitions/httpapi.ModelCatalogFilterOption' type: array type: object httpapi.ModelCatalogItem: properties: alias: type: string capabilityTags: items: type: string type: array description: type: string discount: $ref: '#/definitions/httpapi.ModelCatalogText' displayName: type: string enabled: type: boolean iconPath: type: string id: type: string modelName: type: string modelType: items: type: string type: array permission: $ref: '#/definitions/httpapi.ModelCatalogPermission' pricing: $ref: '#/definitions/httpapi.ModelCatalogPricing' providerKeys: items: type: string type: array providers: items: $ref: '#/definitions/httpapi.ModelCatalogProviderSummary' type: array rateLimits: $ref: '#/definitions/httpapi.ModelCatalogRateLimits' source: $ref: '#/definitions/httpapi.ModelCatalogText' sourceCount: type: integer sources: items: $ref: '#/definitions/httpapi.ModelCatalogSource' type: array statusLabel: type: string type: object httpapi.ModelCatalogPermission: properties: allowGroups: items: type: string type: array denyGroups: items: type: string type: array label: type: string title: type: string type: object httpapi.ModelCatalogPricing: properties: lines: items: type: string type: array title: type: string type: object httpapi.ModelCatalogProviderSummary: properties: iconPath: type: string key: type: string name: type: string sourceCount: type: integer type: object httpapi.ModelCatalogRateLimits: properties: concurrent: type: number label: type: string rpm: type: number title: type: string tpm: type: number type: object httpapi.ModelCatalogResponse: properties: filters: $ref: '#/definitions/httpapi.ModelCatalogFilters' items: items: $ref: '#/definitions/httpapi.ModelCatalogItem' type: array summary: $ref: '#/definitions/httpapi.ModelCatalogSummary' type: object httpapi.ModelCatalogSource: properties: displayName: type: string enabled: type: boolean id: type: string modelAlias: type: string modelName: type: string modelType: items: type: string type: array platformId: type: string platformName: type: string providerKey: type: string providerName: type: string rateLimits: $ref: '#/definitions/httpapi.ModelCatalogRateLimits' type: object httpapi.ModelCatalogSummary: properties: modelCount: type: integer sourceCount: type: integer type: object httpapi.ModelCatalogText: properties: label: type: string title: type: string type: object httpapi.ModelRateLimitStatusListResponse: properties: items: items: $ref: '#/definitions/store.ModelRateLimitStatus' type: array type: object httpapi.NetworkProxyConfigResponse: properties: globalHttpProxy: example: http://127.0.0.1:7890 type: string globalHttpProxySet: example: true type: boolean globalHttpProxySource: example: env type: string type: object httpapi.PlatformListResponse: properties: items: items: $ref: '#/definitions/store.Platform' type: array type: object httpapi.PlatformModelListResponse: properties: items: items: $ref: '#/definitions/store.PlatformModel' type: array type: object httpapi.PlayableAPIKeyListResponse: properties: items: items: $ref: '#/definitions/store.PlayableAPIKey' type: array type: object httpapi.PricingEstimateRequest: properties: kind: example: chat.completions type: string max_tokens: example: 512 type: integer messages: items: $ref: '#/definitions/httpapi.ChatMessage' type: array model: example: gpt-4o-mini type: string "n": example: 1 type: integer prompt: example: A small orange cat type: string runMode: example: simulation type: string type: object httpapi.PricingEstimateResponse: properties: items: items: additionalProperties: true type: object type: array resolver: example: effective-pricing-v1 type: string type: object httpapi.PricingRuleListResponse: properties: items: items: $ref: '#/definitions/store.PricingRule' type: array type: object httpapi.PricingRuleSetListResponse: properties: items: items: $ref: '#/definitions/store.PricingRuleSet' type: array type: object httpapi.RateLimitWindowListResponse: properties: items: items: $ref: '#/definitions/store.RateLimitWindow' type: array type: object httpapi.ReadyResponse: properties: ok: example: true type: boolean type: object httpapi.ReplacePlatformModelsRequest: properties: models: items: $ref: '#/definitions/store.CreatePlatformModelInput' type: array type: object httpapi.RuntimePolicySetListResponse: properties: items: items: $ref: '#/definitions/store.RuntimePolicySet' type: array type: object httpapi.TaskAcceptedResponse: properties: next: $ref: '#/definitions/httpapi.TaskNextLinks' task: $ref: '#/definitions/store.GatewayTask' taskId: example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25 type: string type: object httpapi.TaskListResponse: properties: items: items: $ref: '#/definitions/store.GatewayTask' type: array page: example: 1 type: integer pageSize: example: 50 type: integer total: example: 42 type: integer type: object httpapi.TaskNextLinks: properties: detail: example: /api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25 type: string events: example: /api/v1/tasks/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25/events type: string type: object httpapi.TaskParamPreprocessingLogListResponse: properties: items: items: $ref: '#/definitions/store.TaskParamPreprocessingLog' type: array type: object httpapi.TaskRequest: properties: duration: example: 5 type: integer input: example: Tell me a short story type: string max_tokens: example: 512 type: integer messages: items: $ref: '#/definitions/httpapi.ChatMessage' type: array model: example: gpt-4o-mini type: string prompt: example: A watercolor robot reading a book type: string resolution: example: 720p type: string runMode: example: simulation type: string size: example: 1024x1024 type: string stream: example: false type: boolean type: object httpapi.TenantListResponse: properties: items: items: $ref: '#/definitions/store.GatewayTenant' type: array type: object httpapi.UserGroupListResponse: properties: items: items: $ref: '#/definitions/store.UserGroup' type: array type: object httpapi.UserListResponse: properties: items: items: $ref: '#/definitions/store.GatewayUser' type: array type: object httpapi.WalletAdjustmentResponse: properties: account: $ref: '#/definitions/store.GatewayWalletAccount' auditLog: $ref: '#/definitions/store.AuditLog' before: $ref: '#/definitions/store.GatewayWalletAccount' transaction: $ref: '#/definitions/store.GatewayWalletTransaction' type: object httpapi.WalletTransactionListResponse: properties: items: items: $ref: '#/definitions/store.GatewayWalletTransaction' type: array page: example: 1 type: integer pageSize: example: 50 type: integer total: example: 42 type: integer type: object httpapi.updatePlatformDynamicPriorityRequest: properties: dynamicPriority: example: 10 type: integer reset: example: false type: boolean type: object httpapi.walletBalanceRequest: properties: balance: example: 100 type: number currency: example: USD type: string idempotencyKey: example: wallet-set-20260514-001 type: string metadata: additionalProperties: {} type: object reason: example: manual recharge type: string type: object store.APIKey: properties: createdAt: type: string expiresAt: type: string gatewayTenantId: type: string gatewayUserId: type: string id: type: string keyPrefix: type: string lastUsedAt: type: string name: type: string quotaPolicy: additionalProperties: {} type: object rateLimitPolicy: additionalProperties: {} type: object scopes: items: type: string type: array secret: type: string status: type: string tenantId: type: string tenantKey: type: string updatedAt: type: string userGroupId: type: string userId: type: string type: object store.AccessRule: properties: conditions: additionalProperties: {} type: object createdAt: type: string effect: type: string id: type: string metadata: additionalProperties: {} type: object minPermissionLevel: type: integer priority: type: integer resourceId: type: string resourceType: type: string status: type: string subjectId: type: string subjectType: type: string updatedAt: type: string type: object store.AccessRuleBatchInput: properties: deleteResources: items: $ref: '#/definitions/store.AccessRuleResourceInput' type: array effect: type: string subjectId: type: string subjectType: type: string upsertResources: items: $ref: '#/definitions/store.AccessRuleResourceInput' type: array type: object store.AccessRuleInput: properties: conditions: additionalProperties: {} type: object effect: type: string metadata: additionalProperties: {} type: object minPermissionLevel: type: integer priority: type: integer resourceId: type: string resourceType: type: string status: type: string subjectId: type: string subjectType: type: string type: object store.AccessRuleResourceInput: properties: conditions: additionalProperties: {} type: object metadata: additionalProperties: {} type: object minPermissionLevel: type: integer priority: type: integer resourceId: type: string resourceType: type: string status: type: string type: object store.AuditLog: properties: action: type: string actorGatewayUserId: type: string actorRoles: items: type: string type: array actorSource: type: string actorUserId: type: string actorUsername: type: string afterState: additionalProperties: {} type: object beforeState: additionalProperties: {} type: object category: type: string createdAt: type: string id: type: string metadata: additionalProperties: {} type: object requestIp: type: string targetGatewayTenantId: type: string targetGatewayUserId: type: string targetId: type: string targetType: type: string userAgent: type: string type: object store.BaseModel: properties: baseBillingConfig: additionalProperties: {} type: object canonicalModelKey: type: string capabilities: additionalProperties: {} type: object catalogType: type: string createdAt: type: string customizedAt: type: string defaultRateLimitPolicy: additionalProperties: {} type: object defaultSnapshot: additionalProperties: {} type: object id: type: string metadata: additionalProperties: {} type: object modelAlias: type: string modelType: items: type: string type: array pricingRuleSetId: type: string pricingVersion: type: integer providerKey: type: string providerModelName: type: string runtimePolicyOverride: additionalProperties: {} type: object runtimePolicySetId: type: string status: type: string updatedAt: type: string type: object store.BaseModelInput: properties: baseBillingConfig: additionalProperties: {} type: object canonicalModelKey: type: string capabilities: additionalProperties: {} type: object catalogType: type: string defaultRateLimitPolicy: additionalProperties: {} type: object defaultSnapshot: additionalProperties: {} type: object displayName: type: string metadata: additionalProperties: {} type: object modelAlias: type: string modelType: items: type: string type: array pricingRuleSetId: type: string pricingVersion: type: integer providerKey: type: string providerModelName: type: string runtimePolicyOverride: additionalProperties: {} type: object runtimePolicySetId: type: string status: type: string type: object store.CatalogProvider: properties: capabilitySchema: additionalProperties: {} type: object code: type: string createdAt: type: string defaultAuthType: type: string defaultBaseUrl: type: string defaultRateLimitPolicy: additionalProperties: {} type: object displayName: type: string iconPath: type: string id: type: string metadata: additionalProperties: {} type: object providerKey: type: string providerType: type: string source: type: string status: type: string updatedAt: type: string type: object store.CatalogProviderInput: properties: capabilitySchema: additionalProperties: {} type: object code: type: string defaultAuthType: type: string defaultBaseUrl: type: string defaultRateLimitPolicy: additionalProperties: {} type: object displayName: type: string iconPath: type: string metadata: additionalProperties: {} type: object providerKey: type: string providerType: type: string source: type: string status: type: string type: object store.CreateAPIKeyInput: properties: expiresAt: type: string name: type: string scopes: items: type: string type: array type: object store.CreatePlatformInput: properties: authType: type: string baseUrl: type: string config: additionalProperties: {} type: object credentials: additionalProperties: {} type: object defaultDiscountFactor: type: number defaultPricingMode: type: string internalName: type: string name: type: string platformKey: type: string pricingRuleSetId: type: string priority: type: integer provider: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object status: type: string type: object store.CreatePlatformModelInput: properties: baseModelId: type: string billingConfig: additionalProperties: {} type: object billingConfigOverride: additionalProperties: {} type: object canonicalModelKey: type: string capabilities: additionalProperties: {} type: object capabilityOverride: additionalProperties: {} type: object discountFactor: type: number displayName: type: string enabled: type: boolean modelAlias: type: string modelName: type: string modelType: items: type: string type: array permissionConfig: additionalProperties: {} type: object platformId: type: string pricingMode: type: string pricingRuleSetId: type: string providerModelName: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object runtimePolicyOverride: additionalProperties: {} type: object runtimePolicySetId: type: string type: object store.CreatedAPIKey: properties: apiKey: $ref: '#/definitions/store.APIKey' secret: type: string type: object store.GatewayTask: properties: apiKeyId: type: string apiKeyName: type: string apiKeyPrefix: type: string asyncMode: type: boolean attemptCount: type: integer attempts: items: $ref: '#/definitions/store.TaskAttempt' type: array billingSummary: additionalProperties: {} type: object billings: items: {} type: array createdAt: type: string error: type: string errorCode: type: string errorMessage: type: string finalChargeAmount: type: number finishedAt: type: string gatewayTenantId: type: string gatewayUserId: type: string id: type: string kind: type: string metrics: additionalProperties: {} type: object model: type: string modelType: type: string remoteTaskId: type: string remoteTaskPayload: additionalProperties: {} type: object request: additionalProperties: {} type: object requestId: type: string requestedModel: type: string resolvedModel: type: string responseDurationMs: type: integer responseFinishedAt: type: string responseStartedAt: type: string result: additionalProperties: {} type: object riverJobId: type: integer runMode: type: string status: type: string tenantId: type: string tenantKey: type: string updatedAt: type: string usage: additionalProperties: {} type: object userGroupId: type: string userGroupKey: type: string userId: type: string userSource: type: string type: object store.GatewayTenant: properties: authPolicy: additionalProperties: {} type: object billingProfile: additionalProperties: {} type: object createdAt: type: string defaultUserGroupId: type: string description: type: string externalTenantId: type: string id: type: string metadata: additionalProperties: {} type: object name: type: string planKey: type: string rateLimitPolicy: additionalProperties: {} type: object source: type: string sourceUpdatedAt: type: string status: type: string syncedAt: type: string tenantKey: type: string updatedAt: type: string type: object store.GatewayTenantInput: properties: authPolicy: additionalProperties: {} type: object billingProfile: additionalProperties: {} type: object defaultUserGroupId: type: string description: type: string externalTenantId: type: string metadata: additionalProperties: {} type: object name: type: string planKey: type: string rateLimitPolicy: additionalProperties: {} type: object source: type: string status: type: string tenantKey: type: string type: object store.GatewayUser: properties: authProfile: additionalProperties: {} type: object avatarUrl: type: string createdAt: type: string defaultUserGroupId: type: string displayName: type: string email: type: string externalUserId: type: string gatewayTenantId: type: string id: type: string lastLoginAt: type: string metadata: additionalProperties: {} type: object phone: type: string roles: items: type: string type: array source: type: string sourceUpdatedAt: type: string status: type: string syncedAt: type: string tenantId: type: string tenantKey: type: string updatedAt: type: string userKey: type: string username: type: string walletAccounts: items: $ref: '#/definitions/store.GatewayWalletAccount' type: array type: object store.GatewayUserInput: properties: authProfile: additionalProperties: {} type: object avatarUrl: type: string defaultUserGroupId: type: string displayName: type: string email: type: string externalUserId: type: string gatewayTenantId: type: string metadata: additionalProperties: {} type: object password: type: string phone: type: string roles: items: type: string type: array source: type: string status: type: string tenantId: type: string tenantKey: type: string userKey: type: string username: type: string type: object store.GatewayWalletAccount: properties: balance: type: number createdAt: type: string currency: type: string frozenBalance: type: number gatewayTenantId: type: string gatewayUserId: type: string id: type: string metadata: additionalProperties: {} type: object status: type: string tenantId: type: string tenantKey: type: string totalRecharged: type: number totalSpent: type: number updatedAt: type: string userId: type: string type: object store.GatewayWalletTransaction: properties: accountId: type: string amount: type: number balanceAfter: type: number balanceBefore: type: number createdAt: type: string currency: type: string direction: type: string gatewayTenantId: type: string gatewayUserId: type: string id: type: string idempotencyKey: type: string metadata: additionalProperties: {} type: object referenceId: type: string referenceType: type: string transactionType: type: string type: object store.LocalLoginInput: properties: account: type: string password: type: string type: object store.LocalRegisterInput: properties: displayName: type: string email: type: string invitationCode: type: string password: type: string username: type: string type: object store.ModelRateLimitStatus: properties: concurrent: $ref: '#/definitions/store.RateLimitMetricStatus' displayName: type: string enabled: type: boolean loadRatio: type: number modelAlias: type: string modelCooldownUntil: type: string modelName: type: string modelType: items: type: string type: array platformCooldownUntil: type: string platformDisabledReason: $ref: '#/definitions/store.PlatformPolicyEvent' platformDynamicPriority: type: integer platformEffectivePriority: type: integer platformId: type: string platformModelId: type: string platformName: type: string platformPriority: type: integer platformStatus: type: string provider: type: string providerModelName: type: string queuedTasks: type: number rateLimitPolicy: additionalProperties: {} type: object recentPriorityDemotions: items: $ref: '#/definitions/store.PriorityDemotionRecord' type: array rpm: $ref: '#/definitions/store.RateLimitMetricStatus' tpm: $ref: '#/definitions/store.RateLimitMetricStatus' type: object store.Platform: properties: authType: type: string baseUrl: type: string config: additionalProperties: {} type: object cooldownUntil: type: string createdAt: type: string credentialsPreview: additionalProperties: {} type: object defaultDiscountFactor: type: number defaultPricingMode: type: string dynamicPriority: type: integer effectivePriority: type: integer id: type: string internalName: type: string name: type: string platformKey: type: string pricingRuleSetId: type: string priority: type: integer provider: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object status: type: string updatedAt: type: string type: object store.PlatformModel: properties: baseModelId: type: string billingConfig: additionalProperties: {} type: object billingConfigOverride: additionalProperties: {} type: object capabilities: additionalProperties: {} type: object capabilityOverride: additionalProperties: {} type: object cooldownUntil: type: string createdAt: type: string discountFactor: type: number displayName: type: string enabled: type: boolean id: type: string modelAlias: type: string modelName: type: string modelType: items: type: string type: array permissionConfig: additionalProperties: {} type: object platformId: type: string platformName: type: string pricingMode: type: string pricingRuleSetId: type: string provider: type: string providerModelName: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object runtimePolicyOverride: additionalProperties: {} type: object runtimePolicySetId: type: string updatedAt: type: string type: object store.PlatformPolicyEvent: properties: category: type: string createdAt: type: string errorCode: type: string errorMessage: type: string eventType: type: string id: type: string matchedValue: type: string platformId: type: string platformModelId: type: string policy: type: string policyRule: type: string policySource: type: string reason: type: string statusCode: type: integer taskId: type: string type: object store.PlayableAPIKey: properties: createdAt: type: string expiresAt: type: string gatewayTenantId: type: string gatewayUserId: type: string id: type: string keyPrefix: type: string lastUsedAt: type: string name: type: string quotaPolicy: additionalProperties: {} type: object rateLimitPolicy: additionalProperties: {} type: object scopes: items: type: string type: array secret: type: string status: type: string tenantId: type: string tenantKey: type: string updatedAt: type: string userGroupId: type: string userId: type: string type: object store.PricingRule: properties: basePrice: type: number baseWeight: additionalProperties: {} type: object calculatorType: type: string createdAt: type: string currency: type: string dimensionSchema: additionalProperties: {} type: object displayName: type: string dynamicWeight: additionalProperties: {} type: object formulaConfig: additionalProperties: {} type: object id: type: string metadata: additionalProperties: {} type: object priority: type: integer resourceType: type: string ruleKey: type: string ruleSetId: type: string scopeId: type: string scopeType: type: string status: type: string unit: type: string updatedAt: type: string type: object store.PricingRuleInput: properties: basePrice: type: number baseWeight: additionalProperties: {} type: object calculatorType: type: string currency: type: string dimensionSchema: additionalProperties: {} type: object displayName: type: string dynamicWeight: additionalProperties: {} type: object formulaConfig: additionalProperties: {} type: object metadata: additionalProperties: {} type: object priority: type: integer resourceType: type: string ruleKey: type: string status: type: string unit: type: string type: object store.PricingRuleSet: properties: category: type: string createdAt: type: string currency: type: string description: type: string id: type: string metadata: additionalProperties: {} type: object name: type: string ruleSetKey: type: string rules: items: $ref: '#/definitions/store.PricingRule' type: array status: type: string updatedAt: type: string type: object store.PricingRuleSetInput: properties: category: type: string currency: type: string description: type: string metadata: additionalProperties: {} type: object name: type: string ruleSetKey: type: string rules: items: $ref: '#/definitions/store.PricingRuleInput' type: array status: type: string type: object store.PriorityDemotionRecord: properties: category: type: string createdAt: type: string dynamicPriority: type: integer errorCode: type: string errorMessage: type: string id: type: string matchedValue: type: string platformId: type: string platformModelId: type: string policy: type: string policyRule: type: string policySource: type: string reason: type: string statusCode: type: integer taskId: type: string type: object store.RateLimitMetricStatus: properties: currentValue: type: number limitValue: type: number limited: type: boolean ratio: type: number reservedValue: type: number resetAt: type: string usedValue: type: number type: object store.RateLimitWindow: properties: limitValue: type: number metric: type: string reservedValue: type: number resetAt: type: string scopeKey: type: string scopeType: type: string updatedAt: type: string usedValue: type: number windowStart: type: string type: object store.RunnerPolicy: properties: createdAt: type: string description: type: string failoverPolicy: additionalProperties: {} type: object hardStopPolicy: additionalProperties: {} type: object id: type: string metadata: additionalProperties: {} type: object name: type: string policyKey: type: string priorityDemotePolicy: additionalProperties: {} type: object status: type: string updatedAt: type: string type: object store.RunnerPolicyInput: properties: description: type: string failoverPolicy: additionalProperties: {} type: object hardStopPolicy: additionalProperties: {} type: object metadata: additionalProperties: {} type: object name: type: string policyKey: type: string priorityDemotePolicy: additionalProperties: {} type: object status: type: string type: object store.RuntimePolicySet: properties: autoDisablePolicy: additionalProperties: {} type: object createdAt: type: string degradePolicy: additionalProperties: {} type: object description: type: string id: type: string metadata: additionalProperties: {} type: object name: type: string policyKey: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object status: type: string updatedAt: type: string type: object store.RuntimePolicySetInput: properties: autoDisablePolicy: additionalProperties: {} type: object degradePolicy: additionalProperties: {} type: object description: type: string metadata: additionalProperties: {} type: object name: type: string policyKey: type: string rateLimitPolicy: additionalProperties: {} type: object retryPolicy: additionalProperties: {} type: object status: type: string type: object store.TaskAttempt: properties: attemptNo: type: integer clientId: type: string errorCode: type: string errorMessage: type: string finishedAt: type: string id: type: string metrics: additionalProperties: {} type: object modelAlias: type: string modelName: type: string modelType: type: string platformId: type: string platformModelId: type: string platformName: type: string provider: type: string providerModelName: type: string queueKey: type: string requestId: type: string requestSnapshot: additionalProperties: {} type: object responseDurationMs: type: integer responseFinishedAt: type: string responseSnapshot: additionalProperties: {} type: object responseStartedAt: type: string retryable: type: boolean simulated: type: boolean startedAt: type: string status: type: string statusCode: type: integer taskId: type: string usage: additionalProperties: {} type: object type: object store.TaskParamPreprocessingLog: properties: actualInput: additionalProperties: {} type: object attemptId: type: string attemptNo: type: integer changeCount: type: integer changed: type: boolean changes: items: {} type: array clientId: type: string convertedOutput: additionalProperties: {} type: object createdAt: type: string id: type: string model: additionalProperties: {} type: object modelType: type: string platformId: type: string platformModelId: type: string taskId: type: string type: object store.UserGroup: properties: billingDiscountPolicy: additionalProperties: {} type: object createdAt: type: string description: type: string groupKey: type: string id: type: string metadata: additionalProperties: {} type: object name: type: string priority: type: integer quotaPolicy: additionalProperties: {} type: object rateLimitPolicy: additionalProperties: {} type: object rechargeDiscountPolicy: additionalProperties: {} type: object source: type: string status: type: string updatedAt: type: string type: object store.UserGroupInput: properties: billingDiscountPolicy: additionalProperties: {} type: object description: type: string groupKey: type: string metadata: additionalProperties: {} type: object name: type: string priority: type: integer quotaPolicy: additionalProperties: {} type: object rateLimitPolicy: additionalProperties: {} type: object rechargeDiscountPolicy: additionalProperties: {} type: object source: type: string status: type: string type: object store.WalletSummary: properties: accounts: items: $ref: '#/definitions/store.GatewayWalletAccount' type: array primaryAccount: $ref: '#/definitions/store.GatewayWalletAccount' type: object info: contact: {} description: |- EasyAI AI Gateway 的本地鉴权、平台模型管理、定价、运行策略、钱包和 AI 任务接口。 受保护接口使用 Authorization: Bearer ,管理接口只接受 JWT 用户凭证。 title: EasyAI AI Gateway API version: 0.1.0 paths: /api/admin/access-rules: get: description: 管理端返回用户组、租户、用户或 API Key 到平台、平台模型、基础模型的访问规则。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AccessRuleListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出访问规则 tags: - access-rules post: consumes: - application/json description: 管理端创建一条访问控制规则。 parameters: - description: 访问规则请求 in: body name: input required: true schema: $ref: '#/definitions/store.AccessRuleInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.AccessRule' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建访问规则 tags: - access-rules /api/admin/access-rules/{ruleID}: delete: description: 管理端删除一条访问控制规则。 parameters: - description: 访问规则 ID in: path name: ruleID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除访问规则 tags: - access-rules patch: consumes: - application/json description: 管理端更新一条访问控制规则。 parameters: - description: 访问规则 ID in: path name: ruleID required: true type: string - description: 访问规则请求 in: body name: input required: true schema: $ref: '#/definitions/store.AccessRuleInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.AccessRule' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新访问规则 tags: - access-rules /api/admin/access-rules/batch: post: consumes: - application/json description: 管理端为同一主体批量新增、更新或删除资源访问规则。 parameters: - description: 访问规则批量请求 in: body name: input required: true schema: $ref: '#/definitions/store.AccessRuleBatchInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AccessRuleListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 批量写入访问规则 tags: - access-rules /api/admin/audit-logs: get: description: 管理端按分类、动作、目标类型和目标 ID 查询审计日志。 parameters: - description: 审计分类 in: query name: category type: string - description: 审计动作 in: query name: action type: string - description: 目标类型 in: query name: targetType type: string - description: 目标 ID in: query name: targetId type: string - default: 100 description: 返回数量 in: query name: limit type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AuditLogListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出审计日志 tags: - billing /api/admin/catalog/base-models: get: description: 返回基础模型目录;公共路径和管理路径返回同一结构。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.BaseModelListResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 列出基础模型 tags: - catalog post: consumes: - application/json description: 管理端新增基础模型目录项,providerKey、providerModelName 和 modelType 必填。 parameters: - description: 基础模型请求 in: body name: input required: true schema: $ref: '#/definitions/store.BaseModelInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.BaseModel' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建基础模型 tags: - catalog /api/admin/catalog/base-models/{baseModelID}: delete: description: 管理端删除基础模型目录项。 parameters: - description: 基础模型 ID in: path name: baseModelID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除基础模型 tags: - catalog patch: consumes: - application/json description: 管理端更新基础模型目录项及能力、图标、默认快照等元数据。 parameters: - description: 基础模型 ID in: path name: baseModelID required: true type: string - description: 基础模型请求 in: body name: input required: true schema: $ref: '#/definitions/store.BaseModelInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.BaseModel' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新基础模型 tags: - catalog /api/admin/catalog/base-models/{baseModelID}/reset: post: description: 将指定基础模型恢复为系统默认快照;无默认快照时返回 409。 parameters: - description: 基础模型 ID in: path name: baseModelID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.BaseModel' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 重置基础模型 tags: - catalog /api/admin/catalog/base-models/reset-all: post: description: 将所有具备系统默认快照的基础模型恢复为默认配置。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.BaseModelListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 重置全部基础模型 tags: - catalog /api/admin/catalog/providers: get: description: 返回模型目录使用的供应商元数据;公共路径和管理路径返回同一结构。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CatalogProviderListResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 列出目录供应商 tags: - catalog post: consumes: - application/json description: 管理端新增模型目录供应商,providerKey 和 displayName 必填。 parameters: - description: 目录供应商请求 in: body name: input required: true schema: $ref: '#/definitions/store.CatalogProviderInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.CatalogProvider' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建目录供应商 tags: - catalog /api/admin/catalog/providers/{providerID}: delete: description: 管理端删除目录供应商。 parameters: - description: 目录供应商 ID in: path name: providerID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除目录供应商 tags: - catalog patch: consumes: - application/json description: 管理端更新目录供应商展示信息、图标和元数据。 parameters: - description: 目录供应商 ID in: path name: providerID required: true type: string - description: 目录供应商请求 in: body name: input required: true schema: $ref: '#/definitions/store.CatalogProviderInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.CatalogProvider' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新目录供应商 tags: - catalog /api/admin/config/network-proxy: get: description: 管理端查看服务当前使用的全局 HTTP 代理配置及来源。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.NetworkProxyConfigResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取网络代理配置 tags: - config /api/admin/models: get: description: 管理端返回所有平台模型,并补齐有效计费配置。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformModelListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出平台模型 tags: - platform-models /api/admin/platform-models: post: consumes: - application/json description: 为平台新增一个可路由模型;路径中的 platformID 会覆盖请求体 platformId。 parameters: - description: 平台模型配置请求 in: body name: input required: true schema: $ref: '#/definitions/store.CreatePlatformModelInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.PlatformModel' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建平台模型 tags: - platform-models /api/admin/platform-models/{modelID}: delete: description: 删除指定平台模型路由配置。 parameters: - description: 平台模型 ID in: path name: modelID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除平台模型 tags: - platform-models /api/admin/platforms: get: description: 管理端返回所有接入平台及其优先级、定价和运行策略摘要。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出平台 tags: - platforms post: consumes: - application/json description: 新增模型供应商平台配置;credentials 会被服务端保存并在返回值中脱敏。 parameters: - description: 平台配置请求 in: body name: input required: true schema: $ref: '#/definitions/store.CreatePlatformInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.Platform' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建平台 tags: - platforms /api/admin/platforms/{platformID}: delete: description: 删除指定平台及关联配置;不存在时返回 404。 parameters: - description: 平台 ID in: path name: platformID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除平台 tags: - platforms patch: consumes: - application/json description: 覆盖指定平台的基础配置、凭证、优先级、定价和运行策略。 parameters: - description: 平台 ID in: path name: platformID required: true type: string - description: 平台配置请求 in: body name: input required: true schema: $ref: '#/definitions/store.CreatePlatformInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.Platform' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新平台 tags: - platforms /api/admin/platforms/{platformID}/dynamic-priority: patch: consumes: - application/json description: 管理端调整平台运行时动态优先级;reset 为 true 时清空动态值。 parameters: - description: 平台 ID in: path name: platformID required: true type: string - description: 动态优先级请求 in: body name: input required: true schema: $ref: '#/definitions/httpapi.updatePlatformDynamicPriorityRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.Platform' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新平台动态优先级 tags: - runtime /api/admin/platforms/{platformID}/models: post: consumes: - application/json description: 为平台新增一个可路由模型;路径中的 platformID 会覆盖请求体 platformId。 parameters: - description: 平台 ID,使用 /api/admin/platforms/{platformID}/models 时由路径提供 in: path name: platformID required: true type: string - description: 平台模型配置请求 in: body name: input required: true schema: $ref: '#/definitions/store.CreatePlatformModelInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.PlatformModel' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建平台模型 tags: - platform-models put: consumes: - application/json description: 用请求体中的 models 列表整体替换指定平台下的模型配置。 parameters: - description: 平台 ID in: path name: platformID required: true type: string - description: 模型列表请求 in: body name: input required: true schema: $ref: '#/definitions/httpapi.ReplacePlatformModelsRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformModelListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 替换平台模型 tags: - platform-models /api/admin/pricing/rule-sets: get: description: 管理端返回可分配给平台、模型、租户或用户组的定价规则集。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PricingRuleSetListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出定价规则集 tags: - pricing post: consumes: - application/json description: 管理端创建定价规则集,ruleSetKey、name 和至少一条 rule 必填。 parameters: - description: 定价规则集请求 in: body name: input required: true schema: $ref: '#/definitions/store.PricingRuleSetInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.PricingRuleSet' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建定价规则集 tags: - pricing /api/admin/pricing/rule-sets/{ruleSetID}: delete: description: 管理端删除非默认定价规则集;默认规则集受保护。 parameters: - description: 定价规则集 ID in: path name: ruleSetID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除定价规则集 tags: - pricing patch: consumes: - application/json description: 管理端更新定价规则集及其规则列表。 parameters: - description: 定价规则集 ID in: path name: ruleSetID required: true type: string - description: 定价规则集请求 in: body name: input required: true schema: $ref: '#/definitions/store.PricingRuleSetInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.PricingRuleSet' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新定价规则集 tags: - pricing /api/admin/pricing/rules: get: description: 返回所有定价规则明细,便于管理端排查有效价格。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PricingRuleListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出定价规则 tags: - pricing /api/admin/runtime/model-rate-limits: get: description: 管理端查看平台模型维度的限流和冷却状态。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.ModelRateLimitStatusListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出模型限流状态 tags: - runtime /api/admin/runtime/policy-sets: get: description: 管理端返回可分配给平台、模型或用户组的运行策略集。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.RuntimePolicySetListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出运行策略集 tags: - runtime post: consumes: - application/json description: 管理端创建运行策略集,policyKey 和 name 必填。 parameters: - description: 运行策略集请求 in: body name: input required: true schema: $ref: '#/definitions/store.RuntimePolicySetInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.RuntimePolicySet' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建运行策略集 tags: - runtime /api/admin/runtime/policy-sets/{policySetID}: delete: description: 管理端删除非默认运行策略集;默认策略集受保护。 parameters: - description: 运行策略集 ID in: path name: policySetID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除运行策略集 tags: - runtime patch: consumes: - application/json description: 管理端更新运行策略集及其限流、重试、超时等策略配置。 parameters: - description: 运行策略集 ID in: path name: policySetID required: true type: string - description: 运行策略集请求 in: body name: input required: true schema: $ref: '#/definitions/store.RuntimePolicySetInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.RuntimePolicySet' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新运行策略集 tags: - runtime /api/admin/runtime/rate-limit-windows: get: description: 管理端查看当前运行时限流窗口状态。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.RateLimitWindowListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出限流窗口 tags: - runtime /api/admin/runtime/runner-policy: get: description: 管理端获取当前生效的默认 Runner 调度策略。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.RunnerPolicy' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取 Runner 策略 tags: - runtime patch: consumes: - application/json description: 管理端写入默认 Runner 调度策略。 parameters: - description: Runner 策略请求 in: body name: input required: true schema: $ref: '#/definitions/store.RunnerPolicyInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.RunnerPolicy' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新 Runner 策略 tags: - runtime /api/admin/tenants: get: description: 管理端返回网关租户列表。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.TenantListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出租户 tags: - identity post: consumes: - application/json description: 管理端创建网关租户,tenantKey 和 name 必填。 parameters: - description: 租户请求 in: body name: input required: true schema: $ref: '#/definitions/store.GatewayTenantInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.GatewayTenant' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建租户 tags: - identity /api/admin/tenants/{tenantID}: delete: description: 管理端删除网关租户。 parameters: - description: 租户 ID in: path name: tenantID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除租户 tags: - identity patch: consumes: - application/json description: 管理端更新网关租户信息。 parameters: - description: 租户 ID in: path name: tenantID required: true type: string - description: 租户请求 in: body name: input required: true schema: $ref: '#/definitions/store.GatewayTenantInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.GatewayTenant' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新租户 tags: - identity /api/admin/user-groups: get: description: 管理端返回用户组及其计费、限流和配额策略。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.UserGroupListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出用户组 tags: - identity post: consumes: - application/json description: 管理端创建用户组,可配置默认定价、运行策略、限流和配额策略。 parameters: - description: 用户组请求 in: body name: input required: true schema: $ref: '#/definitions/store.UserGroupInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.UserGroup' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建用户组 tags: - identity /api/admin/user-groups/{groupID}: delete: description: 管理端删除用户组。 parameters: - description: 用户组 ID in: path name: groupID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除用户组 tags: - identity patch: consumes: - application/json description: 管理端更新用户组基础信息和策略配置。 parameters: - description: 用户组 ID in: path name: groupID required: true type: string - description: 用户组请求 in: body name: input required: true schema: $ref: '#/definitions/store.UserGroupInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.UserGroup' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新用户组 tags: - identity /api/admin/users: get: description: 管理端返回网关用户列表及钱包摘要。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.UserListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出用户 tags: - identity post: consumes: - application/json description: 管理端创建网关用户;password 为空时不设置本地密码,非空时至少 8 位。 parameters: - description: 用户请求 in: body name: input required: true schema: $ref: '#/definitions/store.GatewayUserInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.GatewayUser' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建用户 tags: - identity /api/admin/users/{userID}: delete: description: 管理端删除网关用户。 parameters: - description: 用户 ID in: path name: userID required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除用户 tags: - identity patch: consumes: - application/json description: 管理端更新网关用户资料、角色、默认用户组和可选本地密码。 parameters: - description: 用户 ID in: path name: userID required: true type: string - description: 用户请求 in: body name: input required: true schema: $ref: '#/definitions/store.GatewayUserInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.GatewayUser' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 更新用户 tags: - identity /api/admin/users/{userID}/wallet: patch: consumes: - application/json description: 管理端把指定用户钱包余额调整到目标值,并记录审计日志;balance 不允许为负数。 parameters: - description: 用户 ID in: path name: userID required: true type: string - description: 钱包余额设置请求 in: body name: input required: true schema: $ref: '#/definitions/httpapi.walletBalanceRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.WalletAdjustmentResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 设置用户钱包余额 tags: - billing /api/playground/api-keys: get: description: 返回当前本地用户可在 Playground 中直接使用的 API Key 和 secret。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlayableAPIKeyListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出 Playground API Key tags: - playground /api/v1/api-keys: get: description: 返回当前用户创建的 API Key 元数据,secret 只在创建时返回。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.APIKeyListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出 API Key tags: - api-keys post: consumes: - application/json description: 为当前本地用户创建 API Key;secret 仅在本次响应中返回。 parameters: - description: API Key 创建请求 in: body name: input required: true schema: $ref: '#/definitions/store.CreateAPIKeyInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/store.CreatedAPIKey' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建 API Key tags: - api-keys /api/v1/api-keys/{apiKeyID}: delete: description: 删除当前用户拥有的 API Key。 parameters: - description: API Key ID in: path name: apiKeyID required: true type: string produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 删除 API Key tags: - api-keys /api/v1/api-keys/{apiKeyID}/disable: patch: description: 禁用当前用户拥有的 API Key,保留记录但不再允许调用。 parameters: - description: API Key ID in: path name: apiKeyID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.APIKey' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 禁用 API Key tags: - api-keys /api/v1/api-keys/access-rules: get: description: 返回当前本地用户可管理的 API Key 访问规则。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AccessRuleListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出 API Key 访问规则 tags: - api-keys /api/v1/api-keys/access-rules/batch: post: consumes: - application/json description: 当前本地用户为自己的 API Key 批量新增、更新或删除可访问资源。 parameters: - description: API Key 访问规则批量请求,subjectType 必须为 api_key in: body name: input required: true schema: $ref: '#/definitions/store.AccessRuleBatchInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AccessRuleListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 批量写入 API Key 访问规则 tags: - api-keys /api/v1/auth/login: post: consumes: - application/json description: 使用用户名或邮箱登录本地账号,并返回 24 小时 JWT。 parameters: - description: 登录请求,account 可为用户名或邮箱 in: body name: input required: true schema: $ref: '#/definitions/store.LocalLoginInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.AuthResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 本地登录 tags: - auth /api/v1/auth/register: post: consumes: - application/json description: 在 standalone 或 hybrid 身份模式下创建本地用户,并返回 24 小时 JWT。 parameters: - description: 注册请求,password 至少 8 位,invitationCode 取决于部署策略 in: body name: input required: true schema: $ref: '#/definitions/store.LocalRegisterInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/httpapi.AuthResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "409": description: Conflict schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 本地注册 tags: - auth /api/v1/chat/completions: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /api/v1/images/edits: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /api/v1/images/generations: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /api/v1/me: get: description: 返回鉴权中解析出的用户、租户、用户组和 API Key 上下文。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.User' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取当前用户 tags: - auth /api/v1/model-catalog: get: description: 聚合平台模型、基础模型、供应商、运行策略和访问规则,返回前端模型目录所需的过滤器、摘要和展示字段。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.ModelCatalogResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出模型目录 tags: - model-catalog /api/v1/models: get: description: 按当前用户权限返回可用于 Playground 或 API 调用的模型列表。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformModelListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出可调用模型 tags: - playground /api/v1/platforms: get: description: 按当前用户可访问模型过滤平台,仅返回启用且存在可访问模型的平台。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出可用平台 tags: - playground /api/v1/playground/models: get: description: 按当前用户权限返回可用于 Playground 或 API 调用的模型列表。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PlatformModelListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出可调用模型 tags: - playground /api/v1/pricing/estimate: post: consumes: - application/json description: 按当前用户、模型候选、任务类型和请求参数估算计费条目。 parameters: - description: 计费估算请求,kind 默认为 chat.completions in: body name: input required: true schema: $ref: '#/definitions/httpapi.PricingEstimateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.PricingEstimateResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 估算请求价格 tags: - pricing /api/v1/public/catalog/base-models: get: description: 返回基础模型目录;公共路径和管理路径返回同一结构。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.BaseModelListResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 列出基础模型 tags: - catalog /api/v1/public/catalog/providers: get: description: 返回模型目录使用的供应商元数据;公共路径和管理路径返回同一结构。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CatalogProviderListResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 列出目录供应商 tags: - catalog /api/v1/responses: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /api/v1/tasks: get: description: 按当前用户列出任务,支持关键字、模型类型、时间范围和分页过滤。 parameters: - description: 搜索关键字,别名 query in: query name: q type: string - description: 模型类型,别名 type in: query name: modelType type: string - description: 创建时间起点,支持 RFC3339 或日期格式,别名 from in: query name: createdFrom type: string - description: 创建时间终点,支持 RFC3339 或日期格式,别名 to in: query name: createdTo type: string - default: 1 description: 页码 in: query name: page type: integer - default: 50 description: 每页数量,别名 limit in: query name: pageSize type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.TaskListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出任务 tags: - tasks /api/v1/tasks/{taskID}: get: description: 返回指定任务的请求、状态、输出和执行摘要。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.GatewayTask' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取任务详情 tags: - tasks /api/v1/tasks/{taskID}/events: get: description: 以 text/event-stream 返回指定任务的历史事件;无事件时返回 task.accepted 占位事件。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - text/event-stream responses: "200": description: Server-Sent Events,data 为 store.TaskEvent 或 TaskAcceptedEvent schema: type: string "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 订阅任务事件 tags: - tasks /api/v1/tasks/{taskID}/param-preprocessing: get: description: 返回指定任务在执行前的参数改写、校验或模板处理日志。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.TaskParamPreprocessingLogListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取任务参数预处理日志 tags: - tasks /api/v1/videos/generations: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /api/workspace/tasks: get: description: 按当前用户列出任务,支持关键字、模型类型、时间范围和分页过滤。 parameters: - description: 搜索关键字,别名 query in: query name: q type: string - description: 模型类型,别名 type in: query name: modelType type: string - description: 创建时间起点,支持 RFC3339 或日期格式,别名 from in: query name: createdFrom type: string - description: 创建时间终点,支持 RFC3339 或日期格式,别名 to in: query name: createdTo type: string - default: 1 description: 页码 in: query name: page type: integer - default: 50 description: 每页数量,别名 limit in: query name: pageSize type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.TaskListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出任务 tags: - tasks /api/workspace/tasks/{taskID}: get: description: 返回指定任务的请求、状态、输出和执行摘要。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.GatewayTask' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取任务详情 tags: - tasks /api/workspace/tasks/{taskID}/events: get: description: 以 text/event-stream 返回指定任务的历史事件;无事件时返回 task.accepted 占位事件。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - text/event-stream responses: "200": description: Server-Sent Events,data 为 store.TaskEvent 或 TaskAcceptedEvent schema: type: string "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 订阅任务事件 tags: - tasks /api/workspace/tasks/{taskID}/param-preprocessing: get: description: 返回指定任务在执行前的参数改写、校验或模板处理日志。 parameters: - description: 任务 ID in: path name: taskID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.TaskParamPreprocessingLogListResponse' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取任务参数预处理日志 tags: - tasks /api/workspace/wallet: get: description: 返回当前用户的钱包账户、余额和最近消费摘要,可按 currency 过滤。 parameters: - default: USD description: 币种 in: query name: currency type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/store.WalletSummary' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 获取钱包摘要 tags: - wallet /api/workspace/wallet/transactions: get: description: 返回当前用户的钱包交易流水,支持关键字、方向、交易类型、时间范围和分页过滤。 parameters: - description: 搜索关键字,别名 query in: query name: q type: string - description: 交易方向 in: query name: direction type: string - description: 交易类型 in: query name: transactionType type: string - description: 创建时间起点,别名 from in: query name: createdFrom type: string - description: 创建时间终点,别名 to in: query name: createdTo type: string - default: 1 description: 页码 in: query name: page type: integer - default: 50 description: 每页数量,别名 limit in: query name: pageSize type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.WalletTransactionListResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "500": description: Internal Server Error schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 列出钱包交易 tags: - wallet /chat/completions: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /healthz: get: description: 返回服务进程、运行环境和身份模式,供负载均衡或人工排障使用。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.HealthResponse' summary: 健康检查 tags: - system /images/edits: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /images/generations: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /readyz: get: description: 检查 Postgres 是否可用;数据库不可用时返回 503。 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.ReadyResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/httpapi.ErrorEnvelope' summary: 就绪检查 tags: - system /responses: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /static/simulation/{asset}: get: description: 返回本地模拟模式使用的图片、视频封面或短视频资源。 parameters: - description: 资源文件名,可选 image.svg、image.png、image-edit.svg、image-edit.png、video-poster.svg、video.mp4 in: path name: asset required: true type: string produces: - image/svg+xml - video/mp4 responses: "200": description: OK schema: type: file "404": description: Not Found schema: type: string summary: 获取模拟资源 tags: - simulation /v1/chat/completions: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /v1/images/edits: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /v1/images/generations: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks /v1/responses: post: consumes: - application/json description: 网关任务接口按 model 选择平台模型;/api/v1 路径返回任务受理结果,OpenAI-compatible 路径同步返回兼容响应或 SSE 流。 parameters: - description: true 时异步创建任务并返回 202 in: header name: X-Async type: boolean - description: AI 任务请求,字段随任务类型变化 in: body name: input required: true schema: $ref: '#/definitions/httpapi.TaskRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/httpapi.CompatibleResponse' "202": description: Accepted schema: $ref: '#/definitions/httpapi.TaskAcceptedResponse' "400": description: Bad Request schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "401": description: Unauthorized schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "402": description: Payment Required schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "403": description: Forbidden schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "404": description: Not Found schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "429": description: Too Many Requests schema: $ref: '#/definitions/httpapi.ErrorEnvelope' "502": description: Bad Gateway schema: $ref: '#/definitions/httpapi.ErrorEnvelope' security: - BearerAuth: [] summary: 创建或执行 AI 任务 tags: - tasks schemes: - http - https securityDefinitions: BearerAuth: description: Bearer JWT 或 API Key。 in: header name: Authorization type: apiKey swagger: "2.0"