curl --request POST \
--url https://api.brandfetch.io/v2/agents/access \
--header 'PAYMENT-SIGNATURE: <api-key>'import requests
url = "https://api.brandfetch.io/v2/agents/access"
headers = {"PAYMENT-SIGNATURE": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'PAYMENT-SIGNATURE': '<api-key>'}};
fetch('https://api.brandfetch.io/v2/agents/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brandfetch.io/v2/agents/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"PAYMENT-SIGNATURE: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.brandfetch.io/v2/agents/access"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("PAYMENT-SIGNATURE", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brandfetch.io/v2/agents/access")
.header("PAYMENT-SIGNATURE", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brandfetch.io/v2/agents/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PAYMENT-SIGNATURE"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
},
"apiKey": {
"id": "<string>",
"key": "<string>",
"name": "Agent Key"
},
"apiClient": {
"clientId": "<string>"
},
"mcp": {
"url": "https://mcp.brandfetch.io/mcp",
"token": "<string>"
},
"credits": {
"granted": 20,
"balance": 20,
"creditsPerUsd": 20,
"usdPaid": 1,
"deduplicated": true
},
"usage": {
"authorization": "Bearer <key>",
"note": "<string>"
},
"topUp": {
"method": "POST",
"url": "<string>",
"note": "<string>"
},
"documentation": "https://docs.brandfetch.com/agents/overview"
}{
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
},
"apiKey": {
"id": "<string>",
"key": "<string>",
"name": "Agent Key"
},
"apiClient": {
"clientId": "<string>"
},
"mcp": {
"url": "https://mcp.brandfetch.io/mcp",
"token": "<string>"
},
"credits": {
"granted": 20,
"balance": 20,
"creditsPerUsd": 20,
"usdPaid": 1,
"deduplicated": true
},
"usage": {
"authorization": "Bearer <key>",
"note": "<string>"
},
"topUp": {
"method": "POST",
"url": "<string>",
"note": "<string>"
},
"documentation": "https://docs.brandfetch.com/agents/overview"
}{
"message": "usd must be a whole number of US dollars between 1 and 500."
}{
"message": "Payment required. Either authenticate with a Brandfetch API key (Authorization: Bearer <key>) or pay for this request with x402: sign the payment described in the PAYMENT-REQUIRED header and retry with a PAYMENT-SIGNATURE header.",
"documentation": "https://docs.brandfetch.com/agents/pay-per-request",
"pricing": {
"route": "GET /v2/brands/*",
"price": "$0.10"
},
"resource": "https://api.brandfetch.io/v2/brands/nike.com",
"standingAccess": "For many requests, POST /v2/agents/access (paid the same way) provisions an API key preloaded with prepaid credits."
}{
"message": "<string>",
"reason": "payment_in_progress",
"paymentReference": "<string>",
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
}
}{
"message": "Provisioning failed after your payment was accepted. Retry this exact request to receive your credential, or contact support with the payment reference.",
"paymentReference": "<string>"
}{
"message": "<string>",
"reason": "payment_outcome_unknown",
"paymentReference": "<string>"
}Buy agent access
Pay a whole number of US dollars to receive a Brandfetch organization, an API key holding 20 prepaid API credits per dollar, and an MCP bearer token. One credit is one Brand API or Brand Context API request. Call once without a payment to receive the 402: its PAYMENT-REQUIRED header is the x402 challenge (USDC on Base), its WWW-Authenticate header the MPP challenges (USDC.e on Tempo, or a card through a Stripe shared payment token). Pay one and repeat the request with the result — PAYMENT-SIGNATURE for x402, Authorization: Payment … for MPP. A wallet owns the organization it buys: paying again from the same wallet adds credits to the same key, and rotateKey=true replaces the key while doing so. A card names no wallet, so each card payment buys its own organization and key. The API key and MCP token are returned once, in the response that completes the purchase, and a payment is never charged twice. A later request carrying the same payment is answered 409 without them: a settled payment is public (an x402 signature is on-chain), so presenting it proves nothing about who sent it. If the purchase is answered with a 500 that says to retry, or with no response at all, retry the exact request at once: the first retry to succeed within three minutes of the payment receives the credential, unless it was already returned in a response the client lost, which is answered 409 credential_already_delivered. The credits are granted whether or not the credential is returned. See https://docs.brandfetch.com/agents/overview.
curl --request POST \
--url https://api.brandfetch.io/v2/agents/access \
--header 'PAYMENT-SIGNATURE: <api-key>'import requests
url = "https://api.brandfetch.io/v2/agents/access"
headers = {"PAYMENT-SIGNATURE": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'PAYMENT-SIGNATURE': '<api-key>'}};
fetch('https://api.brandfetch.io/v2/agents/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brandfetch.io/v2/agents/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"PAYMENT-SIGNATURE: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.brandfetch.io/v2/agents/access"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("PAYMENT-SIGNATURE", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brandfetch.io/v2/agents/access")
.header("PAYMENT-SIGNATURE", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brandfetch.io/v2/agents/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PAYMENT-SIGNATURE"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
},
"apiKey": {
"id": "<string>",
"key": "<string>",
"name": "Agent Key"
},
"apiClient": {
"clientId": "<string>"
},
"mcp": {
"url": "https://mcp.brandfetch.io/mcp",
"token": "<string>"
},
"credits": {
"granted": 20,
"balance": 20,
"creditsPerUsd": 20,
"usdPaid": 1,
"deduplicated": true
},
"usage": {
"authorization": "Bearer <key>",
"note": "<string>"
},
"topUp": {
"method": "POST",
"url": "<string>",
"note": "<string>"
},
"documentation": "https://docs.brandfetch.com/agents/overview"
}{
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
},
"apiKey": {
"id": "<string>",
"key": "<string>",
"name": "Agent Key"
},
"apiClient": {
"clientId": "<string>"
},
"mcp": {
"url": "https://mcp.brandfetch.io/mcp",
"token": "<string>"
},
"credits": {
"granted": 20,
"balance": 20,
"creditsPerUsd": 20,
"usdPaid": 1,
"deduplicated": true
},
"usage": {
"authorization": "Bearer <key>",
"note": "<string>"
},
"topUp": {
"method": "POST",
"url": "<string>",
"note": "<string>"
},
"documentation": "https://docs.brandfetch.com/agents/overview"
}{
"message": "usd must be a whole number of US dollars between 1 and 500."
}{
"message": "Payment required. Either authenticate with a Brandfetch API key (Authorization: Bearer <key>) or pay for this request with x402: sign the payment described in the PAYMENT-REQUIRED header and retry with a PAYMENT-SIGNATURE header.",
"documentation": "https://docs.brandfetch.com/agents/pay-per-request",
"pricing": {
"route": "GET /v2/brands/*",
"price": "$0.10"
},
"resource": "https://api.brandfetch.io/v2/brands/nike.com",
"standingAccess": "For many requests, POST /v2/agents/access (paid the same way) provisions an API key preloaded with prepaid credits."
}{
"message": "<string>",
"reason": "payment_in_progress",
"paymentReference": "<string>",
"organization": {
"id": "<string>",
"urn": "urn:brandfetch:organization:xig9b54wddtihs0dktyhau0i"
}
}{
"message": "Provisioning failed after your payment was accepted. Retry this exact request to receive your credential, or contact support with the payment reference.",
"paymentReference": "<string>"
}{
"message": "<string>",
"reason": "payment_outcome_unknown",
"paymentReference": "<string>"
}402 with both challenges, pay one, and repeat the request with PAYMENT-SIGNATURE or Authorization: Payment …. Pay per request walks through it with code.Authorizations
An x402 payment for this one request: the signed payment for the challenge a bare request receives in its PAYMENT-REQUIRED header. Alternative to the bearer API key. See https://docs.brandfetch.com/agents/pay-per-request.
Query Parameters
Whole US dollars to pay, between 1 and 500. Buys usd × 20 credits.
1 <= x <= 500When true on a top-up, issues a new key holding the combined balance, returned once like any other. The wallet's earlier keys stop working once the new key has been returned, even if the client never receives that response. If the rotation is answered with an error instead of the new key, they keep working. A retry answered 409 credential_already_delivered means the rotation completed: pay again with rotateKey=true for a new key.
Response
Topped up: the wallet already owned an organization. The credential is returned once, in this response.
Show child attributes
Show child attributes
The API key. Returned once, in the response that completes the purchase: store it.
Show child attributes
Show child attributes
The Logo API client, for cdn.brandfetch.io URLs.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"https://docs.brandfetch.com/agents/overview"
Was this page helpful?