Get pixel
Answers a transparent 1x1 GIF and records one page view for the project whose publishable key names the address.
GET /v1/event/pixel/{key}
| Address | https://api.hanzo.ai/v1/event/pixel/{key} |
| Method | GET |
| Operation | get_event_pixel_by_key |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers a transparent 1x1 GIF and records one page view for the project whose publishable key names the address:
<img src="https://api.hanzo.ai/v1/event/pixel/pk-….gif" alt="" width="1" height="1">
The page is ?u= when given, else the Referer. The visitor is stamped from the request like every event, is one visitor for a day, and carries no cookie. Do-not-track and a developer's own machine record nothing. The image is answered whatever happened to the view, with no-store.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Response
| Status | Body | Meaning |
|---|---|---|
2XX | string | Success |
2XX body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
(body) | body | string (binary) | yes |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, EventApi } from 'hanzoai';
const api = new EventApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEventPixelByKey({ key: 'key' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EventApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EventApi(client).get_event_pixel_by_key(key='key')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.EventAPI.GetEventPixelByKey(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, event_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = event_api::get_event_pixel_by_key(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EventApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new EventApi(client).getEventPixelByKey();curl https://api.hanzo.ai/v1/event/pixel/<key> \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches event through the event tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_event_economic"
}
}
}'