UnoRouter Token API

The Token API from UnoRouter, for token.

GitHub OpenAPI

Operations 12

GET /api/token/ Get All Tokens #
POST /api/token/ Add Token #
PUT /api/token/ Update Token #
GET /api/token/auto-groups Get Token Auto Groups #
POST /api/token/batch Delete Token Batch #
POST /api/token/batch/keys Get Token Keys Batch #
PUT /api/token/group-rename Rename Token Group #
PUT /api/token/guest-model-limits Update Guest Token Model Limits #
GET /api/token/search Search Tokens #
DELETE /api/token/{id} Delete Token #
GET /api/token/{id} Get Token #
POST /api/token/{id}/key Get Token Key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/unorouter-com:unorouter-com-token-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

unorouter-com-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: ' '
  title: New Token API
  version: 0.0.1
tags:
- name: Token
paths:
  /api/token/:
    get:
      operationId: getAllTokens
      parameters:
      - description: Page number (1-based)
        in: query
        name: p
        schema:
          type: integer
      - description: Items per page
        in: query
        name: page_size
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.PageData-controller.TokenResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.PageData-controller.TokenResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Get All Tokens
      tags:
      - Token
    post:
      operationId: addToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
        description: Request body for dto.CreateTokenRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Add Token
      tags:
      - Token
    put:
      operationId: updateToken
      parameters:
      - description: Only update status
        in: query
        name: status_only
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTokenRequest'
        description: Request body for dto.UpdateTokenRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_controller.TokenResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_controller.TokenResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Update Token
      tags:
      - Token
  /api/token/auto-groups:
    get:
      operationId: getTokenAutoGroups
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.TokenAutoGroupsData'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.TokenAutoGroupsData'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Get Token Auto Groups
      tags:
      - Token
  /api/token/batch:
    post:
      operationId: deleteTokenBatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenBatch'
        description: Request body for dto.TokenBatch
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_int'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_int'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Delete Token Batch
      tags:
      - Token
  /api/token/batch/keys:
    post:
      operationId: getTokenKeysBatch
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Get Token Keys Batch
      tags:
      - Token
  /api/token/group-rename:
    put:
      operationId: renameTokenGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenGroupRenameRequest'
        description: Request body for dto.TokenGroupRenameRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.TokenGroupRenameResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.TokenGroupRenameResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Rename Token Group
      tags:
      - Token
  /api/token/guest-model-limits:
    put:
      operationId: updateGuestTokenModelLimits
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestTokenLimitsRequest'
        description: Request body for dto.GuestTokenLimitsRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.MessageResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.MessageResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Update Guest Token Model Limits
      tags:
      - Token
  /api/token/search:
    get:
      operationId: searchTokens
      parameters:
      - description: Page number (1-based)
        in: query
        name: p
        schema:
          type: integer
      - description: Items per page
        in: query
        name: page_size
        schema:
          type: integer
      - description: Search keyword
        in: query
        name: keyword
        schema:
          type: string
      - description: Filter by token
        in: query
        name: token
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.PageData-controller.TokenResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.PageData-controller.TokenResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Search Tokens
      tags:
      - Token
  /api/token/{id}:
    delete:
      operationId: deleteToken
      parameters:
      - description: Token ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Delete Token
      tags:
      - Token
    get:
      operationId: getToken
      parameters:
      - description: Token ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_controller.TokenResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_controller.TokenResponse'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Get Token
      tags:
      - Token
  /api/token/{id}/key:
    post:
      operationId: getTokenKey
      parameters:
      - description: Token ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_map-string-string'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_map-string-string'
          description: OK
      security:
      - accessToken: []
        newApiUser: []
      - newApiUser: []
        sessionAuth: []
      summary: Get Token Key
      tags:
      - Token
