Sandbox tokens let you test your integration without real provider calls and at no cost. Requests made with a sandbox token return simulated data, so you can build and validate your workflow before going to production.
When you use a sandbox token, Eden AI returns mock responses that match the real response structure. This means your code works the same way in development and production — you just swap the token.
A common pattern is to create one sandbox token per environment and swap to a production token when you go live:
Copy
Ask AI
import os# Use a sandbox token in dev/staging, a real token in productionEDENAI_TOKEN = ( os.getenv("EDENAI_SANDBOX_TOKEN") if os.getenv("ENV") != "production" else os.getenv("EDENAI_API_TOKEN"))headers = {"Authorization": f"Bearer {EDENAI_TOKEN}"}
You can create multiple sandbox tokens — one per app or environment — from the dashboard or via the API with different name values.
Build and iterate on your integration without spending credits.
CI/CD Pipelines
Run automated tests against the API without incurring costs.
Demos
Show your integration to stakeholders with predictable responses.
Prototyping
Validate your architecture and request flow before going live.
Sandbox tokens return simulated data. The response structure matches production responses, but the actual content is mock data. Do not use sandbox tokens to evaluate model quality or accuracy.