ScaledThought Device API

The Device API from ScaledThought — 2 operation(s) for device.

GitHub OpenAPI

Operations 2

POST /v1/device/codes Ask to connect this agent to an existing account: a code your human types on… #
POST /v1/device/token Collect the key once your human approved the code (once per code) #

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/scaledthought-com:scaledthought-com-device-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

scaledthought-com-device-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ScaledThought control plane Device API
  version: 0.1.0
  description: Accounts, keys, budgets, usage, prepaid credits (human-approved top-ups), files, batches and models. Inference is OpenAI-compatible at the base_url returned by signup.
servers:
- url: https://api.us.scaledthought.com
  description: us region
tags:
- name: Device
paths:
  /v1/device/codes:
    post:
      operationId: createDeviceCode
      summary: 'Ask to connect this agent to an existing account: a code your human types on…'
      description: 'No key. Returns device_code (secret: keep it, it collects the key), user_code (e.g. WDJB-MJHT) and verification_url (the region''s dashboard /connect page; the code is never in the URL), expires_in 600, interval 5. Tell your human to sign in there and type user_code, then poll POST /v1/device/token. origin init (sent by `init` with its new account''s key) lets the funding page offer ''use my existing account''. Limited per address (429).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCodeInput'
      responses:
        '201':
          description: Device code
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Device
  /v1/device/token:
    post:
      operationId: claimDeviceCode
      summary: Collect the key once your human approved the code (once per code)
      description: 'No key. {device_code} for a code your human approved, or {connect_code} (stl_…) for a connect line a member made on the dashboard. Before approval: 428 authorization_pending (poll every 5 s); 403 access_denied; 410 expired_token; 409 already_claimed. A connect line answers 400 invalid_connect_code for unknown, used and expired alike; too many failed ones in a region: 429 too_many_failed_claims. On success: a new key for the account (shown once) with the approver''s scopes (owner: all; member: inference, read), account_id, account_name, region, base_url, key_name, scopes and closed_account (the new, empty account closed by ''use my existing account'', else null).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceTokenInput'
      responses:
        '200':
          description: 'Connected: the new key, once'
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Device
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
              - string
              - 'null'
          required:
          - message
          - type
          - code
      required:
      - error
    DeviceTokenInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        device_code:
          type: string
          maxLength: 200
        connect_code:
          type: string
          maxLength: 200
        client_label:
          type: string
          minLength: 1
          maxLength: 80
      additionalProperties: false
    DeviceCodeInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        client_label:
          type: string
          minLength: 1
          maxLength: 80
        origin:
          default: agent
          type: string
          enum:
          - agent
          - init
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: st_{region}_{env}_… key
    anthropicApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: st_{region}_{env}_… key