components:
  schemas:
    GuestTokenLimitsRequest:
      description: GuestTokenLimitsRequest schema
      properties:
        key:
          description: Full guest token key, with or without the sk- prefix
          type: string
        model_limits:
          description: Comma-separated model names the guest token may call
          type: string
      required:
      - key
      - model_limits
      type: object
    TokenBatch:
      description: TokenBatch schema
      properties:
        ids:
          items:
            type: integer
          type:
          - array
          - 'null'
      required:
      - ids
      type: object
    ApiResponse:
      properties:
        data: {}
        message:
          type: string
        object:
          type: string
        success:
          type: boolean
      required:
      - message
      - success
      type: object
    UpdateTokenRequest:
      description: UpdateTokenRequest schema
      properties:
        allow_ips:
          nullable: true
          type: string
        allow_user_quota_query:
          nullable: true
          type: boolean
        auto_groups:
          items:
            type: string
          nullable: true
          type: array
        cross_group_retry:
          nullable: true
          type: boolean
        default_reasoning_effort:
          nullable: true
          type: string
        expired_time:
          format: int64
          type: integer
        group:
          type: string
        group_mapping:
          nullable: true
          type: string
        id:
          type: integer
        model_limits:
          type: string
        model_limits_enabled:
          type: boolean
        name:
          type: string
        prompt_cache:
          nullable: true
          type: string
        remain_quota:
          type: integer
        status:
          type: integer
        unlimited_quota:
          type: boolean
      required:
      - allow_ips
      - allow_user_quota_query
      - auto_groups
      - cross_group_retry
      - default_reasoning_effort
      - expired_time
      - group
      - group_mapping
      - id
      - model_limits
      - model_limits_enabled
      - name
      - prompt_cache
      - remain_quota
      - status
      - unlimited_quota
      type: object
    CreateTokenRequest:
      description: CreateTokenRequest schema
      properties:
        allow_ips:
          nullable: true
          type: string
        allow_user_quota_query:
          nullable: true
          type: boolean
        auto_groups:
          items:
            type: string
          nullable: true
          type: array
        cross_group_retry:
          nullable: true
          type: boolean
        default_reasoning_effort:
          nullable: true
          type: string
        expired_time:
          format: int64
          type: integer
        group:
          type: string
        group_mapping:
          nullable: true
          type: string
        model_limits:
          type: string
        model_limits_enabled:
          type: boolean
        name:
          type: string
        prompt_cache:
          nullable: true
          type: string
        remain_quota:
          type: integer
        unlimited_quota:
          type: boolean
      required:
      - allow_ips
      - allow_user_quota_query
      - auto_groups
      - cross_group_retry
      - default_reasoning_effort
      - expired_time
      - group
      - group_mapping
      - model_limits
      - model_limits_enabled
      - name
      - prompt_cache
      - remain_quota
      - unlimited_quota
      type: object
    Response_dto.MessageResponse:
      description: Response_dto.MessageResponse schema
      properties:
        data:
          $ref: '#/components/schemas/MessageResponse'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_controller.TokenResponse:
      description: Response_controller.TokenResponse schema
      properties:
        data:
          $ref: '#/components/schemas/TokenResponse'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_map-string-string:
      description: Response_map-string-string schema
      properties:
        data:
          additionalProperties:
            type: string
          type:
          - object
          - 'null'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    MessageResponse:
      properties:
        message:
          type: string
        success:
          type: boolean
      required:
      - message
      - success
      type: object
    Response_dto.PageData-controller.TokenResponse:
      description: Response_dto.PageData-controller.TokenResponse schema
      properties:
        data:
          properties:
            items:
              items:
                $ref: '#/components/schemas/TokenResponse'
              type:
              - array
              - 'null'
            page:
              type: integer
            page_size:
              type: integer
            total:
              type: integer
          required:
          - items
          - page
          - page_size
          - total
          type: object
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_int:
      description: Response_int schema
      properties:
        data:
          type: integer
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_dto.TokenGroupRenameResponse:
      description: Response_dto.TokenGroupRenameResponse schema
      properties:
        data:
          $ref: '#/components/schemas/TokenGroupRenameResponse'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    TokenGroupRenameRequest:
      description: TokenGroupRenameRequest schema
      properties:
        from:
          description: Group name the tokens reference today
          type: string
        to:
          description: Group name to reference instead
          type: string
      required:
      - from
      - to
      type: object
    TokenResponse:
      properties:
        accessed_time:
          format: int64
          type: integer
        allow_ips:
          nullable: true
          type: string
        allow_user_quota_query:
          type: boolean
        auto_groups:
          items:
            type: string
          type:
          - array
          - 'null'
        created_time:
          format: int64
          type: integer
        cross_group_retry:
          type: boolean
        default_reasoning_effort:
          type: string
        expired_time:
          format: int64
          type: integer
        group:
          type: string
        group_mapping:
          type: string
        id:
          type: integer
        key:
          type: string
        model_limits:
          type: string
        model_limits_enabled:
          type: boolean
        name:
          type: string
        prompt_cache:
          type: string
        remain_quota:
          type: integer
        status:
          type: integer
        unlimited_quota:
          type: boolean
        used_quota:
          type: integer
        user_id:
          type: integer
      required:
      - DeletedAt
      - accessed_time
      - allow_ips
      - allow_user_quota_query
      - auto_groups
      - created_time
      - cross_group_retry
      - default_reasoning_effort
      - expired_time
      - group
      - group_mapping
      - id
      - key
      - model_limits
      - model_limits_enabled
      - name
      - prompt_cache
      - remain_quota
      - status
      - unlimited_quota
      - used_quota
      - user_id
      type: object
    TokenGroupRenameResponse:
      properties:
        changed:
          type: integer
      required:
      - changed
      type: object
    TokenAutoGroupsData:
      properties:
        groups:
          items:
            type: string
          type:
          - array
          - 'null'
        max_count:
          type: integer
      required:
      - groups
      - max_count
      type: object
    Response_dto.TokenAutoGroupsData:
      description: Response_dto.TokenAutoGroupsData schema
      properties:
        data:
          $ref: '#/components/schemas/TokenAutoGroupsData'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
  securitySchemes:
    accessToken:
      description: System access token for dashboard API routes. Must be paired with New-Api-User header.
      in: header
      name: Authorization
      type: apiKey
    anthropicApiKey:
      description: Anthropic-style API key. Used by /v1/messages and /v1/models.
      in: header
      name: x-api-key
      type: apiKey
    bearerAuth:
      description: API token (sk-...). Used by relay routes (/v1/*) and token-based query endpoints.
      scheme: bearer
      type: http
    newApiUser:
      description: User ID header. Required together with the access token or session cookie for dashboard API routes.
      in: header
      name: New-Api-User
      type: apiKey
    sessionAuth:
      description: Session cookie from /api/user/login. Used by dashboard routes as an alternative to access token.
      in: cookie
      name: session
      type: apiKey