# ORIGOOO AI integration guide API origin: https://orig.ooo Widget module: https://orig.ooo/cdn/widgets/1.4.7/widgets.js OpenAPI: https://orig.ooo/openapi.json ## Add the browser widgets Integrate ORIGOOO widgets into my existing website. Read https://orig.ooo/widget-cdn and https://orig.ooo/docs/widgets first. Load https://orig.ooo/cdn/widgets/1.4.7/widgets.js once as a type="module" script. Add origooo-country-picker and origooo-phone-picker inside my form with names, labels and required states. Use the invisible origooo-language-preselector and origooo-country-blocker for decisions; read https://orig.ooo/docs/language-preselection and https://orig.ooo/docs/country-rules. Use FormData for submission. Preserve my design and customize CSS variables or ::part selectors. For country and calling-code IP detection, use auto-detect, endpoint="https://orig.ooo/v1/ip/me", and the placeholder YOUR_ORIGIN_BOUND_PUBLISHABLE_KEY. Tell me to create a lookup-scoped publishable key for my exact scheme://host[:port]. Do not reuse the orig.ooo demonstration key on another website. Never request or expose a secret key. Keep manual selections when detection finishes. Leave a manual fallback for 403, 429, no-match and unavailable data. Use the country-ranked language suggestion only when no saved visitor preference exists. Wire onResolve callbacks, events or result/data attributes into my own HTML and functions. Country rules should show/hide my own content and explicitly handle unknown countries. Explain that auto-detect components sharing a key and endpoint reuse one metered country request per page load. Return the actual file changes and verify search, keyboard selection, submitted values, styling and failure handling. ## Integrate a server SDK Integrate the ORIGOOO source SDK for my application's actual language. Read https://orig.ooo/docs/sdks and the matching PHP, Python, Java or .NET guide. Download only the linked source archive. Do not invent npm, Composer, pip, Maven or NuGet registry packages. Inspect the downloaded SDK's actual constructor and lookup method. Set the base URL explicitly to https://orig.ooo. Read the secret from the server environment variable ORIGOOO_API_KEY; never ask me to paste its value into this chat or place it in frontend code. Use a bounded timeout and bounded caching. Resolve the visitor IP from the server connection, trusting forwarded headers only from configured proxy CIDRs. A server-side /v1/ip/me lookup identifies the calling server, so look up the validated visitor IP explicitly when that is my intent. Handle null country, a 404 no-match, 401/403, 429 and service failures. If applying a country policy, state my allow/deny/unknown policy explicitly and enforce it on the server. Do not claim IP country proves residence or that a browser message enforces access. Return code, configuration names and meaningful tests. Keep keys and personal request details out of logs. State any runtime verification you could not perform. ## Call the API directly Build a server-side ORIGOOO API integration using https://orig.ooo/openapi.json and https://orig.ooo/docs/ip-lookup. The origin is https://orig.ooo; do not invent an api subdomain. Read ORIGOOO_API_KEY from my server environment. Use GET /v1/ip/{ip} with Authorization: Bearer . Validate a literal public IPv4 or IPv6 address, encode the path segment and set a request timeout. Do not expose the key or build an arbitrary URL proxy. Use only implemented endpoints and response fields. Handle missing/null location and ASN values, preserve source/version/attribution/warnings, and treat the result as approximate. For batch, ASN, comparison or country metadata, read that endpoint's dedicated documentation first and check its scope and plan requirements. Distinguish request-speed rate_limited errors from quota_exceeded. Respect Retry-After when present; use bounded retry/backoff for temporary failures and never retry authentication errors in a loop. Do not assume every error has the same JSON shape or every endpoint returns the same quota headers. Return the implementation, setup instructions without real credentials, and tests covering success, no match, invalid input, throttling and upstream failure. ## Review an existing integration Review my ORIGOOO integration against https://orig.ooo/docs and https://orig.ooo/openapi.json. Check exact API origin, method, path, parameters, authentication scope, browser-origin restrictions and secret placement. Check form-associated widget values, keyboard use, the full widget module URL and the distinction between manual selection and optional IP detection. Test that an in-flight lookup never overwrites a manual choice. Check request timeouts, bounded retries/cache, 429 versus quota exhaustion, null data, source attribution, trusted-proxy handling and unknown-country policy. Check that /v1/ip/me is not incorrectly used server-side to locate an end visitor. Report concrete defects with file locations and fixes. Do not fabricate a successful test or guarantee privacy compliance. Use synthetic fixtures and redact keys and personal IPs.