Skip to main content
Use paid data from specialist Providers in your own application with one Glasser Key and balance. There are two ways to request data: let Glasser select an Endpoint for a supported task, or choose the Endpoint yourself.

Choose how to request data

For example, to get a profile for glasser.ai, a Solution accepts the domain and handles the Provider selection and input format. To use a particular company’s data API with all its input options, inspect that Endpoint and call it directly. Both paths create ordinary Runs and use the same Key, balance, and permissions.

Authenticate

The API base URL is https://api.glasser.ai. Create a Key in Keys and set it as GLASSER_API_KEY in your environment. Send it in the Authorization: Bearer header. Check your connection with this free balance request:
Creating a Run, directly or through a Solution, also requires an Idempotency-Key header. Keep the same value when retrying the same request. Use a new value for a new execution.

Read the result

A data request returns a Run. Its provider, endpoint, and input identify what ran. The Provider’s data is in output; charge_usd records the charge, and run_url opens the Run in your Workspace. Check status and provider_response.http_status before using the data. A COMPLETED Run means Glasser received a usable Provider response; that response can still report an error. A 202 response means the Run is still in progress: use Get run status and output to retrieve the result. See How It Works for Run states, pricing, and retries.