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. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Markifact Credits API
version: 1.0.0
description: API for managing Markifact workspace connections.
servers:
- url: https://api.markifact.com
security:
- bearerAuth: []
tags:
- name: Credits
paths:
/v1/credits:
get:
operationId: getCreditBalance
summary: Get credit balance
description: Current credit balance for the team.
tags:
- Credits
responses:
'200':
description: Balance returned.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditBalance'
'401':
description: Invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Team not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/credits/logs:
get:
operationId: listCreditLogs
summary: List credit logs
description: List the team's credit charges, newest first. Not truncated by plan.
tags:
- Credits
parameters:
- name: service_type
in: query
required: false
schema:
type: string
enum:
- workflow
- agent
- copilot
- mcp
description: Filter by what was charged.
- name: service_id
in: query
required: false
schema:
type: string
description: Charges from one workflow, conversation, or MCP server.
- name: user_id
in: query
required: false
schema:
type: string
description: Charges triggered by one team member.
- name: created_after
in: query
required: false
schema:
type: integer
format: int64
minimum: 0
description: Only charges at or after this Unix second.
- name: created_before
in: query
required: false
schema:
type: integer
format: int64
minimum: 0
description: Only charges at or before this Unix second.
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 1000
default: 25
description: Entries per page. The ceiling is higher than on other resources because ledger entries carry no payloads.
- name: cursor
in: query
required: false
schema:
type: string
description: The next_cursor from the previous page. Keep every other filter unchanged while paging.
responses:
'200':
description: Credit logs returned.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditLogPage'
'400':
description: Invalid cursor.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
CreditService:
type: object
properties:
type:
type: string
enum:
- workflow
- agent
- copilot
- mcp
description: What was charged.
id:
type:
- string
- 'null'
description: The workflow, conversation, or MCP server charged. Matches source.id on operation logs.
name:
type:
- string
- 'null'
description: Name at the time of the charge, not the parent's current name.
required:
- type
LogUser:
type: object
properties:
id:
type:
- string
- 'null'
description: Markifact user ID.
email:
type:
- string
- 'null'
description: Email of the team member who ran the operation.
CreditLog:
type: object
properties:
id:
type: integer
description: Ledger entry ID.
credits_used:
type: integer
description: Credits this charge consumed.
credits_remaining:
type: integer
description: 'Balance immediately after this charge. A snapshot, not a running total: renewals reset the balance without writing an entry.'
service:
$ref: '#/components/schemas/CreditService'
user:
$ref: '#/components/schemas/LogUser'
created_at:
type: integer
format: int64
example: 1784874205
description: Charge time in Unix seconds.
required:
- id
- credits_used
- credits_remaining
- service
- user
- created_at
CreditLogPage:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CreditLog'
has_more:
type: boolean
description: Whether more entries match beyond this page.
next_cursor:
type:
- string
- 'null'
description: Pass back as `cursor` to fetch the next page. Null on the last page.
required:
- data
- has_more
Error:
type: object
properties:
detail: {}
CreditBalance:
type: object
properties:
credits_limit:
type: integer
description: Credits included in the plan for the current period.
credits_used:
type: integer
description: Credits consumed so far this period.
credits_remaining:
type: integer
description: 'credits_limit minus credits_used. Can be negative: a run that overshoots is not rolled back.'
billing_period_end:
type:
- integer
- 'null'
format: int64
description: When the period ends and usage resets, in Unix seconds.
tier:
type: string
description: Current plan.
required:
- credits_limit
- credits_used
- credits_remaining
- tier
securitySchemes:
bearerAuth:
type: http
scheme: bearer