robosystems-ai Credits API
🪙 Credits - Manage credit-based usage and allocation
🪙 Credits - Manage credit-based usage and allocation
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/robosystems-ai:robosystems-ai-credits-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: RoboSystems Credits API
description: 'The REST and GraphQL API for RoboSystems — an open-source, AI-native platform for accounting, financial reporting and investment management. It powers RoboLedger and RoboInvestor.
## Two surfaces
**Platform** — `/v1/…` — graphs, queries, schema, documents, search, memory, connections, billing and access. Reads are REST `GET`s; every write is a named operation at `/operations/{name}` returning an `OperationEnvelope`, accepting an `Idempotency-Key`, and streaming progress at `/v1/operations/{id}/stream`.
→ API reference
**Extensions** — `/extensions/…` — RoboLedger and RoboInvestor, scoped by `graph_id` in the URL. Reads are GraphQL at `POST /extensions/{graph_id}/graphql` and change nothing; writes are named operations at `/extensions/{domain}/{graph_id}/operations/{name}`; analytical views read the materialized graph.
→ Extensions reference · every GraphQL query
## Authenticating
`X-API-Key: rfs…` on REST, GraphQL and per-graph MCP. Browser sessions use JWTs from `POST /v1/auth/login`. The graph-agnostic MCP endpoint `/v1/mcp` takes OAuth 2.1 bearer tokens only.
## Connecting an AI client
Every graph is an MCP server at `POST /v1/graphs/{graph_id}/mcp`, and `POST /v1/mcp` serves OAuth clients that pick their graph at consent.
→ MCP guide
## Clients
`robosystems-client` for Python, `@robosystems/client` for TypeScript.
→ Guides · Technical docs'
version: 1.20.6
tags:
- name: Credits
description: 🪙 Credits - Manage credit-based usage and allocation
paths:
/v1/graphs/{graph_id}/credits:
get:
tags:
- Credits
summary: Get Credit Summary
operationId: getCreditSummary
security:
- APIKeyHeader: []
- BearerAuth: []
parameters:
- name: graph_id
in: path
required: true
schema:
type: string
pattern: ^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$
description: Graph database identifier
title: Graph Id
description: Graph database identifier
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreditSummaryResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/graphs/{graph_id}/credits/transactions:
get:
tags:
- Credits
summary: List Credit Transactions
operationId: listCreditTransactions
security:
- APIKeyHeader: []
- BearerAuth: []
parameters:
- name: graph_id
in: path
required: true
schema:
type: string
pattern: ^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$
description: Graph database identifier
title: Graph Id
description: Graph database identifier
- name: transaction_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by transaction type (allocation, consumption, bonus, refund)
examples:
- consumption
title: Transaction Type
description: Filter by transaction type (allocation, consumption, bonus, refund)
- name: operation_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by operation type (e.g., entity_lookup, cypher_query)
title: Operation Type
description: Filter by operation type (e.g., entity_lookup, cypher_query)
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Start date for filtering (ISO format: YYYY-MM-DD)'
title: Start Date
description: 'Start date for filtering (ISO format: YYYY-MM-DD)'
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'End date for filtering (ISO format: YYYY-MM-DD)'
title: End Date
description: 'End date for filtering (ISO format: YYYY-MM-DD)'
- name: limit
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: Maximum number of transactions to return
default: 100
title: Limit
description: Maximum number of transactions to return
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Number of transactions to skip
default: 0
title: Offset
description: Number of transactions to skip
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedTransactionsResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
CreditSummaryResponse:
properties:
graph_id:
type: string
title: Graph Id
graph_tier:
type: string
title: Graph Tier
current_balance:
type: number
title: Current Balance
monthly_allocation:
type: number
title: Monthly Allocation
consumed_this_month:
type: number
title: Consumed This Month
transaction_count:
type: integer
title: Transaction Count
usage_percentage:
type: number
title: Usage Percentage
last_allocation_date:
anyOf:
- type: string
- type: 'null'
title: Last Allocation Date
type: object
required:
- graph_id
- graph_tier
- current_balance
- monthly_allocation
- consumed_this_month
- transaction_count
- usage_percentage
title: CreditSummaryResponse
description: Credit summary response model.
DetailedTransactionsResponse:
properties:
transactions:
items:
$ref: '#/components/schemas/EnhancedCreditTransactionResponse'
type: array
title: Transactions
summary:
additionalProperties:
$ref: '#/components/schemas/TransactionSummaryResponse'
type: object
title: Summary
total_count:
type: integer
title: Total Count
filtered_count:
type: integer
title: Filtered Count
date_range:
additionalProperties:
type: string
type: object
title: Date Range
type: object
required:
- transactions
- summary
- total_count
- filtered_count
- date_range
title: DetailedTransactionsResponse
description: Detailed response for transaction queries.
EnhancedCreditTransactionResponse:
properties:
id:
type: string
title: Id
type:
type: string
title: Type
amount:
type: number
title: Amount
description:
type: string
title: Description
metadata:
additionalProperties: true
type: object
title: Metadata
created_at:
type: string
title: Created At
operation_id:
anyOf:
- type: string
- type: 'null'
title: Operation Id
idempotency_key:
anyOf:
- type: string
- type: 'null'
title: Idempotency Key
request_id:
anyOf:
- type: string
- type: 'null'
title: Request Id
user_id:
anyOf:
- type: string
- type: 'null'
title: User Id
type: object
required:
- id
- type
- amount
- description
- metadata
- created_at
title: EnhancedCreditTransactionResponse
description: Enhanced credit transaction response with more details.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ErrorResponse:
properties:
detail:
type: string
title: Detail
description: Human-readable error message explaining what went wrong
examples:
- Insufficient credits for operation
code:
anyOf:
- type: string
- type: 'null'
title: Code
description: Machine-readable error code for programmatic handling
examples:
- INSUFFICIENT_CREDITS
request_id:
anyOf:
- type: string
- type: 'null'
title: Request Id
description: Unique request ID for tracking and debugging
examples:
- req_1234567890abcdef
timestamp:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Timestamp
description: Timestamp when the error occurred
examples:
- '2024-01-01T00:00:00Z'
type: object
required:
- detail
title: ErrorResponse
description: Error body returned by every endpoint.
example:
code: RESOURCE_NOT_FOUND
detail: Resource not found
request_id: req_1234567890abcdef
timestamp: '2024-01-01T00:00:00Z'
TransactionSummaryResponse:
properties:
operation_type:
type: string
title: Operation Type
total_amount:
type: number
title: Total Amount
transaction_count:
type: integer
title: Transaction Count
average_amount:
type: number
title: Average Amount
first_transaction:
anyOf:
- type: string
- type: 'null'
title: First Transaction
last_transaction:
anyOf:
- type: string
- type: 'null'
title: Last Transaction
type: object
required:
- operation_type
- total_amount
- transaction_count
- average_amount
title: TransactionSummaryResponse
description: Summary of transactions by operation type.
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key
description: API key for authentication
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT bearer token