Market API
Manage seller availability and the upstream provider connections that supply marketplace capacity.
Base path
/api/marketplaceAuthentication
Bearer dashboard token or personal access token
Response envelope
Successful requests return a consistent envelope. The endpoint examples below show only the data field.
{
"success": true,
"message": "",
"data": { ... }
}/statusGet market status
Returns the current seller lifecycle state and counts for enabled connections and offers.
{
"status": "active",
"active_connections": 2,
"active_offers": 6,
"updated_at": 1786345200
}/statusUpdate market status
Set the seller lifecycle state to active or paused.
Pausing disables every active offer and removes enabled connections from routing. Connections remain saved and return to routing when the market is active.
{
"status": "paused"
}{
"seller_id": 12,
"status": "paused",
"created_at": 1786345000,
"updated_at": 1786345200
}/providersList available providers
Returns the provider types the authenticated user may connect. Admin-only provider types are omitted for standard users.
[
{
"id": "openai",
"name": "OpenAI",
"base_url_required": false,
"admin_only": false
},
{
"id": "anthropic",
"name": "Anthropic",
"base_url_required": false,
"admin_only": false
},
{
"id": "gemini",
"name": "Google Gemini",
"base_url_required": false,
"admin_only": false
}
]/summaryGet seller summary
Returns connections, offers, capacity, and settled provider earnings for the authenticated seller.
{
"connections": [ ... ],
"offers": [ ... ],
"metrics": {
"active_connections": 2,
"active_offers": 6,
"reserved_capacity_micros": 12500000,
"used_capacity_micros": 87000000,
"this_month_earnings_micros": 6240000,
"lifetime_earnings_micros": 18425000
}
}/pricing?models=claude-sonnet-4-5&models=gpt-4oGet reference pricing
Returns configured input and output prices for the requested model IDs. Pass the models query parameter once for each model.
{
"pricing": {
"claude-sonnet-4-5": { "input": 3, "output": 15 },
"gpt-4o": { "input": 1.25, "output": 10 }
}
}/connectionsList connections
Returns every provider connection owned by the authenticated user. Credentials are never included.
[
{
"id": 18,
"channel_id": 42,
"provider": "anthropic",
"name": "Production Anthropic",
"models": "claude-sonnet-4-5,claude-opus-4-1",
"base_url": null,
"enabled": true,
"validation_status": "validated",
"monthly_limit_micros": 100000000,
"daily_limit_micros": 5000000
}
]/connections/:idGet a connection
Returns one owned provider connection by its marketplace connection ID.
{
"id": 18,
"channel_id": 42,
"provider": "anthropic",
"name": "Production Anthropic",
"models": "claude-sonnet-4-5,claude-opus-4-1",
"base_url": null,
"enabled": true,
"validation_status": "validated",
"monthly_limit_micros": 100000000,
"daily_limit_micros": 5000000
}/connectionsCreate a connection
Creates an owned provider channel and validates the connection configuration.
OpenAI-compatible connections additionally require base_url and are limited to administrator accounts.
{
"name": "Production Anthropic",
"provider": "anthropic",
"credential": "your-provider-api-key",
"models": "claude-sonnet-4-5,claude-opus-4-1"
}{
"id": 18,
"channel_id": 42,
"provider": "anthropic",
"name": "Production Anthropic",
"models": "claude-sonnet-4-5,claude-opus-4-1",
"base_url": null,
"enabled": true,
"validation_status": "validated",
"monthly_limit_micros": 100000000,
"daily_limit_micros": 5000000
}/connections/:idUpdate a connection
Updates only the provided fields. Supported fields are name, models, credential, base_url, enabled, monthly_limit_micros, and daily_limit_micros.
Disabling a connection also disables its active offers. A new credential is accepted but is never returned.
{
"enabled": false,
"monthly_limit_micros": 100000000,
"daily_limit_micros": 5000000
}{
"id": 18,
"channel_id": 42,
"provider": "anthropic",
"name": "Production Anthropic",
"models": "claude-sonnet-4-5,claude-opus-4-1",
"base_url": null,
"enabled": true,
"validation_status": "validated",
"monthly_limit_micros": 100000000,
"daily_limit_micros": 5000000
}/connections/:idDelete a connection
Deletes the connection, its marketplace offers, and the owned upstream channel.
null/offersCreate an offer
Offers one model from an enabled seller connection at a percentage of the configured retail price.
capacity_micros set to 0 means unlimited capacity. The model must be enabled on the referenced channel, and the seller must be active.
{
"channel_id": 42,
"model": "claude-sonnet-4-5",
"retail_micros": 3000000,
"retail_percent": 72,
"capacity_micros": 100000000
}{
"id": 91,
"channel_id": 42,
"seller_id": 12,
"model": "claude-sonnet-4-5",
"retail_micros": 3000000,
"retail_percent": 72,
"price_micros": 2160000,
"capacity_micros": 100000000,
"reserved_micros": 0,
"status": 1
}/offers/:idUpdate an offer
Updates the offer retail percentage, capacity, or both.
A finite capacity cannot be reduced below the amount currently reserved.
{
"retail_percent": 68,
"capacity_micros": 150000000
}{
"id": 91,
"channel_id": 42,
"seller_id": 12,
"model": "claude-sonnet-4-5",
"retail_micros": 3000000,
"retail_percent": 68,
"price_micros": 2040000,
"capacity_micros": 100000000,
"reserved_micros": 0,
"status": 1
}/offers/:id/statusSet offer status
Enables or disables an owned marketplace offer.
An offer can only be enabled while both the seller lifecycle and its connection are active.
{
"enabled": false
}{
"id": 91,
"channel_id": 42,
"seller_id": 12,
"model": "claude-sonnet-4-5",
"retail_micros": 3000000,
"retail_percent": 72,
"price_micros": 2160000,
"capacity_micros": 100000000,
"reserved_micros": 0,
"status": 2
}/offers/:idDelete an offer
Permanently deletes an offer owned by the authenticated seller.
null/incomeList provider earnings
Returns settled provider ledger entries in reverse chronological order with current-month and lifetime earnings in micros. Pending reservations are excluded.
{
"entries": [ ... ],
"total_micros": 18425000,
"this_month_micros": 6240000
}/usageGet seller usage
Aggregates request and token usage by model and seller channel.
{
"usage": [
{
"model_name": "claude-sonnet-4-5",
"request_count": 84,
"prompt_tokens": 126400,
"completion_tokens": 41800,
"total_tokens": 168200,
"channel_id": 42
}
]
}