TrendSwap Media & Portraits API
Upload and manage portrait reference photos and media assets
Upload and manage portrait reference photos and media assets
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/trendswap-app:trendswap-app-media-portraits-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: TrendSwap Media & Portraits API
description: 'TrendSwap is a viral social AI video studio and motion transfer platform supporting 4 global languages (English, Spanish, Japanese, Chinese) that transforms authorized portraits into trending video clips with 100% identity preservation.
This API provides programmatic access to viral video templates, AI face swap and motion transfer video generation, portrait media management, credit balances, and the official Model Context Protocol (MCP) streamable endpoint for Zapier, Cursor, Claude Desktop, and autonomous agents.'
version: 1.0.0
contact:
name: TrendSwap Developer Support
email: support@trendswap.app
url: https://trendswap.app
license:
name: Proprietary
url: https://trendswap.app/terms-of-service
servers:
- url: https://trendswap.app
description: Production Server
security:
- ApiKeyAuth: []
- XApiKeyAuth: []
tags:
- name: Media & Portraits
description: Upload and manage portrait reference photos and media assets
paths:
/api/portraits:
post:
tags:
- Media & Portraits
summary: Upload Portrait Image
description: Uploads a front-facing portrait photo (JPEG, PNG, WebP; max 15MB) to secure cloud storage. Returns a `portrait_id` that can be passed to `POST /api/generation/jobs`.
operationId: uploadPortrait
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- files
properties:
files:
type: string
format: binary
description: Binary image file (JPEG, PNG, WebP)
responses:
'200':
description: Portrait uploaded successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PortraitResponse'
'400':
description: Invalid image format or dimensions
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'413':
description: Image file exceeds 15MB limit
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/portraits/{id}:
get:
tags:
- Media & Portraits
summary: Get Portrait Metadata
description: Retrieves metadata, preview URL, and dimensions of an uploaded portrait photo.
operationId: getPortrait
parameters:
- name: id
in: path
required: true
description: Portrait ID (e.g. port_8x92nd82la)
schema:
type: string
example: port_8x92nd82la
responses:
'200':
description: Portrait metadata
content:
application/json:
schema:
$ref: '#/components/schemas/PortraitResponse'
'404':
description: Portrait not found or expired
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
delete:
tags:
- Media & Portraits
summary: Delete Portrait Photo
description: Deletes an uploaded portrait from storage. Fails with 409 if currently used by an active generation job.
operationId: deletePortrait
parameters:
- name: id
in: path
required: true
description: Portrait ID to delete
schema:
type: string
example: port_8x92nd82la
responses:
'200':
description: Portrait deleted
content:
application/json:
schema:
type: object
properties:
code:
type: integer
example: 0
data:
type: object
properties:
deleted:
type: boolean
example: true
'409':
description: Portrait is currently locked by an active generation job
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/storage/upload-image:
post:
tags:
- Media & Portraits
summary: Upload General Image Asset
description: Direct multipart upload endpoint for image assets (JPEG, PNG, WebP, GIF, HEIC; max 10MB per file).
operationId: uploadImageAsset
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- files
properties:
files:
type: string
format: binary
description: Binary image file
responses:
'200':
description: Image uploaded successfully
content:
application/json:
schema:
type: object
properties:
code:
type: integer
example: 0
data:
type: object
properties:
url:
type: string
format: uri
example: https://cdn.trendswap.app/images/upload_abc.jpg
'400':
description: Invalid image format
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
PortraitResponse:
type: object
properties:
code:
type: integer
example: 0
data:
type: object
properties:
portrait_id:
type: string
example: port_8x92nd82la
preview_url:
type: string
format: uri
example: https://cdn.trendswap.app/portraits/port_8x92nd82la.webp
width:
type: integer
example: 1024
height:
type: integer
example: 1024
ErrorResponse:
type: object
properties:
code:
type: integer
example: 1
message:
type: string
example: Invalid or expired API Key
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
bearerFormat: API Key
description: 'TrendSwap API Key in format: Bearer sk_... (obtain from https://trendswap.app/settings/apikeys)'
XApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: TrendSwap API Key passed in the X-API-Key header