Skip to main content
Set up Hicap to route model requests, attribute usage to your application, and define the business outcomes you want to measure. Hicap provides a shared API for supported models using a compatible SDK and the api-key header. You’ll need a Hicap API key from the Hicap Platform dashboard and access to your application repository. Keep the key on your server; don’t paste it into an agent prompt.

Set up with an agent

Open your application repository in your coding agent, then run these four prompts in order. The identity prompt assesses user, organization, tier, and trigger context independently; omit fields that don’t apply. Each prompt links to its full instructions.

1. Configure the client

Route supported model requests through Hicap and verify the client configuration.
Client setup
Review the full client setup prompt.

2. Set up base attribution

Identify the feature, operation, and other relevant dimensions for each request, then verify the outgoing tags.
Attribution
Review the full attribution prompt.

3. Add identity attribution

Assess the initiating user and any applicable organization, tier, and trigger context. Users-only apps need no organization; apps without personal tiers omit tier. Verify identity propagation with synthetic data, and use production identifiers only when their handling is approved and verified.
Identity attribution
Review the full identity prompt.

4. Connect business outcomes

Use the established dimensions and applicable identity to identify business questions, custom dimensions, and segments worth measuring. Connect costs to outcomes only when the required data and contracts are verified.
Business outcomes
Review the full business outcomes prompt.

Manual client setup

Prefer to configure the client yourself? Follow the examples below, then use the base attribution, identity, and business outcomes prompts to extend the setup.

1. Get your API key

Opens the Hicap Platform — You’ll create an account and generate an API key in the Hicap Platform dashboard. Then come back here to use it.
Keep the key on your server. Export it as an environment variable; never put it in browser code or a public environment variable:

2. Install an SDK and make your first request

Use this fictional support case to check the connection. The examples use gpt-5; confirm model availability and endpoint support for your key before running them. A live request consumes usage.
example.mjs
Run with node example.mjs.

3. Check what the response proves

A successful response proves the connection worked for this request. It does not yet prove that every application workflow uses Hicap, that its usage is attributed, or that the support case was resolved. For this example, check that the summary says the refund is pending. Then use the attribution prompt to identify the feature and operation in your application. Use the business outcomes prompt to identify the agreed completion event and its source of truth.

Use evidence to choose the right model

Compare models on the same representative tasks. Measure output quality, time to a usable result, model cost, retries, and human review effort. Confirm support for your endpoint, tools, streaming, and other required parameters before switching. When reliable cost and outcome records are available, compare AI cost per completed outcome and human review effort for the same workflow and reporting period. Choose an exact model ID from the models endpoint, and use the model catalog to compare options.

Add capabilities when the workflow needs them

Keep the first integration small. Add image input when a support case includes a screenshot, or streaming when showing a partial answer helps the person waiting.
  • Images: Follow the chat completions reference for request structure and confirm that the selected model supports image input.
  • Streaming: Measure both time to first token and time to a usable result. Track interrupted responses separately. See the streaming guide.
  • Other endpoints: Use the API reference to find the request shape for your workflow, then verify model and endpoint compatibility.

Verify one workflow end to end

Run a workflow you recognize. Check which model calls it made, which feature and operation they belong to, and what the workflow actually completed. A successful response confirms that the request worked. Attribution helps you see where usage belongs. An outcome record shows whether the work was completed. Before expanding, verify one workflow from request to result:
  1. Trace the requests. Confirm which calls reach Hicap, including retries and follow-up calls. Record paths that remain elsewhere or are unverified.
  2. Inspect fresh attribution. Select the right application, environment, and time window in Hicap. Check the expected feature, operation, and other applicable dimensions; older traffic retains its original tags.
  3. Check the actual outcome. Use the application’s agreed source of truth. A support summary is an intermediate result; case resolution needs its own evidence.
  4. Reconcile the cost. When complete, comparable records are available, compare usage and completed outcomes for the same workflow scope and reporting window. Account for failed attempts and retries. Report missing data as unavailable, and avoid dividing by zero when no outcomes have completed.
Start with one workflow you can explain from request to result. Expand from there. For deeper guidance, see Tags, Dimensions & Segments, agent setup and verification, and the FAQ.