API test environment
Test your integration with a TEST key and the test API address. Learn how simulated checks, isolated data and the production environment differ.
On this page
This guide applies to the test environment. Use a TEST key and /public-api-test/v1 throughout. The examples simulate results; they do not run live generation or charge the production account.
API sandbox
The sandbox sends requests only to the test API. Data is isolated from live projects; checks and AI results are simulated without real charges. The key stays in memory until the page closes; code examples use YOUR_TEST_API_KEY.
https://app.labrika.com/public-api-test/v1
To access the sandbox, ask an administrator to grant the permissions public-api.show and public-api-sandbox.show.
Removing either permission also blocks requests made with previously issued TEST keys.
- Open the sandbox and create a test key. Save it: the server shows the secret only on creation or rotation. After reloading, paste the saved key or rotate it. A live key will not work here. Start with GET /me.
- Select an endpoint and a test project, or a site and search engine. Fill in starred fields. Dates accept last or comma-separated collected_at values. For URLs and rules, request the lists first and use IDs from the response. Edit parameters and JSON before sending; the server checks permissions and limits.
- For a report, call reports/cost, then prepare reports/run: cost_estimate_id is filled from the response. For AI, estimate the cost, create a document, then read it by document_id. Preparing the next step sends nothing; execute it separately. Check pending states with another GET; the sandbox does not run AI or fetch the real website.
- For 401, check the test key; for 403, the scope; for 404, the ID and latest reset; for 409, Idempotency-Key and the body. For 429, wait for Retry-After. For product descriptions, title=sandbox:product_not_recognized simulates an immediate 422; sandbox:async_product_not_recognized and sandbox:product_description_failed simulate an error after pending. Test product documents remain available until reset, for at most 7 days.
- Check the HTTP status, Content-Type, X-Request-ID, duration and response size. Copy JSON or download HTML/CSV/PNG. HTML is shown as text and never executed. Successful deletion returns 204 with an empty body. Code examples match the current form parameters; replace YOUR_TEST_API_KEY before running them outside the browser.
For a retry, keep the same Idempotency-Key and request body. Change the key for a separate new operation. A changed body with the previous key may return 409. Requests are never retried automatically.
Cancel stops waiting in the browser but does not guarantee cancellation on the server. Keep the same Idempotency-Key when retrying.
Resetting the sandbox restores the initial test data. Test URLs, rules, reports and documents you created become unavailable. Obtain new identifiers after a reset; production data is unchanged.
