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.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/opik-ai-spend-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Opik REST AI Spend API
description: The Opik REST API is currently in beta and subject to change.
contact:
name: Github Repository
url: https://github.com/comet-ml/opik
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: http://localhost:5173/api
description: Local server
- url: https://www.comet.com/opik/api
description: Opik Cloud
tags:
- name: AI Spend
description: Coding-agent spend analytics
paths:
/v1/private/ai-spend/composition:
post:
tags:
- AI Spend
summary: Get spend composition
description: Get coding-agent token-flow composition (Sankey)
operationId: getSpendComposition
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SpendMetricRequest'
responses:
'200':
description: Spend composition
content:
application/json:
schema:
$ref: '#/components/schemas/SpendCompositionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/ai-spend/composition/{laneKey}/breakdown:
post:
tags:
- AI Spend
summary: Get spend lane breakdown
description: Get the per-item breakdown for a composition lane
operationId: getSpendLaneBreakdown
parameters:
- name: laneKey
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SpendMetricRequest'
responses:
'200':
description: Lane breakdown
content:
application/json:
schema:
$ref: '#/components/schemas/SpendBreakdownResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/ai-spend/recommendations:
post:
tags:
- AI Spend
summary: Get spend recommendations
description: Get coding-agent cost-saving recommendations
operationId: getSpendRecommendations
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SpendMetricRequest'
responses:
'200':
description: Recommendations
content:
application/json:
schema:
$ref: '#/components/schemas/SpendRecommendationsResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/ai-spend/summary:
post:
tags:
- AI Spend
summary: Get spend summary
description: Get coding-agent spend KPI summary
operationId: getSpendSummary
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SpendMetricRequest'
responses:
'200':
description: Spend summary
content:
application/json:
schema:
$ref: '#/components/schemas/WorkspaceMetricsSummaryResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/ai-spend/users:
post:
tags:
- AI Spend
summary: Get spend user leaderboard
description: Get coding-agent spend per user
operationId: getSpendUsers
parameters:
- name: page
in: query
schema:
minimum: 1
type: integer
format: int32
default: 1
- name: size
in: query
schema:
maximum: 1000
minimum: 1
type: integer
format: int32
default: 25
- name: sorting
in: query
schema:
type: string
- name: name
in: query
schema:
type: string
description: Filter users by name or email (partial match, case insensitive)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SpendMetricRequest'
responses:
'200':
description: User leaderboard
content:
application/json:
schema:
$ref: '#/components/schemas/SpendUserPage'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
components:
schemas:
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
WorkspaceMetricsSummaryResponse:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Result'
SpendRecommendationsResponse:
type: object
properties:
total_savings_tokens:
type: integer
format: int64
items:
type: array
items:
$ref: '#/components/schemas/Item'
SpendUserPage:
type: object
properties:
page:
type: integer
format: int32
size:
type: integer
format: int32
total:
type: integer
format: int64
content:
type: array
items:
$ref: '#/components/schemas/SpendUserRow'
sortable_by:
type: array
items:
type: string
SpendBreakdownResponse:
type: object
properties:
lane_key:
type: string
title:
type: string
subtitle:
type: string
total_tokens:
type: integer
format: int64
input_tokens:
type: integer
format: int64
cache_read_tokens:
type: integer
format: int64
cache_creation_tokens:
type: integer
format: int64
output_tokens:
type: integer
format: int64
model:
type: string
item_count:
type: integer
format: int32
item_unit:
type: string
items:
type: array
items:
$ref: '#/components/schemas/Item'
HarnessEntry:
type: object
properties:
key:
type: string
label:
type: string
Side:
type: object
properties:
total_tokens:
type: integer
format: int64
lanes:
type: array
items:
$ref: '#/components/schemas/Lane'
Lane:
type: object
properties:
key:
type: string
label:
type: string
total_tokens:
type: integer
format: int64
input_tokens:
type: integer
format: int64
cache_read_tokens:
type: integer
format: int64
cache_creation_tokens:
type: integer
format: int64
output_tokens:
type: integer
format: int64
has_breakdown:
type: boolean
SpendMetricRequest:
required:
- interval_end
- interval_start
type: object
properties:
project_id:
type: string
format: uuid
project_name:
type: string
interval_start:
type: string
format: date-time
interval_end:
type: string
format: date-time
user_id:
pattern: (?s)^\s*(\S.*\S|\S)\s*$
type: string
start_before_end:
type: boolean
project_provided:
type: boolean
SpendUserRow:
type: object
properties:
user_uuid:
type: string
user_email:
type: string
user_display_name:
type: string
model:
type: string
input_tokens:
type: integer
format: int64
cache_read_tokens:
type: integer
format: int64
cache_creation_tokens:
type: integer
format: int64
output_tokens:
type: integer
format: int64
total_tokens:
type: integer
format: int64
requests:
type: integer
format: int64
skills:
type: integer
format: int64
mcps:
type: integer
format: int64
mcp_calls:
type: integer
format: int64
repositories:
type: array
items:
type: string
flags:
type: array
items:
type: string
Result:
type: object
properties:
name:
type: string
current:
type: number
format: double
previous:
type: number
format: double
SpendCompositionResponse:
type: object
properties:
input:
$ref: '#/components/schemas/Side'
harness:
type: array
items:
$ref: '#/components/schemas/HarnessEntry'
output:
$ref: '#/components/schemas/Side'
models:
type: array
items:
type: string
Item:
type: object
properties:
id:
type: string
title:
type: string
body:
type: string
impact:
type: string
enum:
- high
- medium
- low
estimated_savings_tokens:
type: integer
format: int64
docs_url:
type: string
related_lane_key:
type: string