ViralNote Credits API

The Credits API from ViralNote, for credits.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /usage Shared allowances plus per-brand minutes and storage #
GET /credits Get current credit balance #
POST /credits/estimate Estimate credits needed for a video, carousel or product ads #
GET /credits/transactions List credit transaction history #

Specifications

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/viralnote-app:viralnote-app-credits-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

viralnote-app-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ViralNote Credits API
  version: 1.0.0-v1
  description: Versioned REST API for scheduling posts, managing media, querying analytics, and importing content on ViralNote.
  contact:
    name: ViralNote support
    email: info@viralnote.app
    url: https://www.viralnote.app/contact
  termsOfService: https://www.viralnote.app/terms
  license:
    name: ViralNote API Terms
    url: https://www.viralnote.app/terms
  x-logo:
    url: https://www.viralnote.app/vnlogo.png
servers:
- url: https://dashboard.viralnote.app/api/v1
  description: Primary
- url: https://www.viralnote.app/api/v1
  description: Alias (reverse proxy on the marketing domain)
- url: /api/v1
  description: Relative
security:
- oauth2:
  - posts:read
  - posts:write
  - posts:publish
  - comments:read
  - comments:reply
  - comments:moderate
  - analytics:read
  - webhooks:manage
  - credits:read
  - credits:write
- apiKeyAuth: []
- bearerAuth: []
tags:
- name: Credits
paths:
  /usage:
    get:
      summary: Shared allowances plus per-brand minutes and storage
      security:
      - oauth2:
        - credits:read
      - apiKeyAuth: []
      - bearerAuth: []
      responses:
        '200':
          description: Account-level credit and storage totals with per-brand attribution. Plan limits stay shared. Brand-scoped API keys only receive that brand's row.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UsageBreakdown'
                  requestId:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded for this key. Wait `Retry-After` seconds.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getUsage
      description: Shared credit and library-storage allowances plus per-brand minutes and bytes. Attribution only — plan limits stay on the account. A brand-scoped API key only receives that brand's row.
      tags:
      - Credits
      x-required-scope: credits:read
      x-required-scopes:
      - credits:read
      x-scope-alternatives:
      - - credits:read
  /credits:
    get:
      summary: Get current credit balance
      security:
      - oauth2:
        - credits:read
      - apiKeyAuth: []
      - bearerAuth: []
      responses:
        '200':
          description: Credit balance breakdown
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CreditsBalance'
                  requestId:
                    type: string
              example:
                data:
                  monthlyAllowance: 500
                  monthlyUsed: 137
                  monthlyRemaining: 363
                  topUpBalance: 100
                  totalAvailable: 463
                  renewsAt: '2026-06-01T00:00:00.000Z'
                requestId: req_a8f3e21b
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded for this key. Wait `Retry-After` seconds.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getCredits
      description: Get the current video-processing credit balance and plan allowance.
      tags:
      - Credits
      x-required-scope: credits:read
      x-required-scopes:
      - credits:read
      x-scope-alternatives:
      - - credits:read
  /credits/estimate:
    post:
      summary: Estimate credits needed for a video, carousel or product ads
      security:
      - oauth2:
        - credits:read
      - apiKeyAuth: []
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: 'Send `durationSeconds` for video processing, `kind: "carousel"` for a carousel, `kind: "ad"` for product video ads, or `kind: "static_ad"` for static product ads.'
              properties:
                durationSeconds:
                  type: number
                  description: Video duration in seconds
                kind:
                  type: string
                  enum:
                  - carousel
                  - ad
                  - static_ad
                  description: Estimate a carousel or product ads instead of a video
                model:
                  type: string
                  enum:
                  - omni-1-2
                  - kling-3
                  - seedance-2-fast
                  - seedance-2
                  default: kling-3
                  description: Ads only.
                variants:
                  type: integer
                  minimum: 1
                  maximum: 8
                  description: 'Ads only: 1–5 for `ad` (default 3), 1–8 for `static_ad` (default 4).'
                background:
                  type: string
                  enum:
                  - ai
                  - photos
                  - mix
                  default: ai
                  description: Carousel only. "photos" (library photos only) is free.
      responses:
        '200':
          description: Estimated cost plus current balance
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                        - carousel
                        description: Present for carousel estimates
                      background:
                        type: string
                        enum:
                        - ai
                        - photos
                        - mix
                        description: Carousel estimates only
                      creditsRequired:
                        type: integer
                        example: 4
                      durationSeconds:
                        type: number
                        description: Video estimates only
                      durationMinutes:
                        type: number
                        description: Video estimates only
                      monthlyRemaining:
                        type: integer
                      topUpBalance:
                        type: integer
                      totalAvailable:
                        type: integer
                      sufficient:
                        type: boolean
                        example: true
                  requestId:
                    type: string
        '400':
          description: Neither a positive durationSeconds nor kind=carousel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 'Missing or invalid credential. Carries `WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/api/v1"`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded for this key. Wait `Retry-After` seconds.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: estimateCredits
      description: 'Estimate credits before spending them: a video of the given duration (`durationSeconds`), a carousel (`kind: "carousel"`: 4 with an AI background, 0 with `background: "photos"`), product ads (`kind: "ad"` with `model` and `variants`), or static product ads (`kind: "static_ad"` with `variants`). Returns the current balance and whether it is sufficient.'
      tags:
      - Credits
      x-required-scope: credits:read
      x-required-scopes:
      - credits:read
      x-scope-alternatives:
      - - credits:read
  /credits/transactions:
    get:
      summary: List credit transaction history
      security:
      - oauth2:
        - credits:read
      - apiKeyAuth: []
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50
      - name: cursor
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Paginated credit transaction history (newest first)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/CreditTransaction'
                      nextCursor:
                        type:
                        - string
                        - 'null'
                  requestId:
                    type: string
        '401':
          description: 'Missing or invalid credential. Carries `WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/api/v1"`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded for this key. Wait `Retry-After` seconds.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: listCreditTransactions
      description: List credit transactions (grants, top-ups, consumption) newest first.
      tags:
      - Credits
      x-required-scope: credits:read
      x-required-scopes:
      - credits:read
      x-scope-alternatives:
      - - credits:read
