basePath: /
definitions:
  auth.User:
    properties:
      apiKeyId:
        type: string
      apiKeyName:
        type: string
      apiKeyPrefix:
        type: string
      apiKeyScopes:
        items:
          type: string
        type: array
      apiKeySecret:
        type: string
      contextType:
        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
      tenantName:
        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.AdminTaskListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.AdminGatewayTask'
        type: array
      page:
        example: 1
        type: integer
      pageSize:
        example: 50
        type: integer
      total:
        example: 42
        type: integer
    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.BillingSettlementListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.BillingSettlement'
        type: array
      page:
        example: 1
        type: integer
      pageSize:
        example: 50
        type: integer
      total:
        example: 42
        type: integer
    type: object
  httpapi.BillingSettlementRetryResponse:
    properties:
      auditLog:
        $ref: '#/definitions/store.AuditLog'
      settlement:
        $ref: '#/definitions/store.BillingSettlement'
    type: object
  httpapi.CatalogProviderListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.CatalogProvider'
        type: array
    type: object
  httpapi.ChatCompletionChoice:
    properties:
      finish_reason:
        example: stop
        type: string
      index:
        example: 0
        type: integer
      message:
        $ref: '#/definitions/httpapi.ChatCompletionChoiceMessage'
    type: object
  httpapi.ChatCompletionChoiceMessage:
    properties:
      content:
        example: Hello
        type: string
      role:
        example: assistant
        type: string
    type: object
  httpapi.ChatCompletionCompatibleResponse:
    properties:
      choices:
        items:
          $ref: '#/definitions/httpapi.ChatCompletionChoice'
        type: array
      created:
        example: 1710000000
        type: integer
      id:
        example: chatcmpl-123
        type: string
      model:
        example: gpt-4o-mini
        type: string
      object:
        example: chat.completion
        type: string
      usage:
        $ref: '#/definitions/httpapi.ChatCompletionUsage'
    type: object
  httpapi.ChatCompletionRequest:
    properties:
      audio:
        additionalProperties: true
        type: object
      frequency_penalty:
        example: 0
        type: number
      function_call: {}
      functions:
        items:
          additionalProperties: true
          type: object
        type: array
      logit_bias:
        additionalProperties: true
        type: object
      logprobs:
        type: boolean
      max_completion_tokens:
        example: 512
        type: integer
      max_tokens:
        example: 512
        type: integer
      messages:
        items:
          $ref: '#/definitions/httpapi.ChatMessage'
        type: array
      metadata:
        additionalProperties: true
        type: object
      modalities:
        items:
          type: string
        type: array
      model:
        example: gpt-4o-mini
        type: string
      moderation: {}
      "n":
        example: 1
        type: integer
      parallel_tool_calls:
        type: boolean
      prediction: {}
      presence_penalty:
        example: 0
        type: number
      prompt_cache_key:
        type: string
      prompt_cache_options:
        additionalProperties: true
        type: object
      prompt_cache_retention:
        enum:
        - in_memory
        - 24h
        type: string
      reasoning_effort:
        description: ReasoningEffort 推理强度，OpenAI-compatible 请求字段；支持 none、minimal、low、medium、high、xhigh、max。供应商自定义取值由网关按平台适配。
        enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
        - max
        example: medium
        type: string
      response_format: {}
      runMode:
        example: simulation
        type: string
      safety_identifier:
        type: string
      seed:
        type: integer
      service_tier:
        type: string
      stop: {}
      store:
        type: boolean
      stream:
        example: false
        type: boolean
      stream_options:
        additionalProperties: true
        type: object
      temperature:
        example: 0.7
        type: number
      tool_choice: {}
      tools:
        items:
          additionalProperties: true
          type: object
        type: array
      top_logprobs:
        type: integer
      top_p:
        example: 1
        type: number
      user:
        type: string
      verbosity:
        type: string
      web_search_options:
        additionalProperties: true
        type: object
    type: object
  httpapi.ChatCompletionUsage:
    properties:
      completion_tokens:
        example: 8
        type: integer
      input_tokens_details:
        $ref: '#/definitions/httpapi.ChatInputTokensDetails'
      prompt_tokens:
        example: 12
        type: integer
      prompt_tokens_details:
        $ref: '#/definitions/httpapi.ChatPromptTokensDetails'
      total_tokens:
        example: 20
        type: integer
    type: object
  httpapi.ChatInputTokensDetails:
    properties:
      cached_tokens:
        example: 4
        type: integer
    type: object
  httpapi.ChatMessage:
    properties:
      content: {}
      function_call: {}
      name:
        type: string
      role:
        example: user
        type: string
      tool_call_id:
        type: string
      tool_calls: {}
    type: object
  httpapi.ChatPromptTokensDetails:
    properties:
      cached_tokens:
        example: 4
        type: integer
    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.DailyTokenUsageResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.DailyTokenUsage'
        type: array
      range:
        additionalProperties:
          type: string
        type: object
      summary:
        $ref: '#/definitions/httpapi.dailyTokenUsageSummary'
      tokenDays:
        items:
          $ref: '#/definitions/store.DailyTokenUsage'
        type: array
    type: object
  httpapi.EasyAIGeneratedResponse:
    properties:
      cancellable:
        type: boolean
      code:
        type: string
      created:
        example: 1784772000000
        type: integer
      data:
        items:
          $ref: '#/definitions/httpapi.EasyAIMediaOutput'
        type: array
      message:
        type: string
      output:
        items:
          type: string
        type: array
      output_content:
        items:
          $ref: '#/definitions/httpapi.EasyAIMediaOutput'
        type: array
      query_url:
        example: /api/v1/ai/result/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
      result:
        additionalProperties: true
        type: object
      status:
        enum:
        - submitted
        - process
        - success
        - failed
        example: success
        type: string
      submitted:
        type: boolean
      task_id:
        example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
      taskId:
        example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
      upstream_task_id:
        example: provider-task-123
        type: string
      usage:
        additionalProperties: true
        type: object
    type: object
  httpapi.EasyAIMediaOutput:
    properties:
      audio_url:
        type: string
      b64_json:
        description: B64JSON is retained when result media transfer is disabled.
        type: string
      content:
        type: string
      duration:
        type: number
      format:
        type: string
      height:
        type: integer
      image_url:
        type: string
      metadata:
        additionalProperties: true
        type: object
      mime_type:
        type: string
      source_resolution:
        type: string
      target_resolution:
        type: string
      text:
        type: string
      type:
        enum:
        - image
        - video
        - audio
        - file
        - text
        example: video
        type: string
      url:
        example: https://cdn.example.com/output.mp4
        type: string
      video_url:
        type: string
      width:
        type: integer
    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
      param: {}
      status:
        example: 400
        type: integer
      type:
        example: invalid_request_error
        type: string
    type: object
  httpapi.FileStorageChannelListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.FileStorageChannel'
        type: array
    type: object
  httpapi.FileUploadData:
    properties:
      assetStorage:
        additionalProperties: true
        type: object
      contentType:
        example: image/png
        type: string
      filename:
        example: image.png
        type: string
      id:
        example: file_abc123
        type: string
      size:
        example: 1024
        type: integer
      url:
        example: /static/uploaded/upload-abc123.png
        type: string
    type: object
  httpapi.FileUploadResponse:
    properties:
      assetStorage:
        additionalProperties: true
        type: object
      contentType:
        example: image/png
        type: string
      data:
        $ref: '#/definitions/httpapi.FileUploadData'
      filename:
        example: image.png
        type: string
      id:
        example: file_abc123
        type: string
      size:
        example: 1024
        type: integer
      status:
        example: success
        type: string
      url:
        example: /static/uploaded/upload-abc123.png
        type: string
    type: object
  httpapi.GeminiErrorEnvelope:
    properties:
      error:
        $ref: '#/definitions/httpapi.GeminiErrorStatus'
    type: object
  httpapi.GeminiErrorStatus:
    properties:
      code:
        example: 400
        type: integer
      details:
        items:
          additionalProperties: {}
          type: object
        type: array
      message:
        example: Invalid argument
        type: string
      status:
        example: INVALID_ARGUMENT
        type: string
    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.ImageVectorizeRequest:
    properties:
      cleanupLevel:
        enum:
        - low
        - standard
        - strong
        example: standard
        type: string
      format:
        enum:
        - svg
        - eps
        - pdf
        - dxf
        - png
        example: svg
        type: string
      maxColors:
        enum:
        - 0
        - 2
        - 4
        - 8
        - 16
        - 32
        example: 16
        type: integer
      model:
        example: easy-image-vectorizer-1
        type: string
      source:
        $ref: '#/definitions/httpapi.ImageVectorizeSource'
    type: object
  httpapi.ImageVectorizeSource:
    properties:
      url:
        example: https://example.com/source.png
        type: string
      vectorizerTaskId:
        example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
    type: object
  httpapi.KelingCompatibleEnvelope:
    properties:
      code:
        example: 0
        type: integer
      data: {}
      message:
        example: SUCCEED
        type: string
      request_id:
        type: string
    type: object
  httpapi.KelingOmniElementInput:
    properties:
      element_id: {}
    type: object
  httpapi.KelingOmniImageInput:
    properties:
      image_url:
        type: string
      type:
        enum:
        - first_frame
        - end_frame
        type: string
    type: object
  httpapi.KelingOmniMultiPrompt:
    properties:
      duration:
        example: "3"
        type: string
      index:
        example: 1
        type: integer
      prompt:
        example: A wide establishing shot
        type: string
    type: object
  httpapi.KelingOmniVideoInput:
    properties:
      keep_original_sound:
        enum:
        - "yes"
        - "no"
        type: string
      refer_type:
        enum:
        - base
        - feature
        type: string
      video_url:
        type: string
    type: object
  httpapi.KelingOmniVideoRequest:
    properties:
      aspect_ratio:
        enum:
        - "16:9"
        - "9:16"
        - "1:1"
        example: "9:16"
        type: string
      callback_url:
        type: string
      duration:
        example: "5"
        type: string
      element_list:
        items:
          $ref: '#/definitions/httpapi.KelingOmniElementInput'
        type: array
      external_task_id:
        type: string
      image_list:
        items:
          $ref: '#/definitions/httpapi.KelingOmniImageInput'
        type: array
      mode:
        enum:
        - std
        - pro
        - 4k
        example: pro
        type: string
      model_name:
        example: kling-v3-omni
        type: string
      multi_prompt:
        items:
          $ref: '#/definitions/httpapi.KelingOmniMultiPrompt'
        type: array
      multi_shot:
        example: false
        type: boolean
      prompt:
        example: A quiet street in the rain with natural ambient sound
        type: string
      shot_type:
        example: customize
        type: string
      sound:
        enum:
        - "on"
        - "off"
        example: "on"
        type: string
      video_list:
        items:
          $ref: '#/definitions/httpapi.KelingOmniVideoInput'
        type: array
      watermark_info:
        $ref: '#/definitions/httpapi.KelingOmniWatermarkInfo'
    type: object
  httpapi.KelingOmniWatermarkInfo:
    properties:
      enabled:
        example: false
        type: boolean
    type: object
  httpapi.KlingErrorEnvelope:
    properties:
      code:
        example: 1001
        type: integer
      error:
        example: invalid_parameter
        type: string
      message:
        example: invalid parameter
        type: string
      request_id:
        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
      legacyAliases:
        items:
          type: string
        type: array
      modelAlias:
        type: string
      modelName:
        type: string
      modelType:
        items:
          type: string
        type: array
      platformId:
        type: string
      platformName:
        type: string
      providerKey:
        type: string
      providerModelName:
        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.OpenAIErrorEnvelope:
    properties:
      error:
        $ref: '#/definitions/httpapi.OpenAIErrorPayload'
    type: object
  httpapi.OpenAIErrorPayload:
    properties:
      code:
        example: invalid_parameter
        type: string
      message:
        example: Invalid parameter
        type: string
      param:
        example: model
        type: string
      type:
        example: invalid_request_error
        type: string
    type: object
  httpapi.OpenAIImageData:
    properties:
      b64_json:
        type: string
      revised_prompt:
        type: string
      url:
        example: https://cdn.example.com/output.png
        type: string
    type: object
  httpapi.OpenAIImagesResponse:
    properties:
      created:
        example: 1710000000
        type: integer
      data:
        items:
          $ref: '#/definitions/httpapi.OpenAIImageData'
        type: array
    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:
      candidateCount:
        example: 2
        type: integer
      currency:
        example: resource
        type: string
      items:
        items:
          additionalProperties: true
          type: object
        type: array
      pricingVersion:
        example: effective-pricing-v2
        type: string
      requestFingerprint:
        example: 76ef6a537de8e71bd1ca93acadc078dbdbfa9f17e45224e4f9df59f535d2886f
        type: string
      reservationAmount:
        example: 2.75
        type: number
      resolver:
        example: effective-pricing-v2
        type: string
      totalAmount:
        example: 1.25
        type: number
    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.ResponsesCompatibleResponse:
    properties:
      created_at:
        example: 1710000000
        type: integer
      id:
        example: resp_0123456789abcdef0123456789abcdef
        type: string
      model:
        example: Doubao Seed 2.0 Pro
        type: string
      object:
        example: response
        type: string
      output:
        items:
          additionalProperties: true
          type: object
        type: array
      output_text:
        example: Hello
        type: string
      previous_response_id:
        example: resp_abcdef0123456789abcdef0123456789
        type: string
      status:
        example: completed
        type: string
      usage:
        additionalProperties: true
        type: object
    type: object
  httpapi.ResponsesRequest:
    properties:
      background:
        type: boolean
      context_management:
        items:
          additionalProperties: true
          type: object
        type: array
      conversation: {}
      include:
        items:
          type: string
        type: array
      input: {}
      instructions:
        example: Answer concisely
        type: string
      max_output_tokens:
        example: 512
        type: integer
      max_tool_calls:
        type: integer
      metadata:
        additionalProperties: true
        type: object
      model:
        example: Doubao Seed 2.0 Pro
        type: string
      moderation: {}
      parallel_tool_calls:
        example: true
        type: boolean
      previous_response_id:
        example: resp_0123456789abcdef0123456789abcdef
        type: string
      prompt: {}
      prompt_cache_key:
        type: string
      prompt_cache_options:
        additionalProperties: true
        type: object
      prompt_cache_retention:
        enum:
        - in_memory
        - 24h
        type: string
      reasoning:
        additionalProperties: true
        type: object
      safety_identifier:
        type: string
      service_tier:
        type: string
      store:
        type: boolean
      stream:
        example: false
        type: boolean
      stream_options:
        additionalProperties: true
        type: object
      temperature:
        example: 0.7
        type: number
      text:
        additionalProperties: true
        type: object
      tool_choice: {}
      tools:
        items:
          additionalProperties: true
          type: object
        type: array
      top_logprobs:
        type: integer
      top_p:
        example: 1
        type: number
      truncation:
        type: string
      user:
        type: string
    type: object
  httpapi.RuntimePolicySetListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.RuntimePolicySet'
        type: array
    type: object
  httpapi.SkillBundleMetadataResponse:
    properties:
      apiDocsJsonPath:
        example: /api/v1/openapi.json
        type: string
      apiDocsYamlPath:
        example: /api/v1/openapi.yaml
        type: string
      displayName:
        example: AI Gateway 运维管理
        type: string
      downloadPath:
        example: /api/v1/public/skills/ai-gateway-ops-management/download
        type: string
      fileName:
        example: ai-gateway-ops-management-v1.0.2.zip
        type: string
      modules:
        example:
        - model-runtime
        items:
          type: string
        type: array
      name:
        example: ai-gateway-ops-management
        type: string
      version:
        example: 1.0.2
        type: string
    type: object
  httpapi.TaskAcceptedResponse:
    properties:
      next:
        $ref: '#/definitions/httpapi.TaskNextLinks'
      query_url:
        example: /api/v1/ai/result/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
      status:
        example: submitted
        type: string
      task:
        $ref: '#/definitions/store.GatewayTask'
      task_id:
        example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
      taskId:
        example: 9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
    type: object
  httpapi.TaskCancelResponse:
    properties:
      cancellable:
        example: false
        type: boolean
      cancelled:
        example: false
        type: boolean
      message:
        example: 任务已提交上游，当前不可取消，请继续查询结果
        type: string
      submitted:
        example: true
        type: boolean
      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
      result:
        example: /api/v1/ai/result/9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25
        type: string
    type: object
  httpapi.TaskParamPreprocessingLogListResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/store.TaskParamPreprocessingLog'
        type: array
    type: object
  httpapi.TaskRequest:
    properties:
      aspect_ratio:
        example: "16:9"
        type: string
      audio:
        example: false
        type: boolean
      audio_url:
        example: https://example.com/source-voice.mp3
        type: string
      audioWeight:
        example: 0.65
        type: number
      customMode:
        example: false
        type: boolean
      display_name:
        example: EasyAI DEV acceptance
        type: string
      documents:
        items:
          type: string
        type: array
      duration:
        example: 5
        type: integer
      emotion:
        example: happy
        type: string
      input: {}
      makeInstrumental:
        example: false
        type: boolean
      max_completion_tokens:
        description: MaxCompletionTokens includes visible output and reasoning tokens.
        example: 512
        type: integer
      max_output_tokens:
        example: 512
        type: integer
      max_tokens:
        example: 512
        type: integer
      messages:
        items:
          $ref: '#/definitions/httpapi.ChatMessage'
        type: array
      model:
        example: gpt-4o-mini
        type: string
      negativeTags:
        example: noise
        type: string
      pitch:
        example: 0
        type: number
      preview_model:
        example: speech-2.8-hd
        type: string
      prompt:
        example: A watercolor robot reading a book
        type: string
      prompt_audio_url:
        example: https://example.com/prompt-voice.mp3
        type: string
      prompt_text:
        example: EasyAI voice clone prompt.
        type: string
      query:
        example: Which document mentions EasyAI Gateway?
        type: string
      reasoning_effort:
        description: ReasoningEffort 推理强度，OpenAI-compatible 请求字段；支持 none、minimal、low、medium、high、xhigh、max。供应商自定义取值由网关按平台适配。
        enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
        - max
        example: medium
        type: string
      resolution:
        example: 720p
        type: string
      runMode:
        example: simulation
        type: string
      size:
        example: 1024x1024
        type: string
      speed:
        example: 1
        type: number
      stream:
        example: false
        type: boolean
      style:
        example: city pop, bright synth
        type: string
      styleWeight:
        example: 0.65
        type: number
      tags:
        example: city pop, synth
        type: string
      text:
        example: Hello from EasyAI audio synthesis.
        type: string
      text_file_id:
        example: ""
        type: string
      title:
        example: Useful Tools
        type: string
      vocalGender:
        example: f
        type: string
      voice_id:
        example: female-shaonv
        type: string
      vol:
        example: 1
        type: number
      watermark:
        example: false
        type: boolean
      weirdnessConstraint:
        example: 0.35
        type: number
    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.VideoUpscaleRequest:
    properties:
      duration:
        example: 3
        type: number
      model:
        example: easy-proteus-standard-4
        type: string
      operation:
        enum:
        - upscale
        example: upscale
        type: string
      output_height:
        example: 1080
        type: integer
      output_width:
        example: 1920
        type: integer
      preserve_audio:
        example: true
        type: boolean
      slow_motion_rate:
        example: 1
        type: number
      source_frame_rate:
        example: 24
        type: number
      source_resolution:
        example: 480p
        type: string
      target_frame_rate:
        example: 24
        type: number
      target_resolution:
        example: 1080p
        type: string
      video_url:
        example: https://example.com/source.mp4
        type: string
    type: object
  httpapi.VolcesContentsGenerationTaskResponse:
    properties:
      content:
        additionalProperties: {}
        type: object
      created_at:
        type: integer
      error:
        additionalProperties: {}
        type: object
      id:
        example: cgt-202607221234
        type: string
      model:
        type: string
      status:
        enum:
        - queued
        - running
        - succeeded
        - failed
        - cancelled
        type: string
      updated_at:
        type: integer
      usage:
        additionalProperties: {}
        type: object
    type: object
  httpapi.VolcesErrorEnvelope:
    properties:
      error:
        $ref: '#/definitions/httpapi.VolcesErrorPayload'
    type: object
  httpapi.VolcesErrorPayload:
    properties:
      code:
        example: invalid_parameter
        type: string
      message:
        example: model is required
        type: string
    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.dailyTokenUsageSummary:
    properties:
      cumulativeTokens:
        type: integer
      currentStreakDays:
        type: integer
      longestStreakDays:
        type: integer
      peakDailyTokens:
        type: integer
    type: object
  httpapi.desktopBillingConfigResponse:
    properties:
      gatewayBaseUrl:
        type: string
      gatewayBillingPath:
        type: string
    type: object
  httpapi.desktopConfigResponse:
    properties:
      billing:
        $ref: '#/definitions/httpapi.desktopBillingConfigResponse'
    type: object
  httpapi.identityConfigurationView:
    properties:
      active:
        $ref: '#/definitions/identity.Revision'
      draft:
        $ref: '#/definitions/identity.Revision'
      pairing:
        $ref: '#/definitions/identity.PairingExchange'
      previous:
        $ref: '#/definitions/identity.Revision'
      runtime:
        $ref: '#/definitions/httpapi.identityRuntimeStatus'
    type: object
  httpapi.identityPolicyPatch:
    properties:
      jitEnabled:
        type: boolean
      legacyJwtEnabled:
        type: boolean
      localTenantKey:
        type: string
      rolePrefix:
        type: string
      sessionAbsoluteSeconds:
        type: integer
      sessionIdleSeconds:
        type: integer
      sessionRefreshSeconds:
        type: integer
    type: object
  httpapi.identityRuntimeStatus:
    properties:
      enabled:
        type: boolean
      jit:
        type: string
      lastAuditId:
        type: string
      lastErrorCategory:
        type: string
      lastTraceId:
        type: string
      login:
        type: string
      revisionId:
        type: string
      sessionRevocation:
        type: string
      tokenIntrospection:
        type: string
    type: object
  httpapi.publicIdentityConfiguration:
    properties:
      contextTypes:
        items:
          type: string
        type: array
      enabled:
        type: boolean
      loginUrl:
        type: string
      logoutUrl:
        type: string
      oidcLogin:
        type: boolean
      status:
        type: string
    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
  httpapi.walletRechargeRequest:
    properties:
      amount:
        example: 100
        type: number
      currency:
        example: resource
        type: string
      idempotencyKey:
        example: wallet-recharge-20260514-001
        type: string
      metadata:
        additionalProperties: {}
        type: object
      reason:
        example: manual recharge
        type: string
    type: object
  identity.PairingCleanupStatus:
    enum:
    - none
    - pending
    - completed
    type: string
    x-enum-varnames:
    - PairingCleanupNone
    - PairingCleanupPending
    - PairingCleanupCompleted
  identity.PairingExchange:
    properties:
      authCenterAuditId:
        type: string
      cancelledAt:
        type: string
      cleanupCompletedAt:
        type: string
      cleanupStatus:
        $ref: '#/definitions/identity.PairingCleanupStatus'
      createdAt:
        type: string
      expiresAt:
        type: string
      id:
        type: string
      lastErrorCategory:
        type: string
      lastTraceId:
        type: string
      remoteExchangeId:
        type: string
      remoteVersion:
        type: integer
      revisionId:
        type: string
      status:
        $ref: '#/definitions/identity.PairingStatus'
      updatedAt:
        type: string
      version:
        type: integer
    type: object
  identity.PairingInput:
    properties:
      authCenterUrl:
        type: string
      legacyJwtEnabled:
        type: boolean
      localTenantKey:
        type: string
      onboardingCode:
        type: string
      publicBaseUrl:
        type: string
      webBaseUrl:
        type: string
    type: object
  identity.PairingStatus:
    enum:
    - metadata_pending
    - preparing
    - ready
    - credentials_saved
    - completed
    - failed
    - expired
    - cancelled
    type: string
    x-enum-varnames:
    - PairingMetadataPending
    - PairingPreparing
    - PairingReady
    - PairingCredentialsSaved
    - PairingCompleted
    - PairingFailed
    - PairingExpired
    - PairingCancelled
  identity.Revision:
    properties:
      activatedAt:
        type: string
      applicationId:
        type: string
      audience:
        type: string
      authCenterUrl:
        type: string
      browserClientId:
        type: string
      capabilities:
        items:
          type: string
        type: array
      createdAt:
        type: string
      id:
        type: string
      issuer:
        type: string
      jitEnabled:
        type: boolean
      lastAuditId:
        type: string
      lastErrorCategory:
        type: string
      lastTraceId:
        type: string
      legacyJwtEnabled:
        type: boolean
      localTenantKey:
        type: string
      machineClientId:
        type: string
      publicBaseUrl:
        type: string
      rolePrefix:
        type: string
      schemaVersion:
        type: integer
      scopes:
        items:
          type: string
        type: array
      securityEventAudience:
        type: string
      securityEventConfigurationUrl:
        type: string
      securityEventIssuer:
        type: string
      sessionAbsoluteSeconds:
        type: integer
      sessionIdleSeconds:
        type: integer
      sessionRefreshSeconds:
        type: integer
      sessionRevocation:
        type: boolean
      state:
        $ref: '#/definitions/identity.RevisionState'
      supersededAt:
        type: string
      tenantContextAudience:
        type: string
      tenantContextEndpoint:
        type: string
      tenantContextScope:
        type: string
      tenantId:
        type: string
      tenantMode:
        type: string
      tokenIntrospection:
        type: boolean
      updatedAt:
        type: string
      validatedAt:
        type: string
      version:
        type: integer
      webBaseUrl:
        type: string
    type: object
  identity.RevisionState:
    enum:
    - draft
    - validated
    - active
    - superseded
    - failed
    type: string
    x-enum-varnames:
    - RevisionDraft
    - RevisionValidated
    - RevisionActive
    - RevisionSuperseded
    - RevisionFailed
  runner.PortraitAssetCapability:
    properties:
      availablePlatformIds:
        items:
          type: string
        type: array
      canCreate:
        type: boolean
      canReferenceTencentAssetUri:
        type: boolean
      canUse:
        type: boolean
      canUseAsPlainMaterial:
        type: boolean
      canUseAsPortraitAsset:
        type: boolean
      creationPlatformIds:
        items:
          type: string
        type: array
      enabled:
        type: boolean
      reason:
        type: string
    type: object
  runner.PortraitAssetIssue:
    properties:
      id:
        type: string
      reason:
        type: string
    type: object
  runner.PortraitAssetSyncResponse:
    properties:
      accepted:
        type: integer
      assets:
        items:
          $ref: '#/definitions/store.PortraitAsset'
        type: array
      failed:
        items:
          $ref: '#/definitions/runner.PortraitAssetIssue'
        type: array
      requested:
        type: integer
      skipped:
        items:
          $ref: '#/definitions/runner.PortraitAssetIssue'
        type: array
      syncedIds:
        items:
          type: string
        type: array
    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.AcceptanceRun:
    properties:
      apiImageDigest:
        type: string
      apiKeyId:
        type: string
      callbackUrl:
        type: string
      capacityProfile:
        type: string
      config:
        additionalProperties: {}
        type: object
      createdAt:
        type: string
      emulatorBaseUrl:
        type: string
      failureReason:
        type: string
      finishedAt:
        type: string
      id:
        type: string
      promotedAt:
        type: string
      releaseSha:
        type: string
      report:
        additionalProperties: {}
        type: object
      startedAt:
        type: string
      status:
        type: string
      updatedAt:
        type: string
      userId:
        type: string
      workerImageDigest:
        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.AdminGatewayTask:
    properties:
      acceptanceRunId:
        type: string
      adminContext:
        $ref: '#/definitions/store.AdminTaskContext'
      apiKeyId:
        type: string
      apiKeyName:
        type: string
      apiKeyPrefix:
        type: string
      asyncMode:
        type: boolean
      attemptCount:
        type: integer
      attempts:
        items:
          $ref: '#/definitions/store.TaskAttempt'
        type: array
      billingCurrency:
        type: string
      billingSettledAt:
        type: string
      billingStatus:
        type: string
      billingSummary:
        additionalProperties: {}
        type: object
      billingUpdatedAt:
        type: string
      billingVersion:
        type: string
      billings:
        items: {}
        type: array
      cancellable:
        type: boolean
      compatibilityProtocol:
        type: string
      compatibilityPublicId:
        type: string
      compatibilitySourceProtocol:
        type: string
      compatibilitySubmitBody:
        additionalProperties: {}
        type: object
      compatibilitySubmitHeaders:
        additionalProperties: {}
        type: object
      compatibilitySubmitHttpStatus:
        type: integer
      conversationId:
        type: string
      createdAt:
        type: string
      error:
        type: string
      errorCode:
        type: string
      errorMessage:
        type: string
      executionLeaseExpiresAt:
        type: string
      externalTaskId:
        type: string
      finalChargeAmount:
        type: number
      finishedAt:
        type: string
      gatewayTenantId:
        type: string
      gatewayUserId:
        type: string
      id:
        type: string
      kind:
        type: string
      message:
        type: string
      metrics:
        additionalProperties: {}
        type: object
      model:
        type: string
      modelType:
        type: string
      newMessageCount:
        type: integer
      pricingSnapshot:
        additionalProperties: {}
        type: object
      remoteTaskId:
        type: string
      request:
        additionalProperties: {}
        type: object
      requestFingerprint:
        type: string
      requestId:
        type: string
      requestedModel:
        type: string
      reservationAmount:
        type: number
      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
      submitted:
        type: boolean
      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.AdminTaskContext:
    properties:
      latestPlatform:
        $ref: '#/definitions/store.AdminTaskPlatformSummary'
      tenant:
        $ref: '#/definitions/store.AdminTaskTenantSummary'
      user:
        $ref: '#/definitions/store.AdminTaskUserSummary'
    type: object
  store.AdminTaskPlatformSummary:
    properties:
      id:
        type: string
      name:
        type: string
      provider:
        type: string
    type: object
  store.AdminTaskTenantSummary:
    properties:
      id:
        type: string
      name:
        type: string
      tenantKey:
        type: string
    type: object
  store.AdminTaskUserSummary:
    properties:
      displayName:
        type: string
      email:
        type: string
      id:
        type: string
      source:
        type: string
      username:
        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
      displayName:
        type: string
      id:
        type: string
      invocationName:
        type: string
      legacyAliases:
        items:
          type: string
        type: array
      metadata:
        additionalProperties: {}
        type: object
      modelAlias:
        description: 'Deprecated: use InvocationName.'
        type: string
      modelType:
        items:
          type: string
        type: array
      pricingRuleSetId:
        type: string
      pricingVersion:
        type: integer
      providerKey:
        type: string
      providerModelName:
        type: string
      referenceCount:
        type: integer
      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
      invocationName:
        type: string
      legacyAliases:
        items:
          type: string
        type: array
      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.BillingSettlement:
    properties:
      action:
        type: string
      amount:
        type: number
      attempts:
        type: integer
      completedAt:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      id:
        type: string
      lastErrorCode:
        type: string
      lastErrorMessage:
        type: string
      lockedAt:
        type: string
      lockedBy:
        type: string
      manualReviewReason:
        type: string
      nextAttemptAt:
        type: string
      payload:
        additionalProperties: {}
        type: object
      pricingSnapshot:
        additionalProperties: {}
        type: object
      status:
        type: string
      taskId:
        type: string
      updatedAt:
        type: string
    type: object
  store.CapacityProfile:
    properties:
      acceptanceRunId:
        type: string
      admittedThroughputPerSecond:
        type: number
      capacityProfile:
        type: string
      configHash:
        type: string
      createdAt:
        type: string
      enabled:
        type: boolean
      kind:
        type: string
      maxPredictedWaitSeconds:
        type: integer
      maxQueued:
        type: integer
      maxRunning:
        type: integer
      metadata:
        additionalProperties: {}
        type: object
      model:
        type: string
      profileKey:
        type: string
      releaseSha:
        type: string
      stableThroughputPerSecond:
        type: number
      updatedAt:
        type: string
    type: object
  store.CapacityProfileInput:
    properties:
      admittedThroughputPerSecond:
        type: number
      kind:
        type: string
      maxPredictedWaitSeconds:
        type: integer
      maxQueued:
        type: integer
      maxRunning:
        type: integer
      metadata:
        additionalProperties: {}
        type: object
      model:
        type: string
      profileKey:
        type: string
      stableThroughputPerSecond:
        type: number
    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.ClientCustomizationSettings:
    properties:
      clientEnglishName:
        type: string
      clientName:
        type: string
      iconPath:
        type: string
      platformName:
        type: string
    type: object
  store.ClientCustomizationSettingsInput:
    properties:
      clientEnglishName:
        type: string
      clientName:
        type: string
      iconPath:
        type: string
      platformName:
        type: string
    type: object
  store.CreateAPIKeyInput:
    properties:
      expiresAt:
        type: string
      name:
        type: string
      scopes:
        items:
          type: string
        type: array
    type: object
  store.CreateAcceptanceRunInput:
    properties:
      apiImageDigest:
        type: string
      apiKeyId:
        type: string
      callbackUrl:
        type: string
      capacityProfile:
        type: string
      config:
        additionalProperties: {}
        type: object
      emulatorBaseUrl:
        type: string
      releaseSha:
        type: string
      token:
        type: string
      userId:
        type: string
      workerImageDigest:
        type: string
    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
      rateLimitPolicyMode:
        enum:
        - inherit
        - override
        type: string
      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.DailyTokenUsage:
    properties:
      cachedInputTokens:
        type: integer
      date:
        type: string
      inputTokens:
        type: integer
      outputTokens:
        type: integer
      resourcePoints:
        type: number
      taskCount:
        type: integer
      totalTokens:
        type: integer
    type: object
  store.FileStorageChannel:
    properties:
      channelKey:
        type: string
      config:
        additionalProperties: {}
        type: object
      createdAt:
        type: string
      credentialsPreview:
        additionalProperties: {}
        type: object
      id:
        type: string
      lastError:
        type: string
      lastFailedAt:
        type: string
      lastSucceededAt:
        type: string
      name:
        type: string
      priority:
        type: integer
      provider:
        type: string
      retryPolicy:
        additionalProperties: {}
        type: object
      scenes:
        items:
          type: string
        type: array
      status:
        type: string
      updatedAt:
        type: string
      uploadUrl:
        type: string
    type: object
  store.FileStorageChannelInput:
    properties:
      apiKey:
        type: string
      channelKey:
        type: string
      config:
        additionalProperties: {}
        type: object
      name:
        type: string
      priority:
        type: integer
      provider:
        type: string
      retryPolicy:
        additionalProperties: {}
        type: object
      scenes:
        items:
          type: string
        type: array
      status:
        type: string
      uploadUrl:
        type: string
    type: object
  store.FileStorageSettings:
    properties:
      resultUploadPolicy:
        type: string
    type: object
  store.FileStorageSettingsInput:
    properties:
      resultUploadPolicy:
        type: string
    type: object
  store.FinishAcceptanceRunInput:
    properties:
      failureReason:
        type: string
      passed:
        type: boolean
      report:
        additionalProperties: {}
        type: object
    type: object
  store.GatewayTask:
    properties:
      acceptanceRunId:
        type: string
      apiKeyId:
        type: string
      apiKeyName:
        type: string
      apiKeyPrefix:
        type: string
      asyncMode:
        type: boolean
      attemptCount:
        type: integer
      attempts:
        items:
          $ref: '#/definitions/store.TaskAttempt'
        type: array
      billingCurrency:
        type: string
      billingSettledAt:
        type: string
      billingStatus:
        type: string
      billingSummary:
        additionalProperties: {}
        type: object
      billingUpdatedAt:
        type: string
      billingVersion:
        type: string
      billings:
        items: {}
        type: array
      cancellable:
        type: boolean
      compatibilityProtocol:
        type: string
      compatibilityPublicId:
        type: string
      compatibilitySourceProtocol:
        type: string
      compatibilitySubmitBody:
        additionalProperties: {}
        type: object
      compatibilitySubmitHeaders:
        additionalProperties: {}
        type: object
      compatibilitySubmitHttpStatus:
        type: integer
      conversationId:
        type: string
      createdAt:
        type: string
      error:
        type: string
      errorCode:
        type: string
      errorMessage:
        type: string
      executionLeaseExpiresAt:
        type: string
      externalTaskId:
        type: string
      finalChargeAmount:
        type: number
      finishedAt:
        type: string
      gatewayTenantId:
        type: string
      gatewayUserId:
        type: string
      id:
        type: string
      kind:
        type: string
      message:
        type: string
      metrics:
        additionalProperties: {}
        type: object
      model:
        type: string
      modelType:
        type: string
      newMessageCount:
        type: integer
      pricingSnapshot:
        additionalProperties: {}
        type: object
      remoteTaskId:
        type: string
      request:
        additionalProperties: {}
        type: object
      requestFingerprint:
        type: string
      requestId:
        type: string
      requestedModel:
        type: string
      reservationAmount:
        type: number
      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
      submitted:
        type: boolean
      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.GatewayTrafficMode:
    properties:
      apiImageDigest:
        type: string
      configHash:
        type: string
      mode:
        type: string
      releaseSha:
        type: string
      revision:
        type: integer
      runId:
        type: string
      updatedAt:
        type: string
      workerImageDigest:
        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
      oldestQueueWaitSeconds:
        type: number
      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
      queueLimit:
        type: integer
      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'
      waitingAsyncTasks:
        type: integer
      waitingSyncTasks:
        type: integer
    type: object
  store.PauseGatewayTrafficInput:
    properties:
      apiImageDigest:
        type: string
      reason:
        type: string
      releaseSha:
        type: string
      revision:
        type: integer
      workerImageDigest:
        type: string
    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
      legacyAliases:
        items:
          type: string
        type: array
      modelAlias:
        description: 'Deprecated: use ModelName. This field mirrors the canonical
          invocation name during the compatibility window.'
        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
      rateLimitPolicyMode:
        enum:
        - inherit
        - override
        type: string
      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.PortraitAsset:
    properties:
      createdAt:
        type: string
      description:
        type: string
      gatewayTenantId:
        type: string
      gatewayUserId:
        type: string
      id:
        type: string
      lastError:
        type: string
      metadata:
        additionalProperties: {}
        type: object
      mimeType:
        type: string
      name:
        type: string
      preview:
        type: string
      privateAvatarEligible:
        type: boolean
      size:
        type: integer
      sourceSha256:
        type: string
      sourceType:
        type: string
      status:
        type: string
      tenantId:
        type: string
      tenantKey:
        type: string
      updatedAt:
        type: string
      url:
        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
      effectiveFrom:
        type: string
      effectiveTo:
        type: string
      formulaConfig:
        additionalProperties: {}
        type: object
      id:
        type: string
      isFree:
        type: boolean
      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
      effectiveFrom:
        type: string
      effectiveTo:
        type: string
      formulaConfig:
        additionalProperties: {}
        type: object
      isFree:
        type: boolean
      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.PromoteAcceptanceRunInput:
    properties:
      apiImageDigest:
        type: string
      capacityProfiles:
        items:
          $ref: '#/definitions/store.CapacityProfileInput'
        type: array
      configHash:
        type: string
      releaseSha:
        type: string
      revision:
        type: integer
      workerImageDigest:
        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:
      cacheAffinityPolicy:
        additionalProperties: {}
        type: object
      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
      singleSourcePolicy:
        additionalProperties: {}
        type: object
      status:
        type: string
      updatedAt:
        type: string
    type: object
  store.RunnerPolicyInput:
    properties:
      cacheAffinityPolicy:
        additionalProperties: {}
        type: object
      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
      singleSourcePolicy:
        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.StageAcceptanceCapacityProfilesInput:
    properties:
      capacityProfiles:
        items:
          $ref: '#/definitions/store.CapacityProfileInput'
        type: array
      configHash:
        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
      pricingSnapshot:
        additionalProperties: {}
        type: object
      provider:
        type: string
      providerModelName:
        type: string
      queueKey:
        type: string
      requestFingerprint:
        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
      upstreamSubmissionStatus:
        type: string
      upstreamSubmissionUpdatedAt:
        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.UpdateAPIKeyScopesInput:
    properties:
      scopes:
        items:
          type: string
        type: array
    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 或 API Key>，管理接口只接受 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'
        "409":
          description: Conflict
          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/billing-settlements:
    get:
      description: 管理端分页查询待结算、重试失败和人工复核记录。
      parameters:
      - description: 结算状态
        in: query
        name: status
        type: string
      - description: 动作：settle 或 release
        in: query
        name: action
        type: string
      - default: 1
        description: 页码
        in: query
        name: page
        type: integer
      - default: 50
        description: 每页数量
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.BillingSettlementListResponse'
        "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/runtime/billing-settlements/{settlementId}/retry:
    post:
      description: Manager 使用单值 Idempotency-Key 将重试失败或人工复核记录重新放入队列，并记录审计日志。
      parameters:
      - description: 结算记录 ID
        in: path
        name: settlementId
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.BillingSettlementRetryResponse'
        "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:
      - billing
  /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/model-rate-limits/{platformModelID}/restore:
    post:
      description: 管理端手动解除平台模型停用、模型冷却、平台冷却或平台禁用状态，使其重新参与路由。
      parameters:
      - description: 平台模型 ID
        in: path
        name: platformModelID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.ModelRateLimitStatus'
        "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/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/system/acceptance/capacity-profiles:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/store.CapacityProfile'
            type: array
      security:
      - BearerAuth: []
      summary: 获取经生产同构验收认证的容量配置
      tags:
      - acceptance
  /api/admin/system/acceptance/runs:
    post:
      consumes:
      - application/json
      parameters:
      - description: 验收 Run
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.CreateAcceptanceRunInput'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/store.AcceptanceRun'
      security:
      - BearerAuth: []
      summary: 创建生产同构验收 Run
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}:
    get:
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.AcceptanceRun'
      security:
      - BearerAuth: []
      summary: 获取生产同构验收 Run
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/abort:
    post:
      consumes:
      - application/json
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      - description: 线上 release 与 digest CAS
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.PromoteAcceptanceRunInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.GatewayTrafficMode'
      security:
      - BearerAuth: []
      summary: 人工 CAS 中止验收并切回 live
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/activate:
    post:
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.GatewayTrafficMode'
      security:
      - BearerAuth: []
      summary: 切换到 validation 并激活 Run
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/capacity-profiles:
    post:
      consumes:
      - application/json
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      - description: 待验证容量配置
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.StageAcceptanceCapacityProfilesInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.AcceptanceRun'
      security:
      - BearerAuth: []
      summary: 为当前 validation Run 暂存 80% 容量门禁
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/finish:
    post:
      consumes:
      - application/json
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      - description: 门禁结果
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.FinishAcceptanceRunInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.AcceptanceRun'
      security:
      - BearerAuth: []
      summary: 记录验收门禁结果
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/promote:
    post:
      consumes:
      - application/json
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      - description: 线上 release 与 digest CAS
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.PromoteAcceptanceRunInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.GatewayTrafficMode'
      security:
      - BearerAuth: []
      summary: 通过 CAS 切回 live
      tags:
      - acceptance
  /api/admin/system/acceptance/runs/{runID}/retry:
    post:
      parameters:
      - description: 验收 Run ID
        in: path
        name: runID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.AcceptanceRun'
      security:
      - BearerAuth: []
      summary: 在 validation 关闭正式流量的状态下重试失败 Run
      tags:
      - acceptance
  /api/admin/system/acceptance/traffic-mode:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.GatewayTrafficMode'
      security:
      - BearerAuth: []
      summary: 获取 Gateway 流量模式
      tags:
      - acceptance
  /api/admin/system/acceptance/traffic-mode/pause:
    post:
      consumes:
      - application/json
      parameters:
      - description: 当前线上 release 与 revision CAS
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.PauseGatewayTrafficInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.GatewayTrafficMode'
      security:
      - BearerAuth: []
      summary: 上线后硬门禁异常时通过 CAS 暂停正式新任务
      tags:
      - acceptance
  /api/admin/system/client-customization/settings:
    get:
      description: 返回客户端名称、英文名称、平台名和图标路径；数据库对象尚未创建时返回默认设置。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.ClientCustomizationSettings'
        "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:
      - system
    patch:
      consumes:
      - application/json
      description: 更新客户端名称、英文名称、平台名和图标路径。
      parameters:
      - description: 客户端自定义设置
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.ClientCustomizationSettingsInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.ClientCustomizationSettings'
        "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:
      - system
  /api/admin/system/file-storage/channels:
    get:
      description: 返回所有未删除的文件存储通道，用于管理上传与生成资源回传策略。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.FileStorageChannelListResponse'
        "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:
      - system
    post:
      consumes:
      - application/json
      description: 创建文件存储通道，当前主要用于配置 server-main OpenAPI 上传通道。
      parameters:
      - description: 文件存储通道
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.FileStorageChannelInput'
      produces:
      - application/json
      responses:
        "201":
          description: Created
          schema:
            $ref: '#/definitions/store.FileStorageChannel'
        "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:
      - system
  /api/admin/system/file-storage/channels/{channelID}:
    delete:
      description: 软删除指定文件存储通道。
      parameters:
      - description: 文件存储通道 ID
        in: path
        name: channelID
        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:
      - system
    patch:
      consumes:
      - application/json
      description: 更新指定文件存储通道的名称、凭证、场景、优先级、状态和重试策略。
      parameters:
      - description: 文件存储通道 ID
        in: path
        name: channelID
        required: true
        type: string
      - description: 文件存储通道
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.FileStorageChannelInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.FileStorageChannel'
        "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:
      - system
  /api/admin/system/file-storage/settings:
    get:
      description: 返回文件存储系统设置；数据库对象尚未创建时返回默认设置。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.FileStorageSettings'
        "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:
      - system
    patch:
      consumes:
      - application/json
      description: 更新生成资源上传策略等文件存储系统设置。
      parameters:
      - description: 文件存储设置
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/store.FileStorageSettingsInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.FileStorageSettings'
        "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:
      - system
  /api/admin/system/identity/configuration:
    get:
      description: 返回 Active、Draft、Previous Revision、配对进度和脱敏运行时健康状态。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.identityConfigurationView'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 获取统一认证配置
      tags:
      - identity
  /api/admin/system/identity/disable:
    post:
      description: 将 Revision 转为只读 Superseded 审计历史，清理 BFF Session，并继续允许本地管理登录；重新接入必须使用新的接入码。
      parameters:
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Active Revision ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.Revision'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "409":
          description: Conflict
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 禁用统一认证
      tags:
      - identity
  /api/admin/system/identity/pairings:
    post:
      consumes:
      - application/json
      description: 使用一次性接入码创建 Draft 和异步 Exchange。接入码仅允许出现在请求 Body。
      parameters:
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 首次配对固定为 W/\
        in: header
        name: If-Match
        required: true
        type: string
      - description: 配对参数
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/identity.PairingInput'
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/identity.PairingExchange'
        "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'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 启动统一认证配对
      tags:
      - identity
  /api/admin/system/identity/pairings/{pairingID}:
    get:
      parameters:
      - description: 配对 ID
        in: path
        name: pairingID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.PairingExchange'
        "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'
      security:
      - BearerAuth: []
      summary: 查询统一认证配对状态
      tags:
      - identity
  /api/admin/system/identity/pairings/{pairingID}/cancel:
    post:
      description: 原子封存未激活 Revision，并异步清理由该 Revision 拥有的临时 Secret 与 SSF 连接。不会撤销已经完成的远端
        Exchange；下一次凭据交付会轮换机器凭据。
      parameters:
      - description: 配对 ID
        in: path
        name: pairingID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Pairing ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/identity.PairingExchange'
        "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'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 放弃本地统一认证配对
      tags:
      - identity
  /api/admin/system/identity/pairings/{pairingID}/retire-conflicting-security-event:
    post:
      description: 仅当指定 Pairing 仍因 owner 冲突停在 credentials_saved 时，退役不属于该 Revision
        的旧连接；陈旧请求不会退役当前 Pairing 已创建的新连接。
      parameters:
      - description: 配对 ID
        in: path
        name: pairingID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Pairing ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/identity.PairingExchange'
        "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'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 安全退役阻塞配对的旧 SSF 连接
      tags:
      - identity
  /api/admin/system/identity/revisions/{revisionID}:
    patch:
      consumes:
      - application/json
      parameters:
      - description: Revision ID
        in: path
        name: revisionID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Revision ETag
        in: header
        name: If-Match
        required: true
        type: string
      - description: Gateway 本地策略
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/httpapi.identityPolicyPatch'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.Revision'
        "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'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 修改统一认证 Draft 策略
      tags:
      - identity
  /api/admin/system/identity/revisions/{revisionID}/activate:
    post:
      description: 在完整候选 Runtime 验证成功且本地 Break-glass Manager 可用后原子热切换。
      parameters:
      - description: Revision ID
        in: path
        name: revisionID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Revision ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.Revision'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "409":
          description: Conflict
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 激活统一认证 Revision
      tags:
      - identity
  /api/admin/system/identity/revisions/{revisionID}/rollback:
    post:
      description: 当前远端 OAuth/SSF 资源未版本化，接口会拒绝直接回滚并要求禁用后使用新接入码完成交接。
      parameters:
      - description: Revision ID
        in: path
        name: revisionID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Revision ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.Revision'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "409":
          description: Conflict
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 请求恢复历史统一认证 Revision
      tags:
      - identity
  /api/admin/system/identity/revisions/{revisionID}/validate:
    post:
      parameters:
      - description: Revision ID
        in: path
        name: revisionID
        required: true
        type: string
      - description: 幂等键
        in: header
        name: Idempotency-Key
        required: true
        type: string
      - description: 当前 Revision ETag
        in: header
        name: If-Match
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/identity.Revision'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "412":
          description: Precondition Failed
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "428":
          description: Precondition Required
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 验证统一认证 Revision
      tags:
      - identity
  /api/admin/tasks:
    get:
      description: 跨租户分页查询任务；请求、结果和执行快照中的常见敏感字段默认脱敏。
      parameters:
      - description: 关键词，匹配任务、用户、租户、模型、平台和 API Key
        in: query
        name: q
        type: string
      - description: 网关租户 ID
        in: query
        name: tenantId
        type: string
      - description: 网关用户 ID
        in: query
        name: userId
        type: string
      - description: 用户组 ID
        in: query
        name: userGroupId
        type: string
      - description: 任务状态
        in: query
        name: status
        type: string
      - description: 执行平台 ID
        in: query
        name: platformId
        type: string
      - description: 调用或实际模型名称
        in: query
        name: model
        type: string
      - description: 模型类型
        in: query
        name: modelType
        type: string
      - description: 运行模式
        in: query
        name: runMode
        type: string
      - description: 计费状态
        in: query
        name: billingStatus
        type: string
      - description: API Key ID、名称或前缀
        in: query
        name: apiKey
        type: string
      - description: 创建时间起点，支持 RFC3339 或日期格式
        in: query
        name: createdFrom
        type: string
      - description: 创建时间终点，支持 RFC3339 或日期格式
        in: query
        name: createdTo
        type: string
      - default: 1
        description: 页码
        in: query
        name: page
        type: integer
      - default: 50
        description: 每页数量
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.AdminTaskListResponse'
        "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:
      - admin-tasks
  /api/admin/tasks/{taskID}:
    get:
      description: 返回任意租户的任务详情；默认脱敏，sensitive=full 时返回完整存储内容。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      - default: masked
        description: 敏感字段模式
        enum:
        - masked
        - full
        in: query
        name: sensitive
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.AdminGatewayTask'
        "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:
      - admin-tasks
  /api/admin/tasks/{taskID}/param-preprocessing:
    get:
      description: 返回任意租户任务的参数改写、校验或模板处理日志；默认脱敏。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      - default: masked
        description: 敏感字段模式
        enum:
        - masked
        - full
        in: query
        name: sensitive
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.TaskParamPreprocessingLogListResponse'
        "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:
      - admin-tasks
  /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/admin/users/{userID}/wallet/recharge:
    post:
      consumes:
      - application/json
      description: 管理端给指定用户钱包追加充值金额，并记录审计日志；amount 必须大于 0。
      parameters:
      - description: 用户 ID
        in: path
        name: userID
        required: true
        type: string
      - description: 钱包充值请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.walletRechargeRequest'
      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'
        "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'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出 Playground API Key
      tags:
      - playground
  /api/v1/ai/result/{taskID}:
    get:
      description: 查询当前用户的图片、视频、音频、视频高清和矢量化任务，并返回 EasyAI GeneratedResponse 兼容结构。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "410":
          description: Gone
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
      security:
      - BearerAuth: []
      summary: 查询 server-main EasyAIClient 兼容任务结果
      tags:
      - tasks
  /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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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/{apiKeyID}/scopes:
    patch:
      consumes:
      - application/json
      description: 更新当前用户拥有的 API Key scopes，至少需要保留一个能力范围。
      parameters:
      - description: API Key ID
        in: path
        name: apiKeyID
        required: true
        type: string
      - description: API Key scope 更新请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/store.UpdateAPIKeyScopesInput'
      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'
        "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'
        "503":
          description: Service Unavailable
          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/api-keys/assignable-models:
    get:
      description: 按当前用户自身的用户、租户和用户组权限返回可分配给 API Key 的启用模型，不受任何 API Key 权限规则影响。
      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'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出 API Key 可分配模型
      tags:
      - api-keys
  /api/v1/auth/login:
    post:
      consumes:
      - application/json
      description: 使用用户名或邮箱登录本地账号，并返回 24 小时 JWT。非本地身份模式只允许本地应急 Manager 登录。
      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'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 本地登录
      tags:
      - auth
  /api/v1/auth/oidc/callback:
    get:
      description: Gateway 使用 client_id、授权码和 PKCE verifier 换取 Token，不发送 Client Secret；Token
        加密存入服务端 Session。
      responses:
        "303":
          description: See Other
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 完成 OIDC 公共客户端登录
      tags:
      - auth
  /api/v1/auth/oidc/login:
    get:
      description: Gateway 生成 state、nonce 和 PKCE S256 参数，并跳转认证中心；浏览器不接触 Token。
      parameters:
      - description: 登录后返回的站内相对路径
        in: query
        name: returnTo
        type: string
      - description: 兼容旧入口的显式登录上下文：platform 或 tenant；省略时由认证中心选择
        in: query
        name: contextType
        type: string
      - description: Tenant 上下文可选的稳定 Tenant UUID
        in: query
        name: tenantHint
        type: string
      responses:
        "303":
          description: See Other
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 开始 OIDC 公共客户端登录
      tags:
      - auth
  /api/v1/auth/oidc/logout:
    post:
      description: 删除 Gateway Session、撤销公共 Client Refresh Token，并跳转认证中心退出地址。
      responses:
        "303":
          description: See Other
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 注销 OIDC 登录会话
      tags:
      - auth
  /api/v1/auth/oidc/session:
    delete:
      responses:
        "204":
          description: No Content
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 删除本地 OIDC 浏览器会话
      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: /api/v1/chat/completions 同步执行：stream=true 返回 text/event-stream
        SSE；stream=false 或未传返回兼容 JSON；该接口忽略 X-Async。
      parameters:
      - description: 该接口忽略此参数
        in: header
        name: X-Async
        type: boolean
      - description: Chat Completions 请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.ChatCompletionRequest'
      produces:
      - application/json
      - text/event-stream
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.ChatCompletionCompatibleResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "402":
          description: Payment Required
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 Chat Completions
      tags:
      - tasks
  /api/v1/contents/generations/tasks:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出火山内容生成任务
      tags:
      - volces-compatible
    post:
      consumes:
      - application/json
      description: 统一公开入口兼容火山方舟内容生成任务。网关 task id 是查询与取消用的公开 id；上游 id 另以 upstream_task_id
        保留。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.VolcesContentsGenerationTaskResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建火山内容生成任务
      tags:
      - volces-compatible
  /api/v1/contents/generations/tasks/{taskID}:
    delete:
      description: 取消网关任务；对于已提交且保存了上游任务标识的 Volces 视频任务，同时调用火山 DELETE 接口并持久化取消状态。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.VolcesContentsGenerationTaskResponse'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 取消火山内容生成任务
      tags:
      - volces-compatible
    get:
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.VolcesContentsGenerationTaskResponse'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
        "410":
          description: Gone
          schema:
            $ref: '#/definitions/httpapi.VolcesErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 查询火山内容生成任务
      tags:
      - volces-compatible
  /api/v1/embeddings:
    post:
      consumes:
      - application/json
      parameters:
      - description: OpenAI Embeddings 请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.CompatibleResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 OpenAI Embeddings
      tags:
      - embeddings
  /api/v1/files/upload:
    post:
      consumes:
      - multipart/form-data
      description: 上传文件到配置的文件存储通道；没有启用通道时回退到本地静态上传目录。单文件最大 256MiB。
      parameters:
      - description: 要上传的文件
        in: formData
        name: file
        required: true
        type: file
      - default: ai-gateway-openapi
        description: 上传来源标识
        in: formData
        name: source
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.FileUploadResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 上传文件
      tags:
      - files
  /api/v1/gemini/upload/{version}/files:
    post:
      consumes:
      - application/octet-stream
      description: 使用统一 /api/v1 前缀启动或直接完成 Gemini Files 上传。
      parameters:
      - description: Gemini 版本（v1 或 v1beta）
        in: path
        name: version
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: Gemini Files 上传接口
      tags:
      - gemini-compatible
  /api/v1/gemini/upload/{version}/files/{uploadID}:
    post:
      consumes:
      - application/octet-stream
      parameters:
      - description: Gemini 版本（v1 或 v1beta）
        in: path
        name: version
        required: true
        type: string
      - description: 上传会话 ID
        in: path
        name: uploadID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 完成 Gemini Files 分段上传
      tags:
      - gemini-compatible
  /api/v1/healthz:
    get:
      description: 返回服务进程、运行环境和身份模式，供负载均衡或人工排障使用。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.HealthResponse'
      summary: 健康检查
      tags:
      - system
  /api/v1/images/edits:
    post:
      consumes:
      - application/json
      description: 默认同步返回 OpenAI-compatible Images 响应；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回
        504 queue_timeout；设置 X-Async=true 时异步创建任务并返回 202。
      parameters:
      - description: OpenAI Images 请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.OpenAIImagesResponse'
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/httpapi.TaskAcceptedResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建或编辑 OpenAI Images
      tags:
      - images
  /api/v1/images/generations:
    post:
      consumes:
      - application/json
      description: 默认同步返回 OpenAI-compatible Images 响应；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回
        504 queue_timeout；设置 X-Async=true 时异步创建任务并返回 202。
      parameters:
      - description: OpenAI Images 请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.OpenAIImagesResponse'
        "202":
          description: Accepted
          schema:
            $ref: '#/definitions/httpapi.TaskAcceptedResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建或编辑 OpenAI Images
      tags:
      - images
  /api/v1/images/vectorize:
    post:
      consumes:
      - application/json
      description: 将 URL 位图转换为 SVG、EPS、PDF、DXF 或 PNG；设置 X-Async=true 时返回统一异步任务结构。可使用同一所有者历史任务的
        vectorizerTaskId 复用上游 image token。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 图片矢量化请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.ImageVectorizeRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 图片矢量化
      tags:
      - images
  /api/v1/kling/v1/videos/omni-video:
    get:
      parameters:
      - default: 1
        description: 页码
        in: query
        name: pageNum
        type: integer
      - default: 30
        description: 每页数量
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 分页查询可灵 V1 Omni 视频任务
      tags:
      - kling-compatible
    post:
      consumes:
      - application/json
      description: 兼容中国区可灵 V1 /v1/videos/omni-video；用户使用网关 API Key，网关在服务端使用 AK/SK
        调用上游。
      parameters:
      - description: 可灵 V1 Omni 请求
        in: body
        name: input
        required: true
        schema:
          additionalProperties: true
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            additionalProperties: true
            type: object
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.KlingErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建可灵 V1 Omni 视频任务
      tags:
      - kling-compatible
  /api/v1/kling/v1/videos/omni-video/{taskID}:
    get:
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties: true
            type: object
        "410":
          description: Gone
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 查询可灵 V1 Omni 视频任务
      tags:
      - kling-compatible
  /api/v1/kling/v2/omni-video/{model}:
    post:
      consumes:
      - application/json
      description: 兼容可灵 API 2.0 的模型路径；调用方使用网关 API Key，网关转换并使用中国区 V1 AK/SK 上游。
      parameters:
      - description: 模型路径（kling-o1 或 kling-v3-omni）
        in: path
        name: model
        required: true
        type: string
      - description: 可灵 API 2.0 请求
        in: body
        name: input
        required: true
        schema:
          additionalProperties: true
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            additionalProperties: true
            type: object
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.KlingErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建可灵 API 2.0 Omni 视频任务
      tags:
      - kling-compatible
  /api/v1/kling/v2/tasks:
    get:
      parameters:
      - description: 逗号分隔的任务 ID
        in: query
        name: task_ids
        type: string
      - description: 逗号分隔的外部任务 ID
        in: query
        name: external_task_ids
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "410":
          description: Gone
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 按 ID 查询可灵 API 2.0 任务
      tags:
      - kling-compatible
    post:
      consumes:
      - application/json
      parameters:
      - description: 游标、数量、时间范围和筛选条件
        in: body
        name: input
        required: true
        schema:
          additionalProperties: true
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 分页查询可灵 API 2.0 任务
      tags:
      - kling-compatible
  /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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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 调用的模型列表。
      parameters:
      - description: 模型可选场景；不传时保持原有行为
        enum:
        - canvas_model_node
        - desktop
        in: query
        name: usage_scene
        type: string
      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'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出可调用模型
      tags:
      - playground
  /api/v1/models/{model}:generateContent:
    post:
      consumes:
      - application/json
      description: 使用统一 /api/v1 前缀接收 Gemini generateContent 请求；旧 /v1 和 /v1beta 路径保留兼容。
      parameters:
      - description: 模型名称
        in: path
        name: model
        required: true
        type: string
      - description: Gemini generateContent 请求
        in: body
        name: input
        required: true
        schema:
          additionalProperties: true
          type: object
      produces:
      - application/json
      - text/event-stream
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
      security:
      - BearerAuth: []
      summary: Gemini generateContent 兼容接口
      tags:
      - gemini-compatible
  /api/v1/models/{model}:streamGenerateContent:
    post:
      consumes:
      - application/json
      description: 使用统一 /api/v1 前缀接收 Gemini generateContent 请求；旧 /v1 和 /v1beta 路径保留兼容。
      parameters:
      - description: 模型名称
        in: path
        name: model
        required: true
        type: string
      - description: Gemini generateContent 请求
        in: body
        name: input
        required: true
        schema:
          additionalProperties: true
          type: object
      produces:
      - application/json
      - text/event-stream
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.GeminiErrorEnvelope'
      security:
      - BearerAuth: []
      summary: Gemini generateContent 兼容接口
      tags:
      - gemini-compatible
  /api/v1/music/generations:
    post:
      consumes:
      - application/json
      description: 默认同步返回 EasyAI GeneratedResponse；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回 504
        queue_timeout；设置 X-Async=true 时返回同时兼容 Gateway 与 server-main EasyAIClient 的异步提交结构。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - description: 媒体任务请求，字段随任务类型变化
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 EasyAI 媒体任务
      tags:
      - media
  /api/v1/openapi.json:
    get:
      description: 返回当前构建内嵌的完整机器可读 Swagger JSON，供 Agent 在 SKILL references 未覆盖接口时查询。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      summary: 获取 AI Gateway Swagger JSON
      tags:
      - agent-resources
  /api/v1/openapi.yaml:
    get:
      description: 返回当前构建内嵌的完整机器可读 Swagger YAML。
      produces:
      - application/yaml
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: 获取 AI Gateway Swagger YAML
      tags:
      - agent-resources
  /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 调用的模型列表。
      parameters:
      - description: 模型可选场景；不传时保持原有行为
        enum:
        - canvas_model_node
        - desktop
        in: query
        name: usage_scene
        type: string
      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'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          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'
        "503":
          description: Service Unavailable
          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/public/client-customization:
    get:
      description: 无需鉴权返回客户端名称、英文名称、平台名和图标路径；数据库对象尚未创建时返回默认设置。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/store.ClientCustomizationSettings'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 获取公开客户端自定义设置
      tags:
      - system
  /api/v1/public/identity:
    get:
      description: 返回 Web 运行时需要的启用状态和非敏感登录、退出入口，不返回 Client、Secret 或内部标识。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.publicIdentityConfiguration'
      summary: 获取公开统一认证状态
      tags:
      - identity
  /api/v1/public/skills/ai-gateway-ops-management/download:
    get:
      description: 下载可交给 Agent 使用的 ai-gateway-ops-management ZIP 包。
      produces:
      - application/zip
      responses:
        "200":
          description: OK
          schema:
            type: file
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 下载 AI Gateway 运维管理 SKILL
      tags:
      - agent-resources
  /api/v1/public/skills/ai-gateway-ops-management/metadata:
    get:
      description: 返回公开运维管理 SKILL 的名称、版本、模块、下载文件名和机器可读接口文档路径。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.SkillBundleMetadataResponse'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      summary: 获取 AI Gateway 运维管理 SKILL 元数据
      tags:
      - agent-resources
  /api/v1/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
  /api/v1/reranks:
    post:
      consumes:
      - application/json
      description: 统一公开入口按 model 选择平台模型并默认同步返回兼容响应；设置 X-Async=true 时异步创建任务并返回 202。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - 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/resource/material:
    post:
      consumes:
      - multipart/form-data
      description: 文件先写入网关文件存储；仅在 private_avatar_eligible=true 时登记到火山 Assets。创建后会立即触发一次状态同步。
      parameters:
      - description: 真人资产源文件（图片、视频或音频）
        in: formData
        name: file
        required: true
        type: file
      - description: material JSON，category 必须是 seedance_portrait_asset
        in: formData
        name: data
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 上传并创建 Seedance 真人资产
      tags:
      - portrait-assets
  /api/v1/resource/material/seedance-portrait-assets/capability:
    get:
      description: 返回当前网关是否已配置可创建、同步和引用的火山 Seedance 真人资产平台。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/runner.PortraitAssetCapability'
      security:
      - BearerAuth: []
      summary: 查询 Seedance 真人资产能力
      tags:
      - portrait-assets
  /api/v1/resource/material/seedance-portrait-assets/sync:
    post:
      consumes:
      - application/json
      description: 调用火山 CreateAsset/GetAsset；多次调用可把 Processing 状态刷新为 Active 或 Failed。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/runner.PortraitAssetSyncResponse'
      security:
      - BearerAuth: []
      summary: 同步 Seedance 真人资产状态
      tags:
      - portrait-assets
  /api/v1/resource/material/user/materials:
    get:
      description: 返回当前用户的真人资产；兼容 server-main material 列表响应字段。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      security:
      - BearerAuth: []
      summary: 列出 Seedance 真人资产
      tags:
      - portrait-assets
  /api/v1/responses:
    post:
      consumes:
      - application/json
      description: 公开 OpenAI-compatible Responses 入口。模型声明 openai_responses 时原生转发，否则使用
        Chat Completions 转换；store 缺省为 true。previous_response_id 严格绑定首次成功的平台模型和上游协议，链路不可用时不跨平台续接。未提供
        previous_response_id 时由调用方管理完整状态，Gateway 以本轮 input/messages 为准且不追加本地历史。
      parameters:
      - description: Responses 请求；Chat 回退只支持自定义 function tools
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.ResponsesRequest'
      produces:
      - application/json
      - text/event-stream
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.ResponsesCompatibleResponse'
        "400":
          description: invalid_previous_response_id / unsupported_response_tool /
            unsupported_response_parameter
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "402":
          description: Payment Required
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
        "503":
          description: response_chain_unavailable
          schema:
            $ref: '#/definitions/httpapi.OpenAIErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 OpenAI Responses
      tags:
      - responses
  /api/v1/security-events/ssf:
    post:
      consumes:
      - application/secevent+jwt
      description: Optional endpoint. It validates a stream-specific Bearer before
        parsing and verifying an ES256 SET. A committed event and a duplicate jti
        both return an empty 202 response.
      parameters:
      - description: Bearer stream-specific-secret
        in: header
        name: Authorization
        required: true
        type: string
      - description: Compact signed Security Event Token
        in: body
        name: set
        required: true
        schema:
          type: string
      produces:
      - application/json
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "503":
          description: Service Unavailable
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Receive an SSF Security Event Token
      tags:
      - Security Events
  /api/v1/song/generations:
    post:
      consumes:
      - application/json
      description: 默认同步返回 EasyAI GeneratedResponse；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回 504
        queue_timeout；设置 X-Async=true 时返回同时兼容 Gateway 与 server-main EasyAIClient 的异步提交结构。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - description: 媒体任务请求，字段随任务类型变化
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 EasyAI 媒体任务
      tags:
      - media
  /api/v1/speech/generations:
    post:
      consumes:
      - application/json
      description: 默认同步返回 EasyAI GeneratedResponse；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回 504
        queue_timeout；设置 X-Async=true 时返回同时兼容 Gateway 与 server-main EasyAIClient 的异步提交结构。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - description: 媒体任务请求，字段随任务类型变化
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 EasyAI 媒体任务
      tags:
      - media
  /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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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'
        "410":
          description: Gone
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 获取任务详情
      tags:
      - tasks
  /api/v1/tasks/{taskID}/cancel:
    post:
      description: 仅取消仍在网关本地排队且尚未提交上游的任务；任务已运行、已提交上游或已结束时返回不可取消，客户端应继续查询结果。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.TaskCancelResponse'
        "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:
      - 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/video/generations:
    post:
      consumes:
      - application/json
      description: 兼容 server-main 的 /api/v1/video/generations，返回 submitted 和 task_id；额外保留火山任务字段。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.TaskAcceptedResponse'
      security:
      - BearerAuth: []
      summary: 创建 server-main 兼容视频任务
      tags:
      - media
  /api/v1/videos/generations:
    post:
      consumes:
      - application/json
      description: 默认同步返回 EasyAI GeneratedResponse；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回 504
        queue_timeout；设置 X-Async=true 时返回同时兼容 Gateway 与 server-main EasyAIClient 的异步提交结构。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - description: 媒体任务请求，字段随任务类型变化
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 EasyAI 媒体任务
      tags:
      - media
  /api/v1/videos/omni-video:
    post:
      consumes:
      - application/json
      description: 兼容 Kling 旧版 /v1/videos/omni-video；Bearer token 必须为 Gateway API
        Key。任务固定异步执行，返回的 task_id 为网关任务 ID。
      parameters:
      - description: Kling Omni 官方兼容请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.KelingOmniVideoRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "429":
          description: Too Many Requests
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 Kling Omni 视频任务
      tags:
      - kling-compatible
  /api/v1/videos/omni-video/{taskID}:
    get:
      description: 按创建接口返回的网关 task_id 查询任务；仅允许创建任务的 Gateway 用户访问。
      parameters:
      - description: 网关任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "410":
          description: Gone
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.KelingCompatibleEnvelope'
      security:
      - BearerAuth: []
      summary: 查询 Kling Omni 视频任务
      tags:
      - kling-compatible
  /api/v1/videos/upscales:
    post:
      consumes:
      - application/json
      description: 原生执行 Topaz 视频增强流程；设置 X-Async=true 时返回统一异步任务结构，结果在任务完成前持久化到 Gateway
        文件存储。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 视频超分请求
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.VideoUpscaleRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 视频超分
      tags:
      - videos
  /api/v1/voice_clone:
    post:
      consumes:
      - application/json
      description: 默认同步返回 EasyAI GeneratedResponse；非文本模型并发饱和且配置队列时等待准入，超过最长等待返回 504
        queue_timeout；设置 X-Async=true 时返回同时兼容 Gateway 与 server-main EasyAIClient 的异步提交结构。
      parameters:
      - description: true 时异步创建任务并返回 202
        in: header
        name: X-Async
        type: boolean
      - description: 可选请求幂等键；同一用户范围内唯一
        in: header
        name: Idempotency-Key
        type: string
      - description: 媒体任务请求，字段随任务类型变化
        in: body
        name: input
        required: true
        schema:
          $ref: '#/definitions/httpapi.TaskRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.EasyAIGeneratedResponse'
        "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'
        "504":
          description: Gateway Timeout
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 创建 EasyAI 媒体任务
      tags:
      - media
  /api/v1/voice_clone/voices:
    get:
      description: 返回当前用户在网关中维护的克隆音色，以及克隆时绑定的平台与平台模型。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出当前用户克隆音色
      tags:
      - voice-clone
  /api/v1/voice_clone/voices/{voiceID}:
    delete:
      description: 先从上游供应商删除音色，成功后再将网关数据库中的音色记录标记为 deleted。
      parameters:
      - description: 克隆音色记录 ID 或上游 voice_id
        in: path
        name: voiceID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
        "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'
        "502":
          description: Bad Gateway
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 删除当前用户克隆音色
      tags:
      - voice-clone
  /api/workspace/desktop-config:
    get:
      description: 返回桌面端需要的 Gateway Web 账单入口配置。
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.desktopConfigResponse'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 获取桌面端配置
      tags:
      - workspace
  /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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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'
        "410":
          description: Gone
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 获取任务详情
      tags:
      - tasks
  /api/workspace/tasks/{taskID}/cancel:
    post:
      description: 仅取消仍在网关本地排队且尚未提交上游的任务；任务已运行、已提交上游或已结束时返回不可取消，客户端应继续查询结果。
      parameters:
      - description: 任务 ID
        in: path
        name: taskID
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.TaskCancelResponse'
        "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:
      - 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/token-usage/daily:
    get:
      description: 按 IANA 时区返回连续自然日用量；API Key 仅统计当前 Key，JWT 统计当前用户。
      parameters:
      - description: 开始日期 YYYY-MM-DD
        in: query
        name: from
        required: true
        type: string
      - description: 结束日期 YYYY-MM-DD
        in: query
        name: to
        required: true
        type: string
      - default: UTC
        description: IANA 时区
        in: query
        name: timezone
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/httpapi.DailyTokenUsageResponse'
        "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: 查询每日 Token 与资源点用量
      tags:
      - workspace
  /api/workspace/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'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 获取当前用户组策略
      tags:
      - workspace
  /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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          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'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
        "503":
          description: Service Unavailable
          schema:
            $ref: '#/definitions/httpapi.ErrorEnvelope'
      security:
      - BearerAuth: []
      summary: 列出钱包交易
      tags:
      - wallet
  /static/generated/{asset}:
    get:
      description: 从本地生成资源目录读取图片、视频等任务产物；不存在时返回 404。
      parameters:
      - description: 资源文件名
        in: path
        name: asset
        required: true
        type: string
      produces:
      - application/octet-stream
      responses:
        "200":
          description: OK
          schema:
            type: file
        "404":
          description: Not Found
          schema:
            type: string
      summary: 获取本地生成资源
      tags:
      - static
  /static/simulation/{asset}:
    get:
      description: 返回本地模拟模式使用的图片、视频封面、短视频或音频资源。
      parameters:
      - description: 资源文件名，可选 image.svg、image.png、image-edit.svg、image-edit.png、video-poster.svg、video.mp4、audio.wav
        in: path
        name: asset
        required: true
        type: string
      produces:
      - image/svg+xml
      - video/mp4
      - audio/wav
      responses:
        "200":
          description: OK
          schema:
            type: file
        "404":
          description: Not Found
          schema:
            type: string
      summary: 获取模拟资源
      tags:
      - simulation
  /static/uploaded/{asset}:
    get:
      description: 从本地上传资源目录读取用户上传文件；不存在时返回 404。
      parameters:
      - description: 资源文件名
        in: path
        name: asset
        required: true
        type: string
      produces:
      - application/octet-stream
      responses:
        "200":
          description: OK
          schema:
            type: file
        "404":
          description: Not Found
          schema:
            type: string
      summary: 获取本地上传资源
      tags:
      - static
schemes:
- http
- https
securityDefinitions:
  BearerAuth:
    description: Bearer JWT 或 API Key。
    in: header
    name: Authorization
    type: apiKey
swagger: "2.0"
