API reference

API reference · Account

Apply to serve inference

POST/api/marketplace/providerSigned in session

One live application or provider per account. The operator approves it at /admin/marketplace; nothing reaches an endpoint before it is verified. Same origin. A 404 while the operator has the marketplace off.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
namerequiredstringAt most 80 characters.
base_urlrequiredstringAn OpenAI compatible base URL over https whose host resolves only to public addresses; requests go to <base_url>/chat/completions through the outbound guard.
api_keystringSent to the endpoint as a bearer token; stored encrypted, never returned.
payout_addressrequiredstring
data_retentionrequiredstringWhat the endpoint keeps. Until the operator verifies it, it counts as collects, which the default house data policy (deny) never routes to. One of "collects", "none", "zdr".
endpointsrequiredarray of object
endpoints[].upstream_modelrequiredstringThe id the provider's endpoint answers to.
endpoints[].model_idrequiredstringThe catalog id the endpoint serves, or a new vendor/model id for a model only marketplace providers serve (listed in the catalog once verified).
endpoints[].namestringA new listing's display name.
endpoints[].context_lengthintegerAt least 1024.
endpoints[].input_price_per_1mrequirednumberDollars per 1M input tokens. At least 0.
endpoints[].output_price_per_1mrequirednumberDollars per 1M output tokens. At least 0.
endpoints[].toolsbooleanDeclares tool calling; verification measures it.
endpoints[].jsonbooleanDeclares JSON output; verification measures it.

Example

{
  "name": "string",
  "base_url": "string",
  "payout_address": "string",
  "data_retention": "collects",
  "endpoints": [
    {
      "upstream_model": "string",
      "model_id": "string",
      "input_price_per_1m": 0,
      "output_price_per_1m": 0
    }
  ]
}

Answer 201

The record.

Fields of the 201 answer
FieldTypeWhat it is
providerobject or null
provider.providerobject
provider.provider.idinteger
provider.provider.namestring or null
provider.provider.base_urlstring or null
provider.provider.has_api_keyboolean
provider.provider.payout_addressstring or null
provider.provider.data_retentionstringOne of "collects", "none", "zdr".
provider.provider.retention_verifiedboolean
provider.provider.statusstringOne of "pending", "approved", "rejected", "suspended", "withdrawn", "erased".
provider.provider.status_reasonstring or null
provider.provider.created_atinteger
provider.endpointsarray of object
provider.endpoints[].idinteger
provider.endpoints[].model_idstring
provider.endpoints[].upstream_modelstring
provider.endpoints[].namestring or null
provider.endpoints[].context_lengthinteger or null
provider.endpoints[].input_price_per_1mnumber
provider.endpoints[].output_price_per_1mnumber
provider.endpoints[].toolsboolean
provider.endpoints[].jsonboolean
provider.endpoints[].statusstringOne of "pending", "verified", "paused", "removed".
provider.endpoints[].status_reasonstring or null
provider.endpoints[].ttft_msinteger or null
provider.endpoints[].qualitynumber or nullTask probes passed, 0 to 1.
provider.endpoints[].tools_okboolean or null
provider.endpoints[].json_okboolean or null
provider.endpoints[].verified_atinteger or null
provider.endpoints[].checked_atinteger or null
provider.earningsobjectMicro USD: owed is every accrual (the provider's price times each settled request's tokens), paid is every payout the operator recorded, balance the difference.
provider.earnings.owed_microsinteger
provider.earnings.paid_microsinteger
provider.earnings.balance_microsinteger
provider.trafficarray of objectThe last 30 days, by UTC day.
provider.traffic[].daystring
provider.traffic[].requestsinteger
provider.traffic[].prompt_tokensinteger
provider.traffic[].completion_tokensinteger
provider.traffic[].owed_microsinteger
provider.checksarray of objectThe newest verification checks.
provider.checks[].endpoint_idinteger
provider.checks[].kindstringOne of "latency", "tools", "json", "code", "extract", "reason", "correctness", "usage".
provider.checks[].okboolean or null
provider.checks[].msinteger or null
provider.checks[].detailstring or null
provider.checks[].atinteger
provider.payoutsarray of object
provider.payouts[].microsinteger
provider.payouts[].tx_hashstring
provider.payouts[].chainstring or null
provider.payouts[].atinteger

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.
  • 409OpenAI shaped error.
  • 413OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter