Rial Credits API

Prepaid photo credits at US$0.20 a photo, bought in packs by an agent with the card a person saved, under a monthly spend cap. Through the API every feature is on in any plan; credits pay for the photos. Callable with a dashboard session or secret API key.

GitHub OpenAPI

Operations 3

GET /v1/me/credits Get the credit balance, saved card and monthly spend #
POST /v1/me/credits/payment-method Get a link where a person saves the card agents will charge #
POST /v1/me/credits/top-ups Buy a pack of photo credits with the saved card #

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/rial-io:rial-io-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

rial-io-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: rial Credits API
  version: 0.1.0
  description: 'Prove a photo is real. Base URL: https://api.rial.io'
  contact:
    name: rial-platform team
    url: https://github.com/Rial-ventures-Inc/rial-platform
  license:
    name: UNLICENSED — proprietary, internal use only
servers:
- url: https://api.rial.io
  description: Production
tags:
- name: Credits
  description: Prepaid photo credits at US$0.20 a photo, bought in packs by an agent with the card a person saved, under a monthly spend cap. Through the API every feature is on in any plan; credits pay for the photos. Callable with a dashboard session or secret API key.
paths:
  /v1/me/credits:
    get:
      tags:
      - Credits
      summary: Get the credit balance, saved card and monthly spend
      security:
      - bearerApiKey: []
      responses:
        '200':
          description: Free photos left in the plan, prepaid credits, the packs on sale and how much of the monthly cap is used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credits'
        '401':
          description: The session or secret API key is invalid.
        '403':
          description: A person needs billing rights; a secret API key always may.
        '503':
          description: Billing storage unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      decline_code:
                        type: string
                      month_spent_cents:
                        type: integer
                      monthly_cap_cents:
                        type: integer
                      idempotency_key:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      description: Your credit balance in photos, the packs on sale, the saved card and how much of the monthly cap is spent.
      operationId: getV1MeCredits
      x-operation-id-source: derived
  /v1/me/credits/payment-method:
    post:
      tags:
      - Credits
      summary: Get a link where a person saves the card agents will charge
      security:
      - bearerApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                monthly_cap_cents:
                  type: integer
                  minimum: 1000
                  maximum: 1000000
              required:
              - monthly_cap_cents
              additionalProperties: false
      responses:
        '200':
          description: Stripe page, valid for an hour. The card and the monthly cap apply once the person completes it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                  expires_at:
                    type: string
                required:
                - url
                - expires_at
        '400':
          description: '`monthly_cap_cents` is outside 1000–1000000.'
        '401':
          description: The session or secret API key is invalid.
        '403':
          description: A person needs billing rights; a secret API key always may.
        '503':
          description: Payments unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      decline_code:
                        type: string
                      month_spent_cents:
                        type: integer
                      monthly_cap_cents:
                        type: integer
                      idempotency_key:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      description: A link where a person saves the card agents charge. The monthly cap you ask for is printed on that page; nothing changes until they finish.
      operationId: postV1MeCreditsPaymentMethod
      x-operation-id-source: derived
  /v1/me/credits/top-ups:
    post:
      tags:
      - Credits
      summary: Buy a pack of photo credits with the saved card
      security:
      - bearerApiKey: []
      parameters:
      - schema:
          type: string
        required: false
        name: Idempotency-Key
        in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                photos:
                  anyOf:
                  - type: number
                    enum:
                    - 50
                  - type: number
                    enum:
                    - 250
                  - type: number
                    enum:
                    - 1000
              required:
              - photos
              additionalProperties: false
      responses:
        '200':
          description: Charged and credited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTopUp'
        '202':
          description: Charged; the credit lands when the payment settles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTopUp'
        '400':
          description: '`photos` is not 50, 250 or 1000, or `Idempotency-Key` is empty or over 200 characters.'
        '401':
          description: The session or secret API key is invalid.
        '402':
          description: '`spend_cap_exceeded`, `card_declined` or `card_requires_authentication`. Nothing was charged.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      decline_code:
                        type: string
                      month_spent_cents:
                        type: integer
                      monthly_cap_cents:
                        type: integer
                      idempotency_key:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '403':
          description: A person needs billing rights; a secret API key always may.
        '409':
          description: '`payment_method_required`: no card saved, or the saved one is gone. `idempotency_key_reused`: the key belongs to a different purchase.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      decline_code:
                        type: string
                      month_spent_cents:
                        type: integer
                      monthly_cap_cents:
                        type: integer
                      idempotency_key:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '503':
          description: '`payment_status_unknown`: Stripe did not answer and the card may have been charged; retry with the `idempotency_key` in the body, which charges at most once. `payments_unavailable`: nothing was attempted.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      decline_code:
                        type: string
                      month_spent_cents:
                        type: integer
                      monthly_cap_cents:
                        type: integer
                      idempotency_key:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      description: Buy 50, 250 or 1000 photos with the saved card, no human needed. Send an `Idempotency-Key` to retry safely.
      operationId: postV1MeCreditsTopUps
      x-operation-id-source: derived
components:
  schemas:
    CreditTopUp:
      type: object
      properties:
        status:
          type: string
          enum:
          - succeeded
          - processing
        photos:
          type: integer
        amount_cents:
          type: integer
        payment_id:
          type: string
        balance_cents:
          type: integer
      required:
      - status
      - photos
      - amount_cents
      - payment_id
    Credits:
      type: object
      properties:
        balance_cents:
          type: integer
        photos_available:
          type: integer
          minimum: 0
        price_per_photo_cents:
          type: integer
        packs:
          type: array
          items:
            type: object
            properties:
              photos:
                type: integer
              amount_cents:
                type: integer
            required:
            - photos
            - amount_cents
        payment_method:
          type:
          - object
          - 'null'
          properties:
            brand:
              type: string
            last4:
              type: string
        monthly_cap_cents:
          type:
          - integer
          - 'null'
        month_spent_cents:
          type: integer
        plan:
          type: object
          properties:
            tier:
              type: string
              enum:
              - free
              - pro
              - enterprise
            photos_included:
              type:
              - integer
              - 'null'
              minimum: 0
              description: Photos the plan includes this period; null when unlimited.
            photos_used:
              type: integer
              minimum: 0
            photos_left:
              type:
              - integer
              - 'null'
              minimum: 0
            renews_at:
              type:
              - string
              - 'null'
              description: When the included photos renew; null when the plan includes nothing now.
          required:
          - tier
          - photos_included
          - photos_used
          - photos_left
          - renews_at
          description: The photos the plan includes, used before any credit.
        photos_left:
          type:
          - integer
          - 'null'
          minimum: 0
          description: 'Photos the account can still capture: free ones left plus what the credits buy. null when the account has no capture limit.'
      required:
      - balance_cents
      - photos_available
      - price_per_photo_cents
      - packs
      - payment_method
      - monthly_cap_cents
      - month_spent_cents
      - plan
      - photos_left
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: rk_secret_<key>
      description: 'Secret API key, created in the dashboard under Settings → API. Send it as `Authorization: Bearer rk_secret_…` from your server only. Publishable keys (`pk_live_…`) are for the native SDKs and reach the capture endpoints alone. An unknown key returns 401.'