> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mountsea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 端点市场

提交任务前，可以通过端点市场发现当前可用的模型和能力。

使用 `capability` 过滤某一类端点：

```bash theme={null}
GET /ms/v1/endpoints?capability=video
```

端点市场是可用 endpoint slug、输入结构、输出结构、标签和示例的权威来源。


## OpenAPI

````yaml mountsea-api.mint.json GET /ms/v1/endpoints
openapi: 3.0.0
info:
  title: mountsea-api
  description: >-
    mountsea unified AI API — video, image, and audio generation.


    ### Async task flow

    1. `POST /ms/v1/run/{endpoint_slug}` — submit a job (returns Task with
    `status: queued`).

    2. `GET /ms/v1/tasks/{task_id}` — poll until `succeeded` (`output.images` /
    `output.videos` / `output.audio`) or `failed`/`timeout` (`error`).
       Or pass `webhook_url` in the submit body for a signed terminal callback (`x-ms-signature`).
    3. `GET /ms/v1/endpoints[/{slug}]` — marketplace listing with
    `input_schema`, `output_schema`, and `examples`.


    ### Request body

    - `{ "input": { ... } }` — all parameters and media URLs per endpoint
    `input_schema`.

    - Optional `webhook_url` for callbacks.


    ### SDK compatibility (optional)

    Prefer the native async API above? Skip this section.


    - **OpenAI SDK** — `baseURL = https://{gateway}/ms/v1`
      - Image (sync): `POST /ms/v1/images/generations|edits` — gpt-image-2 family
      - Video (async): `POST /ms/v1/videos` + `GET /ms/v1/videos/{id}` — sora-2 → Veo lite/pro slugs
    - **Gemini SDK** — `httpOptions.baseUrl = https://{gateway}/ms`
      - Image (sync): `POST /ms/v1beta/models/{model}:generateContent` — nano-banana family
      - Video (async): `POST /ms/v1beta/models/{model}:predictLongRunning` + poll `GET /ms/v1beta/operations/{task_id}`

    Unsupported `model` → **HTTP 400** before any task is created (no charge).

    Successful calls bill the **same endpoint slug** as the equivalent
    `/ms/v1/run/...` API.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: Run
    description: Submit async tasks by endpoint slug
  - name: Tasks
    description: Poll or cancel tasks
  - name: Endpoints (marketplace)
    description: Endpoint catalog and schemas
  - name: SDK Compatibility
    description: >-
      OpenAI / Gemini official SDK — sync image APIs (same billing as native
      run)
  - name: Admin - Catalog (internal)
    description: Internal admin (swagger only, not public gateway)
paths:
  /ms/v1/endpoints:
    get:
      tags:
        - Endpoints (marketplace)
      summary: List endpoints (marketplace)
      description: >-
        Returns endpoint cards (slug, capability, display_name, description,
        tags). Use GET /ms/v1/endpoints/{slug} for full input_schema and
        examples.
      operationId: EndpointsController_list
      parameters:
        - name: capability
          required: false
          in: query
          schema:
            enum:
              - image
              - video
              - audio
              - chat
              - transcribe
              - embeddings
            type: string
        - name: tag
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/EndpointListResponse'
      security:
        - bearerAuth: []
components:
  responses:
    EndpointListResponse:
      description: Endpoint marketplace cards
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/EndpointCard'
  schemas:
    EndpointCard:
      type: object
      properties:
        slug:
          type: string
        product_model:
          type: string
        capability:
          type: string
          enum:
            - image
            - video
            - audio
        mode:
          type: string
        variant:
          type: string
          nullable: true
        display_name:
          type: string
        cover_image:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        status:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````