Introduction to monopole.tech
A documentation hub and SDK reference for working with magnetic monopole detection, simulation, and field analysis at scale.
Overview
The monopole platform provides a unified API for ingesting field data, running detection pipelines, and managing experiment metadata. Whether you are building a small-scale physics simulation or a distributed observatory network, the same primitives apply.
This documentation is organized into four main sections: Getting Started walks you through your first request, API Reference documents every endpoint, Guides covers production patterns, and Examples contains runnable client code.
Start with the Quickstart guide to make your first authenticated request in under five minutes.
Installation
The official client libraries are distributed through standard package managers. Install the SDK that matches your runtime:
# Node.js
npm install @monopole/sdk
# Python
pip install monopole
# Go
go get github.com/monopole-tech/go-sdk
Each client targets the same REST API and shares a consistent resource model. Behavior is identical across runtimes — only the syntax differs.
SDK versions 3.x require API version 2026-01-15 or newer. Pin your API version explicitly in production.
Quickstart
Make your first request by initializing the client with an API key and creating a monopole record. The example below detects a hypothetical monopole event and records its measured flux.
import { Monopole } from '@monopole/sdk';
const client = new Monopole({
apiKey: process.env.MONOPOLE_API_KEY,
apiVersion: '2026-01-15',
});
const event = await client.monopoles.create({
detector: 'det_north_42',
flux: 1.4e-15, // particles per cm^2 per second
charge: 'magnetic',
metadata: { run: 'rn_88a' },
});
console.log(event.id);
If everything is configured correctly, the API returns a monopole resource with a generated identifier and an ISO-8601 timestamp.
{
"id": "mp_01HMR8X9C2",
"object": "monopole",
"detector": "det_north_42",
"flux": 1.4e-15,
"charge": "magnetic",
"created_at": "2026-04-04T22:13:58Z"
}
Use idempotency keys for any write request. Pass Idempotency-Key in the header and the API will safely de-duplicate retries.
Configuration
Client behavior is controlled through a single configuration object. The most common parameters are listed below.
| Parameter | Type | Default | Description |
|---|---|---|---|
apiKey |
string | — | Your secret key. Begin with sk_live_ or sk_test_. |
apiVersion |
string | latest | Pinned API version in YYYY-MM-DD form. |
timeout |
number | 30000 |
Request timeout in milliseconds. |
maxRetries |
number | 3 |
Automatic retries on transient failures. |
baseURL |
string | https://api.monopole.tech |
Override for self-hosted deployments. |
API Reference Overview
The monopole API is organized around RESTful resources and uses predictable URLs, accepts application/json request bodies, returns application/json responses, and uses standard HTTP response codes.
Base URL
https://api.monopole.tech/v3
Authentication
All API requests must be authenticated using an API key sent via the Authorization header. Keys are scoped to a single environment.
Authorization: Bearer sk_live_a1b2c3d4e5f6
The Monopole object
A Monopole represents a recorded detection event. Each event carries field measurements, detector context, and audit metadata.
Create a monopole
Records a new detection event. The flux and detector fields are required.
POST /v3/monopoles
Retrieve a monopole
Returns the monopole resource matching the supplied identifier.
GET /v3/monopoles/{id}
List all monopoles
Returns a paginated list of monopole resources. Pagination is cursor-based, controlled with starting_after and limit.
GET /v3/monopoles?limit=20
Errors
The API uses conventional HTTP response codes. Codes in the 2xx range indicate success, 4xx indicate caller errors, and 5xx indicate platform errors.
| Code | Meaning |
|---|---|
200 | OK — Request succeeded. |
400 | Bad Request — Malformed payload or missing field. |
401 | Unauthorized — Invalid or missing API key. |
404 | Not Found — Resource does not exist. |
409 | Conflict — Idempotency key collision. |
429 | Too Many Requests — Rate limit exceeded. |
500 | Server Error — Something went wrong on our side. |
error.codeError codes are stable across API versions. Use them for branching logic instead of parsing human-readable messages.