Appearance
First API Call
This example executes a prompt through the gateway. It is the fastest way to confirm your key, provider setup, and routing configuration.
Use case
"I want a reliable response across multiple providers with failover."
Example request
bash
curl https://app.veriprompt.tech/api/gateway/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Summarize the business value of AI routing in two sentences.",
"routingPolicy": {
"strategy": "cost_optimized",
"maxLatencyMs": 4000,
"minSuccessRate": 0.95
}
}'Example response
json
{
"requestId": "req_01H...",
"provider": "openai",
"model": "gpt-4o-mini",
"latencyMs": 820,
"output": "AI routing automatically selects the best provider for each prompt...",
"usage": {
"inputTokens": 42,
"outputTokens": 68,
"costUsd": 0.0042
}
}What to check
- A non-empty
outputfield - Reasonable latency and cost values
- The provider you expect based on your routing policy
