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

# List models

> Look up model ids, prices, chat token limits and current machine counts. The catalogue is public.

Use `GET /v1/models` for the catalogue, `GET /v1/models/{id}` for one entry, and `HEAD /v1/models` for headers only. All three are public. An unknown id gets `404 model_not_found` with `param: "model"`.

The list is an object with `object: "list"` and a `data` array. A single lookup returns the model object directly. This example shows `GET /v1/models/qwen3-4b` while two machines offer it.

```json theme={null}
{
  "id": "qwen3-4b",
  "object": "model",
  "owned_by": "sharemyai",
  "kind": "chat",
  "created": 1764547200,
  "pricing": { "base_credits": 4, "unit": "1000 requested output tokens" },
  "max_tokens": { "default": 2048, "limit": 4096 },
  "available": true,
  "machines": 2
}
```

`created` is a Unix timestamp in seconds. `pricing.base_credits` is the model's base price for one `pricing.unit`. Only chat models have `max_tokens.default` and `max_tokens.limit`.

`machines` counts online machines offering the model, including busy ones. `available` is true when that count is positive. If the count is still zero when you submit a job, a synchronous call returns `503 no_provider`. For an [async image job](https://docs.sharemy.ai/api-reference/jobs.md), check `error.code` on the failed job.

Use `kind` to choose an endpoint.

| `kind` | Endpoint |
| - | - |
| `chat` | `POST /v1/chat/completions` |
| `image` | `POST /v1/images/generations` |
| `image-edit` | `POST /v1/images/edits` |
| `speech` | `POST /v1/audio/speech` |
| `transcription` | `POST /v1/audio/transcriptions` and `POST /v1/audio/translations` |

For what each model does, see [Models](https://docs.sharemy.ai/models.md).


## OpenAPI

````yaml api-reference/openapi.json GET /v1/models
openapi: 3.1.0
info:
  title: ShareMyAI API
  version: 1.0.0
  description: >-
    OpenAI-shaped endpoints that run jobs on shared GPUs. Closing the connection
    cancels an unfinished synchronous job and returns its held credits. CORS
    allows any origin, echoes requested preflight headers and exposes Location,
    the request id, concurrency, retry, cost, balance, token cap and sample rate
    headers.
servers:
  - url: https://sharemy.ai
    description: ShareMyAI
security:
  - bearerAuth: []
tags:
  - name: Models
  - name: Chat
  - name: Images
  - name: Jobs
  - name: Audio
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: List models
      description: >-
        List catalogue ids with current supply, base prices and chat token
        budgets. Public.
      operationId: listModels
      responses:
        '200':
          description: The model list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
              example:
                object: list
                data:
                  - id: qwen3-4b
                    object: model
                    owned_by: sharemyai
                    kind: chat
                    created: 1764547200
                    pricing:
                      base_credits: 4
                      unit: 1000 requested output tokens
                    available: true
                    machines: 2
                    max_tokens:
                      default: 2048
                      limit: 4096
          headers:
            x-request-id:
              $ref: '#/components/headers/x-request-id'
            x-ratelimit-limit-concurrent:
              $ref: '#/components/headers/x-ratelimit-limit-concurrent'
            x-ratelimit-remaining-concurrent:
              $ref: '#/components/headers/x-ratelimit-remaining-concurrent'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
      security: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: curl https://sharemy.ai/v1/models
        - lang: python
          label: Python
          source: >-
            import os

            from openai import OpenAI


            client = OpenAI(api_key=os.environ["SHAREMYAI_API_KEY"],
            base_url="https://sharemy.ai/v1")


            for model in client.models.list():
                print(model.id)
        - lang: javascript
          label: Node
          source: >-
            import OpenAI from "openai";


            const client = new OpenAI({ apiKey: process.env.SHAREMYAI_API_KEY,
            baseURL: "https://sharemy.ai/v1" });


            for await (const model of client.models.list()) {
              console.log(model.id);
            }
components:
  schemas:
    ModelList:
      type: object
      required:
        - object
        - data
      properties:
        object:
          type: string
          const: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
    Model:
      type: object
      required:
        - id
        - object
        - owned_by
        - kind
        - created
        - pricing
        - available
        - machines
      properties:
        id:
          type: string
          description: The id to send as `model`.
          examples:
            - qwen3-4b
        object:
          type: string
          const: model
        owned_by:
          type: string
          const: sharemyai
        kind:
          type: string
          enum:
            - chat
            - image
            - image-edit
            - speech
            - transcription
          description: >-
            Which endpoint takes it. Not part of OpenAI's API. `transcription`
            models serve both transcriptions and translations.
        created:
          type: integer
          description: Unix timestamp in seconds.
        pricing:
          type: object
          required:
            - base_credits
            - unit
          properties:
            base_credits:
              type: number
              description: Price in credits at the reference size.
            unit:
              type: string
              enum:
                - 1000 requested output tokens
                - 512x512 image
                - 4 megapixels (3 credit minimum)
                - 500 characters
                - minute of audio
        available:
          type: boolean
          description: True if at least one online machine offers this model.
        machines:
          type: integer
          description: >-
            Number of online machines offering the model, including busy
            machines.
          minimum: 0
        max_tokens:
          type: object
          required:
            - default
            - limit
          properties:
            default:
              type: integer
              description: Output budget when omitted.
            limit:
              type: integer
              description: Largest effective output budget.
          description: Output token budgets for chat models only.
      if:
        properties:
          kind:
            const: chat
      then:
        required:
          - max_tokens
    Error:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
          description: What went wrong, for a person to read.
        type:
          type: string
          description: >-
            402 uses insufficient_quota, other 4xx errors use
            invalid_request_error, and 5xx errors use api_error.
          enum:
            - invalid_request_error
            - insufficient_quota
            - api_error
        param:
          type:
            - string
            - 'null'
          description: The request field at fault, when there is one.
        code:
          type:
            - string
            - 'null'
          description: A stable code. The Errors and limits page lists them all.
          examples:
            - model_not_found
        price_credits:
          type: number
          description: Job price in credits on an insufficient_quota error.
        balance_credits:
          type: number
          description: Account balance in credits on an insufficient_quota error.
      if:
        properties:
          code:
            const: insufficient_quota
      then:
        required:
          - price_credits
          - balance_credits
  headers:
    x-request-id:
      description: Identifier for this API response.
      schema:
        type: string
    x-ratelimit-limit-concurrent:
      description: Job slots per account across all tokens.
      schema:
        type: integer
        const: 4
    x-ratelimit-remaining-concurrent:
      description: Free account slots when headers are sent.
      schema:
        type: integer
        minimum: 0
        maximum: 4
    Allow:
      description: Methods available for the requested path, including OPTIONS.
      schema:
        type: string
  responses:
    MethodNotAllowed:
      description: The path exists. Use a method listed in Allow (method_not_allowed).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-ratelimit-limit-concurrent:
          $ref: '#/components/headers/x-ratelimit-limit-concurrent'
        x-ratelimit-remaining-concurrent:
          $ref: '#/components/headers/x-ratelimit-remaining-concurrent'
        Allow:
          $ref: '#/components/headers/Allow'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API token from the account panel on sharemy.ai. Tokens start with
        `smai_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.