Masko AI References API
The References API from Masko AI — 4 operation(s) for references.
The References API from Masko AI — 4 operation(s) for references.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/masko-ai:masko-ai-references-api"
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.
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: Masko References API
version: '2026-09-26'
description: 'API for generating and managing AI mascots, animations, and logos. The current API version is the date in `info.version`; send it as the Masko-API-Version header, and every response echoes the version it used plus a Request-Id. JSON resource responses use {data, meta?} / {error: {code, message, param?, details?, doc_url, request_id}} envelopes. Standard authenticated resource POSTs accept Idempotency-Key for safe retries (auth and admin routes excluded), and lists return meta.pagination.next_cursor. Resources carry an object field naming their type; docs and OpenAPI are served directly and 204 responses have no body. Generation endpoints return 202 with endpoint-specific receipts: individual jobs use job_id and poll_url, developer orchestration uses run_id, and batch operations list their jobs. See each operation for its polling contract. Protected requests accept API keys or scoped CLI session access tokens. Amounts are in credits, and one credit is $0.125: every credit amount in a response comes with the same amount in US dollars, named like it plus _usd (estimated_cost_usd beside estimated_cost).'
servers:
- url: https://api.masko.ai
description: Production
- url: http://localhost:3000/api
description: Local development
security:
- BearerAuth: []
tags:
- name: References
paths:
/v1/collections/{id}/references:
post:
tags:
- References
summary: Add a reference image
description: Adds an image as a collection-scoped style reference (up to 6 references). Pass either `url` to download and store a new reference, or `asset_id` to copy an existing uploaded/generated image into this collection when needed. The returned `reference_asset_ids` are always collection-scoped assets that the app can display and future generations can use. Invalidates the cached style_card, which will be re-extracted on next generation. No credit cost.
security:
- BearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
- name: Idempotency-Key
in: header
required: false
description: 'Account-scoped key (1 to 255 characters, ideally a UUID). Retries must preserve the credential workspace, effective API version, URL, content type and exact body bytes, including multipart boundaries; different inputs return 409 idempotency_key_reused. Completed responses, including 500 errors, replay for 24 hours after completion with current resource access checked again. Running or unconfirmed executions return 409 idempotency_request_in_progress and do not expire automatically. A receipt persistence failure returns 503 idempotency_persistence_failed: retry only with the same key and inspect the operation outcome before starting a new request.'
schema:
type: string
maxLength: 255
requestBody:
required: true
description: Request body
content:
application/json:
schema:
$ref: '#/components/schemas/AddReferenceBody'
responses:
'201':
description: Reference added
content:
application/json:
schema:
$ref: '#/components/schemas/ReferenceResponse'
example:
data:
reference_asset_ids:
- e906ebb5-deb1-4010-82f9-f0182a3812e0
- 5114bec3-b92a-4917-8675-84fce713d3cf
- b357dfe9-92ab-4696-beb3-4f36779808f2
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
deprecated: true
operationId: legacyCreateCollectionReference
/v1/collections/{id}/references/{assetId}:
delete:
tags:
- References
summary: Remove a reference image
description: Removes an asset from the collection reference list. Returns the updated `reference_asset_ids` array. Invalidates the cached style_card. No credit cost.
security:
- BearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
- schema:
type: string
format: uuid
required: true
name: assetId
in: path
responses:
'200':
description: Reference removed
content:
application/json:
schema:
$ref: '#/components/schemas/ReferenceResponse'
example:
data:
reference_asset_ids:
- e906ebb5-deb1-4010-82f9-f0182a3812e0
- 5114bec3-b92a-4917-8675-84fce713d3cf
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: API version used to build this response.
schema:
type: string
example: '2026-09-26'
deprecated: true
operationId: legacyDeleteCollectionReference
/v1/mascots/{id}/references:
post:
tags:
- References
summary: Add a reference image
description: Adds an image as a mascot-scoped style reference (up to 6 references). Pass either `url` to download and store a new reference, or `asset_id` to copy an existing uploaded/generated image into this mascot when needed. The returned `reference_asset_ids` are always mascot-scoped assets that the app can display and future generations can use. Invalidates the cached style_card, which will be re-extracted on next generation. No credit cost.
security:
- BearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
- name: Idempotency-Key
in: header
required: false
description: 'Account-scoped key (1 to 255 characters, ideally a UUID). Retries must preserve the credential workspace, effective API version, URL, content type and exact body bytes, including multipart boundaries; different inputs return 409 idempotency_key_reused. Completed responses, including 500 errors, replay for 24 hours after completion with current resource access checked again. Running or unconfirmed executions return 409 idempotency_request_in_progress and do not expire automatically. A receipt persistence failure returns 503 idempotency_persistence_failed: retry only with the same key and inspect the operation outcome before starting a new request.'
schema:
type: string
maxLength: 255
requestBody:
required: true
description: Request body
content:
application/json:
schema:
$ref: '#/components/schemas/StudioAddReferenceBody'
responses:
'201':
description: Reference added
content:
application/json:
schema:
$ref: '#/components/schemas/ReferenceResponse'
example:
data:
reference_asset_ids:
- e906ebb5-deb1-4010-82f9-f0182a3812e0
- 5114bec3-b92a-4917-8675-84fce713d3cf
- b357dfe9-92ab-4696-beb3-4f36779808f2
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
operationId: createMascotReference
x-masko-api-version: '2026-09-26'
/v1/mascots/{id}/references/{assetId}:
delete:
tags:
- References
summary: Remove a reference image
description: Removes an asset from the mascot reference list. Returns the updated `reference_asset_ids` array. Invalidates the cached style_card. No credit cost.
security:
- BearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
- schema:
type: string
format: uuid
required: true
name: assetId
in: path
responses:
'200':
description: Reference removed
content:
application/json:
schema:
$ref: '#/components/schemas/ReferenceResponse'
example:
data:
reference_asset_ids:
- e906ebb5-deb1-4010-82f9-f0182a3812e0
- 5114bec3-b92a-4917-8675-84fce713d3cf
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
headers:
Request-Id:
description: Unique ID of this request. Include it when contacting support.
schema:
type: string
example: req_3f9c2a71d0b84e6a9c1f5e22
Masko-API-Version:
description: Effective resource naming contract.
schema:
type: string
enum:
- '2026-09-26'
operationId: deleteMascotReference
x-masko-api-version: '2026-09-26'
components:
schemas:
ReferenceData:
type: object
properties:
reference_asset_ids:
type: array
items:
type: string
format: uuid
required:
- reference_asset_ids
AddReferenceBody:
type: object
properties:
asset_id:
type: string
format: uuid
description: Asset ID of an existing uploaded or generated image. If the asset is not already scoped to this collection, the API creates a collection-scoped reference copy and stores that copied asset ID in reference_asset_ids.
url:
type: string
format: uri
description: Public HTTP(S) image URL, up to 10 MB with a 15-second download deadline. Private addresses and unsafe redirects are rejected. PNG, JPEG, WebP, GIF and SVG are supported; SVG is converted to PNG. Downloaded and stored as a collection-scoped reference asset.
StudioAddReferenceBody:
type: object
properties:
asset_id:
type: string
format: uuid
description: Asset ID of an existing uploaded or generated image. If the asset is not already scoped to this mascot, the API creates a mascot-scoped reference copy and stores that copied asset ID in reference_asset_ids.
url:
type: string
format: uri
description: Public HTTP(S) image URL, up to 10 MB with a 15-second download deadline. Private addresses and unsafe redirects are rejected. PNG, JPEG, WebP, GIF and SVG are supported; SVG is converted to PNG. Downloaded and stored as a mascot-scoped reference asset.
ApiError:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- doc_url
- request_id
properties:
code:
type: string
description: Stable machine-readable code. Switch on this.
message:
type: string
description: Human-readable explanation.
param:
type: string
description: The request field that caused the error, when there is one.
details:
type: object
additionalProperties: true
description: Extra context, for example issues for validation errors, or required and balance for credits with their required_usd and balance_usd.
doc_url:
type: string
format: uri
description: Documentation for this error code.
request_id:
type: string
description: Same value as the Request-Id header. Include it when contacting support.
ReferenceResponse:
type: object
properties:
data:
$ref: '#/components/schemas/ReferenceData'
required:
- data
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key (masko_<key>) or short-lived CLI session access token (masko_at_<token>). Send as Bearer. Projects, mascots and their assets, independent canvases and jobs are scoped to the credential workspace. Cross-workspace resource IDs return 404; select another workspace with browser login or use a key issued for that workspace. Collection routes remain legacy aliases; the separate character registry is retired.
AppKeyInLink:
type: apiKey
in: query
name: key
description: 'An app key (masko_app_<key>) inside the canvas link, so one link is all an app needs: https://api.masko.ai/v1/canvases/{canvasId}/delivery?key=masko_app_... Only the canvas delivery and bundle endpoints read it, and only app keys: an API key is never read from a link. When an Authorization header also holds a key, the header wins.'
x-tagGroups:
- name: Mascot
tags:
- Mascots
- Collections
- Items
- Assets
- References
- Voice
- Sounds
- Settings
- name: Creating content
tags:
- Generate
- Canvases
- name: Platform
tags:
- Projects
- Jobs
- Webhooks
- Credits
- Styles
- Upload
- Analyze
- Feedback