Explore›Docs

MAHSHAR DOCUMENTATION

Documentation for theinterfaces that exist today.

Start with the marketplace, provider onboarding, agent discovery, Arc Mainnet x402 contract, purchase access, or Wallet funding flow.

GETTING STARTED

Three implemented entry points

Mahshar provides separate interfaces for people buying API calls, providers listing endpoints, and autonomous clients.

Buy API access

Browse active APIs on the public Marketplace, then open the existing buyer application when you are ready to connect a wallet and make a call.

List an API

The provider flow collects endpoint, method, auth, price, and example data, then uses the existing review and activation path.

Integrate an agent

The agent path starts with the public discovery endpoint, which links the OpenAPI contract and describes each active listing.

AGENT INTEGRATION

Discover first, then follow the selected listing.

The discovery response includes the listing method, proxy URL and style, request metadata, optional schemas and examples, auth type, listed price, payment contract, and response wrapper. Seller upstream URLs and credentials are not part of that public contract.

GET /api/agent/discover → active listings → proxy_url + proxy_style → request + response metadata → Arc Mainnet payment contract → OpenAPI URL GET /api/openapi → application/yaml

PAYMENT, AUTH & ACCESS

The current request contract

These behaviors are declared in the proxy routes, agent discovery response, OpenAPI document, and purchase-access implementation.

x402 v2 payment

  • Probe the intended request without Payment-Signature.
  • Read the base64 PAYMENT-REQUIRED header from the 402 response.
  • Validate and sign the offered Arc Mainnet requirement, then retry the identical request.

Seller endpoint authentication

  • Listings can declare public, API-key, bearer, or query-parameter authentication.
  • Configured seller auth is injected by Mahshar when the proxy calls the upstream endpoint.
  • Buyer-supplied headers are not forwarded upstream.

Purchase access and recovery

  • Paid results include a purchase-access capability for response retrieval.
  • Only a response marked retryable permits an exact proof and request replay.
  • Accounting reconciliation never resettles payment or re-executes the upstream request.

Need help with a product flow?

Use the self-service support topics or contact the verified Mahshar support address.

Go to Support