HomeDocumentation

Documentation

Everything you need to integrate Mercatus into your workflow.

Quick Start

Get up and running with Mercatus API in under 5 minutes. Our API is compatible with the OpenAI SDK, making migration seamless.

1Get Your API Key

Sign up at Mercatus and navigate to your Account Dashboard → API Keys to generate a new key.

2Install the SDK

# Using npm npm install gpu-exchanges # Using pip pip install gpu-exchanges # Or use the OpenAI SDK with our base URL npm install openai

3Make Your First Request

import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.mercatus.com/v1", apiKey: "sk-yotta-your-api-key", }); const response = await client.chat.completions.create({ model: "deepseek/deepseek-r1", messages: [{ role: "user", content: "Hello!" }], }); console.log(response.choices[0].message.content);

The API is fully compatible with the OpenAI SDK. Just change the base URL and API key.

4Python Example

from openai import OpenAI client = OpenAI( base_url="https://api.mercatus.com/v1", api_key="sk-yotta-your-api-key", ) response = client.chat.completions.create( model="anthropic/claude-3.5-sonnet", messages=[{"role": "user", "content": "Explain GPU pricing"}], ) print(response.choices[0].message.content)