Agent guides

Use IPMusk from any language

Any tool or language that can send HTTPS requests can use IPMusk. Send your key as a Bearer token to the REST API.

Who this is for

Developers whose language, tool or agent framework has no MCP support.

Anyone who wants to generate a typed client from the OpenAPI schema.

What you need

  • An IPMusk account with a verified email address.
  • An IPMusk API key. Create it in Settings → API keys (/app/settings/api-keys). For typical use tick read and connect. Add support only if the assistant should open tickets, and order only if it should create orders that end in a payment link.
  • The key in an environment variable named IPMUSK_API_KEY, for example export IPMUSK_API_KEY="ipm_live_YOUR_KEY" in your shell profile. The examples below read it from there.

Set it up

The base URL is https://ipmusk.com/api/v1. Send the key in the Authorization header as a Bearer token. Never put it in a URL.

  • GET /me needs read. POST /residential/proxy-url needs connect.
  • Responses wrap the result in data and include a request_id. Quote the request_id when you contact support.
curl
curl https://ipmusk.com/api/v1/me \
  -H "Authorization: Bearer $IPMUSK_API_KEY"

curl -X POST https://ipmusk.com/api/v1/residential/proxy-url \
  -H "Authorization: Bearer $IPMUSK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country":"US","session":"sticky","sticky_minutes":10,"protocol":"http"}'

Python

requests
import os

import requests

BASE_URL = "https://ipmusk.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['IPMUSK_API_KEY']}"}

me = requests.get(f"{BASE_URL}/me", headers=HEADERS, timeout=30)
me.raise_for_status()
print(me.json()["data"])

proxy = requests.post(
    f"{BASE_URL}/residential/proxy-url",
    headers=HEADERS,
    json={"country": "US", "session": "rotating", "protocol": "http"},
    timeout=30,
)
proxy.raise_for_status()
print(proxy.json()["data"]["items"][0]["url"])

Node.js

fetch
const BASE_URL = "https://ipmusk.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.IPMUSK_API_KEY}`,
  "Content-Type": "application/json",
};

const me = await fetch(`${BASE_URL}/me`, { headers });
console.log((await me.json()).data);

const proxy = await fetch(`${BASE_URL}/residential/proxy-url`, {
  method: "POST",
  headers,
  body: JSON.stringify({ country: "US", session: "rotating", protocol: "http" }),
});
console.log((await proxy.json()).data.items[0].url);

Generate a client

The OpenAPI 3.1 schema describes every endpoint. Feed it to a code generator, or import it into a tool that supports OpenAPI, such as a Custom GPT Action.

The full reference, with every endpoint and error code, is at /docs/api.

OpenAPI schema
https://ipmusk.com/api/v1/openapi.json

Check it works

Run the curl GET /me call. A 200 response with your email under data means the key works.

Try these prompts

  • If you wire the API into your own agent, try: Which IPMusk account am I connected as?
  • How much residential traffic do I have left? (GET /residential/usage?days=30)
  • Give me a sticky German proxy URL for 10 minutes. (POST /residential/proxy-url)

If it fails

  • 401 authentication_required: the key is missing, wrong, revoked or expired. Check that IPMUSK_API_KEY is set where the client starts. echo ${#IPMUSK_API_KEY} prints its length without showing the key.
  • 403 forbidden: the key lacks the endpoint's scope, or your email is not verified. Create a new key with the scope.
  • 400 validation_error: the body is not valid. field_errors names the fields that failed.
  • 429 rate_limited: too many calls in one minute (read 60, connect 20, support 30, order 10). Wait a minute and try again.
  • 403 capability_unavailable: the customer API is switched off on this deployment. Contact support.

Remove access

  • Revoke the key in Settings → API keys (/app/settings/api-keys). It stops working at once.
  • Then remove the key from your code's environment or secret store.