AIfra Previews API
The Previews API from AIfra — 2 operation(s) for previews.
The Previews API from AIfra — 2 operation(s) for previews.
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/aifra-ru:aifra-ru-previews-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. 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: AIfra preview Previews API
version: 0.5.0-stage5
description: SaaS for prebuilt static ZIP previews with server-enforced 48-hour expiry. Availability is announced on the platform website. Production uses isolated per-preview origins; the server never builds or executes user code.
servers:
- url: '{apiOrigin}'
variables:
apiOrigin:
default: https://api.aifra.ru
tags:
- name: Previews
paths:
/v1/previews:
post:
summary: Create a 48-hour static preview
parameters:
- name: X-AI-Deploy-Accept-Terms
in: header
required: true
description: Must be true. The server records its configured terms version and acceptance time.
schema:
type: string
const: 'true'
- name: X-AI-Deploy-Anonymous-ID
in: header
required: true
schema:
type: string
pattern: ^aid_[A-Za-z0-9_-]{20,96}$
- name: X-AI-Deploy-Source
in: header
required: true
description: Use unknown when attribution is unavailable; never guess.
schema:
type: string
enum:
- codex
- chatgpt
- claude-code
- cursor
- github
- mcp-registry
- yandex-organic
- preview
- google-organic
- telegram
- habr
- vc
- direct
- unknown
- name: X-AI-Deploy-Client-Name
in: header
required: true
schema:
type: string
maxLength: 100
- name: X-AI-Deploy-Client-Version
in: header
required: true
schema:
type: string
maxLength: 100
requestBody:
required: true
content:
application/zip:
schema:
type: string
format: binary
responses:
'201':
description: Preview created; management token is returned once
'400':
description: Terms not accepted or client metadata invalid
'413':
description: Compressed or extracted limit exceeded
'422':
description: Archive or static-content validation failed
'429':
description: Slot, byte or rate limit reached
'503':
description: Public beta disabled or operational kill switch active
tags:
- Previews
operationId: postV1Previews
x-operation-id-source: derived
/v1/previews/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
pattern: ^pv_[A-Za-z0-9_-]{20,}$
get:
summary: Get preview status
responses:
'200':
description: Active preview status
'404':
description: Unknown preview
'410':
description: Expired preview
tags:
- Previews
operationId: getV1PreviewsById
x-operation-id-source: derived
put:
summary: Replace content without extending the original expiry
parameters:
- name: X-AI-Deploy-Accept-Terms
in: header
required: true
description: Must be true. The server records its configured terms version and acceptance time.
schema:
type: string
const: 'true'
- name: X-AI-Deploy-Anonymous-ID
in: header
required: true
schema:
type: string
pattern: ^aid_[A-Za-z0-9_-]{20,96}$
- name: X-AI-Deploy-Source
in: header
required: true
description: Use unknown when attribution is unavailable; never guess.
schema:
type: string
enum:
- codex
- chatgpt
- claude-code
- cursor
- github
- mcp-registry
- yandex-organic
- preview
- google-organic
- telegram
- habr
- vc
- direct
- unknown
- name: X-AI-Deploy-Client-Name
in: header
required: true
schema:
type: string
maxLength: 100
- name: X-AI-Deploy-Client-Version
in: header
required: true
schema:
type: string
maxLength: 100
security:
- managementToken: []
requestBody:
required: true
content:
application/zip:
schema:
type: string
format: binary
responses:
'200':
description: Immutable revision switched atomically
'401':
description: Management token invalid
'410':
description: Preview expired
tags:
- Previews
operationId: putV1PreviewsById
x-operation-id-source: derived
delete:
summary: Delete preview and free its active slot
security:
- managementToken: []
responses:
'204':
description: Preview deleted
'401':
description: Management token invalid
tags:
- Previews
operationId: deleteV1PreviewsById
x-operation-id-source: derived
components:
securitySchemes:
managementToken:
type: http
scheme: bearer
bearerFormat: pmt_*
x-legal:
terms_path: /legal/terms/
privacy_path: /legal/privacy/
retention_path: /legal/retention/
abuse_path: /abuse/
path_origin: SITE_ORIGIN (platform website, not API or user-content origin)
terms_version: 2026-09-23-v3
acceptance: Explicit accept_terms on create/update; not personal-data consent
activation: TERMS_VERSION must match the reviewed document before public beta
x-technical-retention:
version: 2026-09-23-v3
remoteApprovalSeconds: 7200
remoteReceiptSeconds: 3600
rateLimitHours: 25
lifecycleDays: 30
adminAuditDays: 90
backupMaxHours: 48
supportAfterResolutionDays: 30
abuseAfterResolutionDays: 90
x-agent-workflow:
documentation_path: /docs/agent/
path_origin: SITE_ORIGIN, not the API or preview origin
input: Prebuilt browser-only static ZIP with index.html at archive root
acceptance: Obtain explicit terms acceptance before create/update
output: Return viewer url and expires_at; keep manage_token in private local state
retries: Do not blindly retry POST after an uncertain network result; creation has no idempotency key
discovery: Instruction files aid use; no unaided model selection rate is claimed
unavailable:
- server-side builds
- user backend execution
x-preview-constraints:
ttlHours: 48
activePreviewsPerIp: 3
uploadBytes: 52428800
extractedBytes: 52428800
activeBytesPerIp: 157286400
staticOnly: true
updateExtendsExpiry: false
x-remote-mcp:
endpoint: https://api.aifra.ru/mcp
publication: browser_confirmation_required
approval_ttl_seconds: 7200
receipt_retention_seconds: 3600
receipt_retention_starts: completion_or_approval_expiry
named_links: Optional browser-selected name on create; never reissued; random isolated asset origin is unchanged
management: Private browser key; never an MCP parameter or result