Nano Studio Pro Assets API

Reusable inputs you can reference across many generations: model headshots, pose guides, backgrounds, products, accessories. Once uploaded, pass an asset's `id` into any generation as `reference_asset_id` instead of re-uploading the file every time.

GitHub OpenAPI

Operations 8

GET /v1/assets List assets #
POST /v1/assets Upload an asset #
GET /v1/assets/{id} Get an asset #
DELETE /v1/assets/{id} Delete an asset #
GET /v1/media/{type}/{id} Open a permanent media link #
GET /v1/media/{type}/{id}/uses Where an image is used #
POST /v1/media/{type}/{id}/uses Register a use #
DELETE /v1/media/{type}/{id}/uses Release a use #

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/nanostudiopro-com:nanostudiopro-com-assets-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

nanostudiopro-com-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nano Studio Pro Assets API
  version: 1.0.0
  description: 'Programmatic access to **Nano Studio Pro** — generate AI fashion and product photography, manage projects and assets, and track storage from any client (scripts, CLIs, AI agents).


    ### How it works


    You group your work into **Projects**. Each generation belongs to a project. Reusable inputs (model photos, pose references, uploads) live in **Assets** and can be passed by ID into any generation. Generations cost credits by resolution (see `POST /v1/generations`); asset uploads count against your **storage quota**.


    ### Authentication


    All requests require a Bearer token. Create one at Settings · API keys. The token is shown once at creation — store it safely. If lost, revoke and create a new one.


    ```bash

    curl -H "Authorization: Bearer sk_sf_live_..." https://nanostudiopro.com/api/v1/me

    ```


    Two kinds of key share this header:


    - **Secret keys** (`sk_sf_live_...`) — full API access, governed by the token''s scopes. Never ship one in client-side code.

    - **Publishable keys** (`pk_sf_live_...`) — safe to embed in public HTML. They are created with the `read` scope only and work **exclusively on `GET /v1/search`**: authentication itself rejects them with `401 unauthorized` on every other endpoint. Each publishable key optionally carries a **`search_scope`** object (see the schema of that name) that narrows what it can see:

    - `projects` — the key sees only these project ids; absent = the whole library.

    - `types` — result types the key may return (`asset` / `generation`).

    - `max_image_size` — caps the `image_size` variant served; requests above the cap (the `preview` default included) are silently served the cap.

    - `origins` — exact-match browser `Origin` allowlist; a request from any other origin gets `403 forbidden`. Absent = any origin. Requests with no Origin header (curl, server-to-server) always pass — the origin lock is a soft, browser-only control; the hard controls are the read-only scope and the narrowing above.

    - `include_regions` — whether the key may request detection regions. Default false.

    - `include_narrative` — whether results carry the AI-written photo description (`narrative`). Default false: publishable-key results omit it unless the scope opts in.


    Scope narrowing is **silent by design**: a filter that falls entirely outside the key''s scope returns an empty 200 page, never an error, so a client can''t probe what exists outside its window.


    ### Rate limits


    Per-token rate limits are enforced; when exceeded you''ll get `429` with a `Retry-After` header. Secret keys get **60 requests/min per token**. Publishable keys (search-only) get **600/min per key** plus **60/min per key + client IP** — whichever is stricter wins, so one hot visitor can''t exhaust a whole site''s key. Search rate limits are durable — shared across server instances, so counts don''t reset on deploys or split between replicas.


    ### Errors


    All error responses use the same shape: `{ "error": { "code": "...", "message": "..." } }`. Common codes include `unauthorized`, `validation_error`, `not_found`, `insufficient_credits`, `token_cap_exceeded`, `storage_limit_exceeded`, `rate_limited`.


    ## Authorizing a device


    Two ways to get a token:


    1. **Manual** — create one in Settings · API Tokens. Returns a `sk_sf_live_...` token immediately.

    2. **Device flow (RFC 8628)** — for CLIs and headless tools. Run `curl -fsSL https://nanostudiopro.com/cli/nsp -o /usr/local/bin/nsp && chmod +x /usr/local/bin/nsp && nsp login`, or implement the protocol yourself (full walkthrough at /docs/device-auth; endpoints are listed under the **Device Auth** tag below).


    Each token can optionally have a **daily credit cap** — a rolling-24h spending limit independent of the wallet balance. Useful for limiting blast radius if a token leaks. Configure under Settings → API Tokens.'
  contact:
    url: https://nanostudiopro.com/settings?tab=api-tokens
