Skip to main content
Constructing questions, surveys, and other objects does not require credentials. Generating responses requires access to the selected model. The test model used in the Run your first survey tutorial runs locally without credentials or paid calls.

Choose an execution path

Local execution describes where the job is orchestrated. A locally orchestrated job can still send requests to a remote provider.

Expected Parrot

Log in from a notebook

Run this in a notebook cell:
Follow the sign-in link in the cell output to log in to Expected Parrot. EDSL retrieves your API key, saves it in a local .env file, and makes it available to the current notebook session. You do not need to copy or paste the key. If a valid key is already configured, login() reports the signed-in user. These optional arguments let you sign in again or allow more time to finish:

Use an existing API key

You can also obtain a key from your Expected Parrot account settings and supply it through the EXPECTED_PARROT_API_KEY environment variable or your environment’s secret manager. Keep the key and any .env file containing it private. For automation, configure the environment variable before starting the process. These CLI commands check authentication and connectivity:
Check each JSON response’s status and error details. See Remote execution for running and retrieving a job.

Direct provider access

Configure the selected provider’s key in its environment variable, such as OPENAI_API_KEY for OpenAI or ANTHROPIC_API_KEY for Anthropic. Select current identifiers from the model catalog:
Catalog discovery may require network access. Use Provider configuration for Azure and model-specific parameters. Do not assume every provider supports the same model options. For a job constructed with your selected model, call the provider directly from Python:
These settings run the job from your environment and keep it from using Expected Parrot’s hosted response cache. For a saved job, the CLI alternative is:
See Jobs for constructing a job and Local caching for saving and reusing responses.

Loading a local .env file

If you use a local .env file, exclude it from version control and load it before constructing clients:
The file contains environment variable assignments; use the names above with your own secret values. In Colab, use its Secrets panel instead of embedding keys in cells.

Troubleshooting access

Use ep info for redacted diagnostics. For Expected Parrot, use ep auth status and ep check. For a direct provider, confirm that its key is configured and that the account has access to the selected model. Correct authentication errors before retrying a job.