Agent Verification Endpoint
In rare cases, you may need to validate access directly, for example at the WAF or CDN level. When this is the case, you can let the agent access your server, and call the Fastlane Agent Verification Endpoint to validate access and collect the access fee.
Every time your content is accessed, you should check the presence of an X-Fastlane-Token header in the request.
If this header is present, you can call the Agent Verification Endpoint to establish whether the agent has access to your content:
GET https://api.toolhouse.ai/v1/fastlane/verify?token=(agent's X-Fastlane-Token)
Based on the agent's status, the endpoint will respond with one of following HTTP status code.
HTTP 200: the agent has been validated by Fastlane and can access the content and can pay for access
HTTP 401: invalid agent or Fastlane token
HTTP 402: the agent is valid, but it doesn't have sufficient funds to access your content
Note: the endpoint will respond with an empty body.
Serving responses or blocking requests
You should serve the human version of your content if you don't receive a X-Fastlane-Token header.
If you receive a Fastlane header, call the Agent verification endpoint, then check the HTTP response from the Fastlane endpoint.
You can serve content or no content based on the response from the Fastlane endpoint:
200
The agent has been validated by Fastlane and the toll has been collected
Serve the agentic version of your website (e.g. Markdown or plaintext)
401
Invalid agent or token, or the agent is not authorize to access your content
Serve an error message or no content
402
The agent is valid, but it doesn't have sufficient funds to access your content
Serve an error message or no content
We created a Cloudflare worker that allows you to skip the implementation of this process. The worker will do the following:
It will call the Fastlane verification endpoint for you
It will verify whether the agent can pay for access
It will collect the access toll and deposit it to your account
It will convert your HTML content into Markdown
Last updated