Skip to main content

Get Started

Quickstart

Send a request to an AI model through Verdictan. Then find the response, the decision, and the token usage in the Console.

You run the gateway on your computer. The gateway is a program that applies rules to requests and calls the model. Select one of two ways to run it:

PathWhat it does
In your terminalThe Console Route your first request panel gives you the commands. Your OpenAI key stays in the terminal environment. This path does not save the key in Verdictan Secrets.
In DockerDocker Compose runs the gateway. You create the agent, the gateway registration, and the application token. This path also does tests of a policy and a token budget.

Select your path in a tab below. All tabs on this page then show the same path.

Your application sends requests to an agent URL. Verdictan forwards them to your connected gateway through an outbound relay tunnel. Router port forwarding is not necessary. Each completed model request uses your OpenAI credit.

Before you start​

  • Sign in to the EU Console or US Console. Use the region for your account for all steps.
  • Have an OpenAI API key with available credit.

To create an account, select Create account on the Console sign-in page. Complete the registration steps.

Open two terminal windows. On Windows, use PowerShell. On macOS or Linux, use your usual terminal.

Terminal 1 runs the gateway. Terminal 2 sends your request. Keep Terminal 1 open until you finish.

1. Prepare the Console​

This path uses the default Assistant agent. Select the model for your request:

  1. On Overview, find Route your first request.
  2. Select All models.
  3. Search for openai/gpt-5.4-mini.
  4. Select the row with openai as its provider.
  5. Select Next to open Setup.

Use a model that your OpenAI account can access. If the example model is not available, select a different OpenAI chat model from the list. The Console puts your selection in the request command in step 3.

You should see
Setup is open. Keep this browser tab open while you start the gateway.

2. Start the gateway​

Set your OpenAI key

  1. In Setup, select Use a local environment key.
  2. In Terminal 1, run the command for your operating system. Replace your-openai-api-key with your key.

An environment variable is a named value that a program reads when it starts. Here, OPENAI_API_KEY tells the gateway which OpenAI key to use.

Terminal 1
export OPENAI_API_KEY='your-openai-api-key'

Do not include the key in screenshots. Do not save it in a repository.

Copy and run your setup command

  1. In Setup, select Generate gateway token.
  2. Select your operating system.
  3. Select Copy above the installation command.
  4. Paste the command into Terminal 1, where you set the key. Run it.

The command installs Verdictan and connects the gateway to the default Assistant agent. The agent gives your application a stable address for this gateway.

You should see
Terminal 1 reports gateway listening on http://127.0.0.1:41002. Keep this terminal open.

Return to Setup. When the gateway is connected, select Next to open Try it.

If your provider key is in Verdictan Secrets, use the saved-key procedure. A local variable is not necessary for that procedure.

3. Send a request​

Your gateway accepts requests at two addresses:

AddressWhen to use it
Agent URLUse this in your application or from a different computer. It forwards requests to your connected gateway.
http://127.0.0.1:41002Use this to call the gateway directly from the computer that runs it.

Keep the gateway connected while you use the agent URL.

  1. In Try it, select the operating system for Terminal 2.
  2. Select Copy above the request command.
  3. Paste the complete command into Terminal 2.
  4. Run the command.

The command contains your model, agent URL, and application token. Keep those values unchanged. The application token lets this request use Verdictan. It is different from your OpenAI key.

You should see
Terminal 2 returns a JSON response with a model reply in choices[0].message.content. The text can be different.

4. Find the decision and usage​

  1. In Try it, select Get history.
  2. In Request check, find your request. Select the Session link.

Then do these steps:

  1. In Entry timeline, select your request.
  2. Examine the response, Decision, Model, and Token usage.
History request details with the model response, an Allowed decision, and token usage.
In this recorded example, the response has an Allowed decision. Your response and token count can be different.

Allowed shows that this request passed the configured checks. Token usage shows how much text the provider processed and returned.

To see the estimated cost, open Usage. Find your model in Cost and usage breakdown. Select a date range that includes your request. A small total can show <$0.01. The cost graph shows more detail. These totals are for the selected period. They can include other requests.

You should see
Your request completed. You can find its response, decision, and usage in Verdictan.

5. Block a request with a policy​

For either runtime, you can deploy your own rules with CLI 0.1.14 or later. After a configuration change, check In sync in Gateways before you test its behavior. Run gateway 0.1.14 or later for reports after a reload. Use the log checks on that page for an older gateway.

The terminal path does not deploy the example policy. To do this test, select the In Docker tab. To add rules to your agent, read the policy overview. Otherwise, go to Stop the gateway.

6. Stop a request with a budget​

This test uses the application token and agent URL from the In Docker tab. To do the test, select that tab. To set spending limits for your application, read Usage Costs and Budgets.

Stop the gateway​

Use Ctrl+C in Terminal 1. Close that terminal to clear its environment variables.

Your agent URL can receive requests only when a gateway is connected.

Troubleshooting​

ProblemAction
The installation command failed.Read the error in Terminal 1. If Verdictan installed, run verdictan doctor. Correct the reported problem.
Next stays disabled in Setup.Keep Terminal 1 open. Read its connection errors. Make sure that you used the complete command from the same Console session.
The request returns 401.Use the application token, not your OpenAI key or the gateway machine token. On the terminal path, copy the complete command from Try it again.
The request returns 403.Read the error code. Examine the permissions and spending limits for the token. See gateway errors.
The provider rejects the request.Read the provider error for key, credit, or model-access problems. If you change the key variable, stop the gateway. Then start it again from the same terminal.
The request returns a response without an error but Request check is empty.Select Get history again. Before you send a new request, make sure that the selected organization and agent are correct.
Usage does not show the request.Refresh Usage with a time range that includes your test. A small total shows as <$0.01.

Next steps​