Calling APIs
Browse, click, get results. Or use a generated SDK in your code.
Calling from the web console
The easiest way to call an API is directly from the web console:
- Go to My APIs and click on any API you have selected
- Click Try in Swagger to open the interactive API explorer
- Enter your parameters in the form fields
- Click Execute
- The response appears below — typically in under a second
The Swagger panel shows all available endpoints, parameters, and response schemas for each API.
Calling from your code
For programmatic access, generate an SDK from the web console (see SDKs). The SDK gives you a typed client library in your language of choice — just import it and call methods.
Example in TypeScript:
import { WeatherApi } from './weather-api';
const api = new WeatherApi({ token: 'YOUR_SECRET' });
const forecast = await api.getForecast({
city: 'Paris',
days: 5
});
console.log(forecast.data);
What you get back
Every API call returns the actual response from the API, along with metadata showing the cost of the call and a request ID for your records.
Authentication
You authenticate to your own control center using a secret token shown in the web console under Settings. You never need API keys for the target API — the owner handles that on their side.
Error handling
If something goes wrong, you get a clear error with an HTTP status code and a description of the problem:
| Status | Meaning |
|---|---|
400 | Invalid request (missing fields, bad API name) |
401 | Invalid authentication token |
402 | Insufficient USDC balance |
404 | API not found in catalog |
502 | The API owner's server returned an error |
504 | The API owner's server is unreachable |