curl --request POST \
--url https://api.anchorbrowser.io/v1/agent-access \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"answer": "<string>"
}
'import requests
url = "https://api.anchorbrowser.io/v1/agent-access"
payload = {
"token": "<string>",
"answer": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>', answer: '<string>'})
};
fetch('https://api.anchorbrowser.io/v1/agent-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.anchorbrowser.io/v1/agent-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'answer' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anchorbrowser.io/v1/agent-access"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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.anchorbrowser.io/v1/agent-access")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/agent-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"project_id": "<string>",
"credits_granted": 123,
"auth": {
"api_key_header": "<string>",
"identity_token_required": true,
"identity_token_header": "<string>"
},
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "<string>",
"limits": {
"session_max_duration_minutes": 123
},
"agent_identity_token": "<string>",
"upgrade": {
"message": "<string>"
}
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}Create Agent Access project
Issue an Agent Access API key. Submit the challenge token and computed integer answer
from GET /v1/agent-access/challenge. GET on this path returns a guide, not a key.
Optional identity_token as an OIDC JWT grants more credits. identity_provider is optional
when the JWT iss is Google (https://accounts.google.com), GitHub Actions
(https://token.actions.githubusercontent.com), or Vercel (https://vercel.com).
Returns api_key for header anchor-api-key.
Docs: https://docs.anchorbrowser.io/quickstart/agent-access
curl --request POST \
--url https://api.anchorbrowser.io/v1/agent-access \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"answer": "<string>"
}
'import requests
url = "https://api.anchorbrowser.io/v1/agent-access"
payload = {
"token": "<string>",
"answer": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>', answer: '<string>'})
};
fetch('https://api.anchorbrowser.io/v1/agent-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.anchorbrowser.io/v1/agent-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'answer' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anchorbrowser.io/v1/agent-access"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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.anchorbrowser.io/v1/agent-access")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/agent-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"answer\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"project_id": "<string>",
"credits_granted": 123,
"auth": {
"api_key_header": "<string>",
"identity_token_required": true,
"identity_token_header": "<string>"
},
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "<string>",
"limits": {
"session_max_duration_minutes": 123
},
"agent_identity_token": "<string>",
"upgrade": {
"message": "<string>"
}
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}{
"error": "<string>",
"next": {
"method": "GET",
"path": "<string>",
"description": "<string>"
},
"docs": "https://docs.anchorbrowser.io/quickstart/agent-access"
}Body
Token returned by GET /v1/agent-access/challenge. Not the puzzle answer.
1Final integer from the challenge prompt, as a string.
1Optional when identity_token is an OIDC JWT whose iss matches a known provider (google, github, or vercel). Required for opaque OAuth access tokens (google or github).
OIDC JWT preferred (iss auto-detected). GitHub Actions — GET $ACTIONS_ID_TOKEN_REQUEST_URL with Authorization bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN. Google — ID token JWT. Vercel — Sign in with Vercel user ID token (iss https://vercel.com). Opaque OAuth access tokens also work with identity_provider set.
Optional. Pin the JWT aud claim. Omit unless you requested a specific aud.
Response
API key issued. Follow next to make an authenticated call.
API key for authenticated requests. Send as header anchor-api-key.
Anchor project id created or reused for this onboarding.
Credits added by this POST. 0 when the Agent Access project already existed for this owner.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Human-readable guide URL for Agent Access.
Show child attributes
Show child attributes
When present, send as header anchor-identity-token on later API calls when auth.identity_token_required is true.
Show child attributes
Show child attributes
Was this page helpful?

