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-detections-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: 3.2.0
info:
title: Nano Studio Pro Detections 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: Detections
description: 'What the detection engine sees in each image. Every generation and import is automatically deep-scanned (Gemini): item names, categories, textures, colors, and bounding boxes in a 0-1000 normalized space, plus a scene narrative. Free to read; these detections power search and give agents item names to target in edits.'
paths:
/v1/detections/{target_id}:
parameters:
- name: target_id
in: path
required: true
description: Generation or asset ID to read detections for.
schema:
type: string
- name: type
in: query
description: Whether target_id is a generation or an asset.
schema:
type: string
enum:
- generation
- asset
default: generation
get:
tags:
- Detections
summary: Get detected items + scene narrative for an image
description: 'Returns the latest completed detection scan for an image you own: every detected item with its name, category, texture, hex colors, and bounding box, plus a 150-word scene narrative and overall style.
Bounding boxes are normalized to a **0-1000 square** regardless of pixel size — multiply by `width/1000` and `height/1000` to get pixels. Items form a hierarchy via `parent_id` (a sleeve''s parent is the jacket).
Every item has an `id`, unique within the scan and the same on every read of it (`scan_id`); a rescan numbers its items afresh. `label` is the `name`, or, when several items share a name, the name plus where this one sits in the picture: `"person (left)"`, `"cup (2nd from left)"` (the picture''s left, not the subject''s). To remove one of two people, pass its id to `POST /v1/restyle` (`action: "remove"`, `items: [{ "id": 2 }]`, optionally `scan_id`).
Free. If the image has never been scanned (404), trigger one with `POST /v1/scans` — though every generation and import is scanned automatically, so this mostly matters for very old images.'
responses:
'200':
description: Latest completed scan for the target.
content:
application/json:
example:
target_id: cmod7xy9z00031do84a1bcde2
target_type: generation
scan_id: cmscan123
scanned_at: '2026-07-20T12:00:00.000Z'
style: photograph
narrative: A model in a leather jacket stands against a concrete wall...
item_count: 3
has_bounding_boxes: true
has_joints: false
box_space: 0-1000
items:
- id: 1
parent_id: null
name: person
label: person (left)
category: person
texture: null
action: standing
expression: smiling
colors: []
box:
x1: 80
y1: 120
x2: 420
y2: 990
- id: 2
parent_id: null
name: person
label: person (right)
category: person
texture: null
action: standing
expression: null
colors: []
box:
x1: 560
y1: 100
x2: 930
y2: 995
- id: 3
parent_id: 1
name: leather jacket
label: leather jacket
category: outerwear
texture: leather
action: null
expression: null
colors:
- '#1a1a1a'
box:
x1: 100
y1: 300
x2: 400
y2: 700
'400':
description: '`type` must be "generation" or "asset"'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: validation_error
message: '`type` must be "generation" or "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: Target not found, or never scanned (run POST /v1/scans)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: not_found
message: Target not found, or never scanned (run POST /v1/scans)
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: rate_limited
message: Rate limit exceeded
operationId: getV1DetectionsByTargetId
x-operation-id-source: derived
/v1/scans:
post:
tags:
- Detections
summary: Run a detection scan on an image
description: 'Runs the deep detection scan on a generation or asset you own and returns when it finishes (typically 5-20s). **Free** — no credit deduction. The result feeds `GET /v1/detections/{target_id}` and full-text search.
Usually unnecessary: every generation and import is scanned automatically on creation. Re-scanning replaces the stored detections for the target.'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- target_id
properties:
target_id:
type: string
description: Generation or asset ID.
target_type:
type: string
enum:
- generation
- asset
default: generation
responses:
'200':
description: Scan completed.
content:
application/json:
example:
status: completed
target_id: cmod7xy9z00031do84a1bcde2
target_type: generation
item_count: 12
has_boxes: true
task_id: task_xyz
'400':
description: '`target_id` is required'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: validation_error
message: '`target_id` is required'
'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: Target not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: not_found
message: Target 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: postV1Scans
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.'
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.'