components:
  schemas:
    CreditTransaction:
      type: object
      properties:
        id:
          type: string
        delta:
          type: integer
          description: Positive for credit, negative for spend.
          example: -10
        reason:
          type: string
          example: video.transcribe
        balanceAfter:
          type: integer
          example: 453
        createdAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      description: Standard error envelope. `requestId` is present on every response — include it in support requests so the server-side trace can be looked up.
      properties:
        requestId:
          type: string
          example: req_a8f3e21b
        error:
          type: object
          properties:
            code:
              type: string
              example: validation-error
            message:
              type: string
              example: Caption is required
          required:
          - code
          - message
      required:
      - error
    UsageBreakdown:
      type: object
      description: Shared account allowances with per-brand attribution. Limits are not split per brand.
      properties:
        shared:
          type: object
          properties:
            monthlyAllowance:
              type: integer
              example: 1000
            monthlyUsed:
              type: integer
              example: 210
            monthlyRemaining:
              type: integer
              example: 790
            topUpBalance:
              type: integer
              example: 0
            storageUsedBytes:
              type: integer
              example: 12884901888
            storageQuotaBytes:
              type: integer
              example: 171798691840
            periodStart:
              type:
              - string
              - 'null'
              format: date-time
        byBrand:
          type: array
          items:
            type: object
            properties:
              brandId:
                type: string
              name:
                type: string
              isDefault:
                type: boolean
              minutesUsedPeriod:
                type: integer
                description: Processing credits consumed this period for this brand.
              storageBytes:
                type: integer
                description: Library and clip bytes attributed to this brand.
    CreditsBalance:
      type: object
      properties:
        monthlyAllowance:
          type: integer
          example: 500
          description: Total monthly credits for the plan.
        monthlyUsed:
          type: integer
          example: 137
        monthlyRemaining:
          type: integer
          example: 363
        topUpBalance:
          type: integer
          example: 100
          description: Credits from top-up packs (don't expire monthly).
        totalAvailable:
          type: integer
          example: 463
          description: monthlyRemaining + topUpBalance.
        renewsAt:
          type:
          - string
          - 'null'
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Signed-in user session (Firebase ID token) or an OAuth access token. Required for API-key management endpoints.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API key created at https://dashboard.viralnote.app/developers/auth. Keys are scoped at creation; the scope each operation needs is listed in its `security` entry under `oauth2`. The same key may be sent as `Authorization: Bearer vnd_...`.'
      x-scopes:
        posts:read: List and read posts, drafts, schedules, publish results, media, accounts, and brands. Also satisfies analytics:read and comments:read, which were carved out of it.
        posts:write: Create and edit drafts; cancel scheduled posts; manage media, brand profile, saved replies, and content generation. Scheduling and publishing require posts:publish; replying and moderating require the comments scopes.
        posts:publish: Publish immediately, schedule, and edit content that stays queued. Requires an eligible plan.
        comments:read: List synced comments, refresh the inbox from connected networks, and read saved replies.
        comments:reply: Send public replies as the connected brand account, and manage saved replies and handled state.
        comments:moderate: Hide, unhide, delete, or report comments on the connected network, and mark comments handled. Does not allow sending replies.
        analytics:read: Read published-post metrics, per-post metric history, and audience history. Does not grant access to drafts or comments.
        webhooks:manage: Register, update, and delete webhook subscriptions.
        credits:read: Read the account's video-processing credit balance, estimates, transaction history, and per-brand usage breakdown.
        credits:write: Spend credits on AI generation, and enable recurring credit spending such as Compass automation.
    oauth2:
      type: oauth2
      description: OAuth 2.0 authorization code with PKCE. Dynamic client registration is open (RFC 7591) at the registration endpoint; metadata at /.well-known/oauth-authorization-server. Tokens carry the scopes granted by the user.
      flows:
        authorizationCode:
          authorizationUrl: https://dashboard.viralnote.app/oauth/authorize
          tokenUrl: https://dashboard.viralnote.app/api/mcp/oauth/token
          refreshUrl: https://dashboard.viralnote.app/api/mcp/oauth/token
          scopes:
            posts:read: List and read posts, drafts, schedules, publish results, media, accounts, and brands. Also satisfies analytics:read and comments:read, which were carved out of it.
            posts:write: Create and edit drafts; cancel scheduled posts; manage media, brand profile, saved replies, and content generation. Scheduling and publishing require posts:publish; replying and moderating require the comments scopes.
            posts:publish: Publish immediately, schedule, and edit content that stays queued. Requires an eligible plan.
            comments:read: List synced comments, refresh the inbox from connected networks, and read saved replies.
            comments:reply: Send public replies as the connected brand account, and manage saved replies and handled state.
            comments:moderate: Hide, unhide, delete, or report comments on the connected network, and mark comments handled. Does not allow sending replies.
            analytics:read: Read published-post metrics, per-post metric history, and audience history. Does not grant access to drafts or comments.
            webhooks:manage: Register, update, and delete webhook subscriptions.
            credits:read: Read the account's video-processing credit balance, estimates, transaction history, and per-brand usage breakdown.
            credits:write: Spend credits on AI generation, and enable recurring credit spending such as Compass automation.
externalDocs:
  description: Developer docs, auth walkthrough, and agent guides
  url: https://www.viralnote.app/developers/docs
x-agent:
  auth: https://www.viralnote.app/auth.md
  llms: https://www.viralnote.app/llms.txt
  agentView: https://www.viralnote.app/agent.json
  mcp:
    url: https://dashboard.viralnote.app/api/mcp/mcp
    transport: streamable-http
  protectedResourceMetadata: https://dashboard.viralnote.app/.well-known/oauth-protected-resource/api/v1
  authorizationServerMetadata: https://dashboard.viralnote.app/.well-known/oauth-authorization-server
  errorFormat: 'application/json; { error: { code, message }, requestId }'
  testing:
    sandbox: false
    guidance: No separate sandbox host. Create posts with status=draft to stage without side effects; GET endpoints never mutate. New accounts start Free; a 7-day free trial of Publish or Pro, or Growth's discounted first month (card required), unlocks publish and schedule.