Download the PHP package redeyed/sdk without Composer
On this page you can find all versions of the php package redeyed/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description Official Redeyed API client for PHP — AI tools, Sentinel human verification & IP reputation. Free to install; requires a Redeyed API key to activate.
License MIT
Homepage https://redeyed.com/developers
Informations about the package sdk
redeyed/sdk (PHP)
Official PHP client for the Redeyed API — AI creator tools, Sentinel human verification & IP reputation. Dependency‑free (uses cURL), works in any PHP project or CMS.
Free to install. Activated by your API key. The client refuses to run without a Redeyed API key (used for the AI, IP‑reputation and account endpoints). Create one in your Laboratory panel under Developer → API Keys.
Sentinel captcha verification does NOT use a developer API key. Like reCAPTCHA/Turnstile, each site has its own Site Key (public, renders the widget) and Secret Key (verifies server‑side). Grab both from the Redeyed Lab under Sentinel → Sites — the Secret Key is shown once.
Install
Requires PHP 8.1+ with the curl and json extensions.
Quick start
Methods
| Method | Endpoint | Scope |
|---|---|---|
me() |
GET /me |
account:read |
ip(?string $ip) |
GET /ip/{ip?} |
sentinel:ip |
verify(string $token, ?string $remoteIp = null) |
POST /sentinel/siteverify |
Site Secret Key |
aiChat(array $params) |
POST /ai/chat |
ai:chat |
aiParaphrase(array $params) |
POST /ai/paraphrase |
ai:paraphrase |
aiImage(array $params) |
POST /ai/image |
ai:image |
kmsCreateKey($alias, $type, $description) |
POST /kms/keys |
kms:keys |
kmsKeys() |
GET /kms/keys |
kms:keys |
kmsKey($alias) |
GET /kms/keys/{alias} |
kms:keys |
kmsRotate($alias) |
POST /kms/keys/{alias}/rotate |
kms:keys |
kmsEncrypt($alias, $plaintext, $aad) |
POST /kms/keys/{alias}/encrypt |
kms:encrypt |
kmsDecrypt($alias, $ciphertext, $aad) |
POST /kms/keys/{alias}/decrypt |
kms:decrypt |
kmsDataKey($alias, $bytes) |
POST /kms/keys/{alias}/data-key |
kms:encrypt |
kmsDecryptDataKey($alias, $wrappedKey) |
POST /kms/keys/{alias}/data-key/decrypt |
kms:decrypt |
kmsSign($alias, $message) |
POST /kms/keys/{alias}/sign |
kms:sign |
kmsVerify($alias, $message, $signature) |
POST /kms/keys/{alias}/verify |
kms:sign |
Each returns the unwrapped data array, or throws RedeyedException on an error response.
Encryption (KMS)
Managed-key encryption over the developer API — grant your key the kms:* scopes. Redeyed holds the key material; you call the API to use a key.
Rotate a symmetric key with kmsRotate('orders') — the key version is embedded in every ciphertext, so data encrypted before the rotation still decrypts. Full reference: https://redeyed.com/docs.
Sentinel captcha verification
No developer API key is involved. Each site gets a Site Key and a Secret Key from the Redeyed Lab under Sentinel → Sites (the Secret Key is shown once).
- Site Key — public. Render the widget with it on your page.
- Secret Key — private. Verifies the token server‑side. Pass it as the
secret_keyoption (or setSENTINEL_SECRET_KEY).
verify() POSTs {"secret": "…", "response": "<token>", "remoteip": "<ip>"} to POST /sentinel/siteverify (no X-Api-Key header). The response is:
Verification passes when success === true.
Proxy-aware remoteip. Because verification is a server-to-server call, the visitor's IP is sent as remoteip so the token is matched against the IP that actually solved the challenge — otherwise Sentinel sees your server's IP and the token never matches ("verified but the form fails" behind proxies/CDNs). When you don't pass an IP, verify() auto-detects one via Client::clientIp(), preferring CF-Connecting-IP, then the first X-Forwarded-For entry, then X-Real-IP, then REMOTE_ADDR (each validated as a real IP). Forwarded headers are client-spoofable, so only rely on them behind a proxy/CDN that sets them; pass an explicit IP to verify($token, $ip) to bypass detection. If no Secret Key is configured, verify() fails open (returns success => true, outcome => 'skipped_no_secret') so a mis‑configured deploy never locks users out — use hasSecret() to check whether it's actually wired up.
Configuration
License
MIT © Redeyed Corporation. Support: [email protected]
All versions of sdk with dependencies
ext-curl Version *
ext-json Version *