servers:
- url: /api
  description: Same origin as docs (auto-detects local vs prod)
- url: https://nanostudiopro.com/api
  description: Production
security:
- BearerAuth: []
tags:
- name: Assets
  description: 'Reusable inputs you can reference across many generations: model headshots, pose guides, backgrounds, products, accessories. Once uploaded, pass an asset''s `id` into any generation as `reference_asset_id` instead of re-uploading the file every time.'
paths:
  /v1/assets:
    get:
      tags:
      - Assets
      summary: List assets
      description: Lists your reusable assets, optionally filtered by `category`. Categories include `model` (faces), `pose` (skeleton/posture references), `background` (scenes), `shoe`, `accessory`, and `upload` (anything else). Use the returned `id` as `reference_asset_id` when generating images.
      parameters:
      - name: category
        in: query
        schema:
          type: string
          enum:
          - model
          - pose
          - background
          - shoe
          - accessory
          - upload
          - product
      - name: project_id
        in: query
        description: 'Only assets in this project: uploaded into it or added to it.'
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
          maximum: 100
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: Paginated assets
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Asset'
                  total:
                    type: integer
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: getV1Assets
      x-operation-id-source: derived
    post:
      tags:
      - Assets
      summary: Upload an asset
      description: Multipart upload of a single image to your asset library. Use this when you have a reference you'll reuse across multiple generations — for example a recurring model headshot or a brand-approved background. For one-off references, attaching to `POST /v1/generations` directly is fine; that endpoint also saves uploads as assets automatically. Counts against your storage quota.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              - category
              properties:
                file:
                  type: string
                  format: binary
                category:
                  type: string
                  enum:
                  - model
                  - pose
                  - background
                  - shoe
                  - accessory
                  - upload
                name:
                  type: string
                project_id:
                  type: string
                  description: Add the asset to this project.
                metadata:
                  type: string
                  description: A JSON object of your own fields (a quote number, a client, where it came from), at most 4 KB. Returned as `metadata` on every read.
                  example: '{"source":"beanovision","quote":"Q-2026-1005-01"}'
      responses:
        '200':
          description: 'The same file (byte for byte) was already uploaded to this account in this category: the existing asset comes back with `duplicate: true`. Nothing is stored, scanned or charged; a `project_id` adds it to that project.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '201':
          description: 'Asset created. When other versions of the same picture are already in your library (a larger original, a smaller export, a re-save), the answer adds `versions`: see `GET /v1/media/{type}/{id}/versions`. Nothing is refused over it.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '400':
          description: Invalid upload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: validation_error
                  message: Invalid upload
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '402':
          description: Storage quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: storage_limit_exceeded
                  message: Storage quota exceeded
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: postV1Assets
      x-operation-id-source: derived
  /v1/assets/{id}:
    parameters:
    - name: id
      in: path
      required: true
      description: Asset ID. Get one from `GET /v1/assets`.
      example: cmod7xy9z00031do84a1bcde2
      schema:
        type: string
    get:
      tags:
      - Assets
      summary: Get an asset
      responses:
        '200':
          description: Asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '404':
          description: Asset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Asset not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: getV1AssetsById
      x-operation-id-source: derived
    delete:
      tags:
      - Assets
      summary: Delete an asset
      description: 'Refused with 409 `media_in_use` while the asset is used somewhere: a registered use (see `/v1/media/{type}/{id}/uses`), a live share page or a public gallery listing. The error message names the places; show them to the person, and on their OK repeat with `force=true`.'
      parameters:
      - name: force
        in: query
        description: Delete even though the asset is in use.
        schema:
          type: boolean
      responses:
        '204':
          description: Deleted
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '404':
          description: Asset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Asset not found
        '409':
          description: The asset is in use; the message lists where
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: media_in_use
                  message: The asset is in use; the message lists where
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: deleteV1AssetsById
      x-operation-id-source: derived
  /v1/media/{type}/{id}:
    get:
      tags:
      - Assets
      summary: Open a permanent media link
      description: 'The address behind every `permanent_url`. Needs no token: the `sig` in the link is the permission, so it works inside an `` on any page. Answers with a 302 to a short-lived signed file URL. Returns 404 once the asset or generation is deleted.'
      security: []
      parameters:
      - name: type
        in: path
        required: true
        schema:
          type: string
          enum:
          - asset
          - generation
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: sig
        in: query
        required: true
        schema:
          type: string
      - name: use
        in: query
        description: Present on a registered use's own link. Each open stamps that use's last-viewed time; the link 404s once the use is released.
        schema:
          type: string
      - name: size
        in: query
        schema:
          type: string
          enum:
          - xs
          - thumb
          - preview
          - large
          - original
          default: original
      - name: file
        in: query
        description: 'A clip''s video file instead of its poster image: `video` is the file the app plays (the light 1080p editing copy once it exists), `original` the uploaded file (the same as `video` when no separate original is kept). `size` does not apply.'
        schema:
          type: string
          enum:
          - video
          - original
      responses:
        '302':
          description: Redirect to the file
        '400':
          description: Unknown size
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: validation_error
                  message: Unknown size
        '404':
          description: Media not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Media not found
      operationId: getV1MediaByTypeById
      x-operation-id-source: derived
  /v1/media/{type}/{id}/uses:
    parameters:
    - name: type
      in: path
      required: true
      schema:
        type: string
        enum:
        - asset
        - generation
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Assets
      summary: Where an image is used
      description: Every registered use, live share page and public gallery listing of this image. `total` > 0 means deleting it needs confirmation.
      responses:
        '200':
          description: Uses
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '404':
          description: Media not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Media not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: getV1MediaByTypeByIdUses
      x-operation-id-source: derived
    post:
      tags:
      - Assets
      summary: Register a use
      description: 'Record that a place outside Nano Studio shows this image (a client quote, a page, an email) and get back a `link` of its own to embed. Idempotent per `ref`: registering the same place again updates its label and returns the same link. While any use exists, deleting the image asks for confirmation. Each open of the link stamps `last_viewed_at`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - ref
              - label
              properties:
                ref:
                  type: string
                  maxLength: 200
                  description: Your stable key for the place.
                  example: beanovision:quote:Q-2026-1005-01
                label:
                  type: string
                  maxLength: 200
                  description: What a person reads in the delete confirmation.
                  example: Quote Q-2026-1005-01 — Sofwave (sent)
                url:
                  type: string
                  format: uri
                  description: Where the place can be opened.
      responses:
        '200':
          description: Use already registered; label and url updated
        '201':
          description: Use registered
        '400':
          description: Invalid ref, label or url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: validation_error
                  message: Invalid ref, label or url
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '404':
          description: Media not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Media not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: postV1MediaByTypeByIdUses
      x-operation-id-source: derived
    delete:
      tags:
      - Assets
      summary: Release a use
      description: The place no longer shows the image. Its link stops working within minutes.
      parameters:
      - name: ref
        in: query
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Released
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Missing or invalid token
        '404':
          description: No use with that ref
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: No use with that ref
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Rate limit exceeded
      operationId: deleteV1MediaByTypeByIdUses
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: '`prompt` is required'
            needed:
              type: integer
              nullable: true
              description: '402 only: what the operation costs in credits, when known.'
            balance:
              type: integer
              nullable: true
              description: '402 only: what the account has (for `token_cap_exceeded`, what the token may still spend today), when known.'
            purchase_url:
              type: string
              format: uri
              description: '402 only: where the person adds credits. Every 402 (`insufficient_credits`, `token_cap_exceeded`, `video_requires_purchase`, `audio_requires_purchase`, `storage_limit_exceeded`, `trial_required`) carries the same fields, so one handler can show the notice. `trial_required` answers an upload from an account that has not started its free trial: nothing was stored, and the upload goes through once the trial is on.'
    Asset:
      type: object
      properties:
        id:
          type: string
        category:
          type: string
          enum:
          - model
          - pose
          - background
          - shoe
          - accessory
          - upload
          - product
        name:
          type: string
        file_path:
          type: string
          description: Internal storage key (use `url` for fetching).
        url:
          type: string
          format: uri
          description: Signed URL tied to a ~6-hour signing window. Use this to display or download the asset; re-fetch the resource for a fresh one.
        permanent_url:
          type: string
          format: uri
          description: 'A link that never expires: embed it in a page, an email or another product. Append `&size=xs|thumb|preview|large|original` (default original). Anyone holding it can view this one image; deleting the asset revokes it. See `GET /v1/media/{type}/{id}`.'
        project_id:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: The fields you sent as `metadata` on upload, returned unchanged.
        width:
          type: integer
          nullable: true
        height:
          type: integer
          nullable: true
        size:
          type: integer
          nullable: true
          description: File size in bytes.
        mime_type:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Personal access token from `/settings?tab=api-tokens`. Send as `Authorization: Bearer sk_sf_live_...` — or a publishable `pk_sf_live_...` key, which authenticates on `GET /v1/search` only.'