Your First Model Request
This path connects an existing model client to Praesidia's gateway using your own provider account. Your first result is a small test request whose response and usage you can inspect in the workspace.
For agent-to-agent or agent-to-MCP access, follow the connection quickstart. To compare the starting paths, visit Start here.
Before you start
- Create a Praesidia workspace.
- Have an OpenAI or Anthropic account, a provider API key, and permission to configure providers in your organization.
- Obtain the gateway address for your workspace from your administrator or Praesidia support. The examples below use a placeholder; do not substitute the website or console address.
- Choose a model enabled on your provider account. Real provider calls incur provider charges, including when you use a free Praesidia plan.
1. Configure the provider
In Configure → Integrations → LLM Configurations, create an OpenAI or Anthropic configuration with your provider key. Keep the provider key in this configuration; your test application uses a separate Praesidia application key.
Create an application and its application key (pra_…) for gateway access. An organization management API key (pk_…) is a different credential and is not interchangeable with this gateway key. Store credentials in a secret manager or a local environment configuration excluded from version control.
Provider configuration and a reachable gateway are prerequisites. If either is unavailable in your workspace, contact us before proceeding.
2. Send one small request
Use your existing provider client or an HTTP client. These examples use curl so a Praesidia SDK installation is not required. Replace the gateway placeholder and model name, and load your application key securely into PRAESIDIA_APPLICATION_KEY.
OpenAI chat completions
Set PRAESIDIA_GATEWAY_ORIGIN to your gateway's HTTPS origin, without a trailing slash, and PRAESIDIA_MODEL to the OpenAI model enabled for your route.
curl --fail-with-body "${PRAESIDIA_GATEWAY_ORIGIN}/openai/v1/chat/completions" \
-H "Authorization: Bearer ${PRAESIDIA_APPLICATION_KEY}" \
-H 'Content-Type: application/json' \
--data "{\"model\":\"${PRAESIDIA_MODEL}\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in one sentence.\"}]}"
The OpenAI-compatible base URL for this route is https://<your-gateway-host>/openai/v1. This example exercises chat completions; check the supported route for other API features before using them.
Anthropic messages
Set PRAESIDIA_MODEL to the Anthropic model enabled for your route.
curl --fail-with-body "${PRAESIDIA_GATEWAY_ORIGIN}/anthropic/v1/messages" \
-H "x-api-key: ${PRAESIDIA_APPLICATION_KEY}" \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
--data "{\"model\":\"${PRAESIDIA_MODEL}\",\"max_tokens\":64,\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in one sentence.\"}]}"
This uses the native Anthropic messages route. The gateway resolves the configured provider credential server-side; the client sends its Praesidia application key.
3. Check the response and usage
Confirm that the response came from the expected model. In the workspace, inspect the corresponding usage and audit activity and verify that it belongs to the expected application and organization. Allow for processing delay before expecting activity to appear.
A successful response establishes that this route works for this request. Next, review budget scopes and enforcement, configure the controls available to your plan, and test a request that should trigger them before increasing traffic.
If the first request fails
| Symptom | What to check |
|---|---|
| Authentication rejected | Use an active pra_… application key for the intended workspace, rather than a management key or your provider key. |
| Provider or model unavailable | Check the provider configuration, model access, gateway route, and provider account status. |
| Budget or policy denial | Inspect the returned error and configured controls before retrying; confirm that the test should be permitted. |
| No matching usage visible | Check your organization, application, time range, and whether the request completed. Preserve the request identifier when seeking help. |
If you need help, send your setup context. Include the route, time, status code, and request identifier if available. Do not send API keys or sensitive prompt content.