Skip to main content

Environment strategy

Horizon ships with managed staging and production environments. Use them as a baseline and create additional sandboxes as your teams grow.
EnvironmentPurposeDefault URL
stagingIntegration testing, QA, stakeholder reviewshttps://staging.api.horizon.new
productionLive user traffic, scheduled automationshttps://api.horizon.new
Each environment has isolated indexes, job history, webhook credentials, and storage buckets. Promote configuration between environments from the console or via horizon promote once you have validated changes.

Secrets and credentials

  1. Open Workspace → Secrets in the console.
  2. Create key/value pairs for external providers (LLMs, storage, transcription engines, etc.).
  3. Mark secrets as global (shared across environments) or scoped (environment-specific).
  4. Run horizon secrets pull to materialise them locally. They will be written to .dev.vars for Wrangler and .env.local for the CLI.
Never commit .dev.vars or .env.local. Add them to your .gitignore and share credentials through the console instead.

Runtime configuration

  • Payment settings — Associate the correct x402 facilitator wallet and settlement parameters per environment, and align teams with Coinbase’s Quickstart for sellers and Quickstart for buyers.
  • Asset storage — Point the platform to S3-compatible buckets or Horizon managed storage for generated artifacts and extracted archives.
  • Rate limits — Configure hard and soft limits to protect your upstream APIs from spikes.
  • Error policies — Decide whether extraction or generation jobs retry automatically, require manual review, or surface consensus checks.
  • Job retention — Control how long completed jobs, transcripts, and intermediate files persist before they are purged.
Configuration changes are versioned. Publish updates to staging first, validate via representative jobs, then promote to production with a single click or the CLI.

API bootstrap example

const baseUrl = process.env.HORIZON_BASE_URL ?? 'https://api.horizon.new/v1';

const response = await fetch(`${baseUrl}/generate/text`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    prompt: 'Summarise our spring launch in 3 sentences.',
    webhookUrl: process.env.HORIZON_WEBHOOK_URL,
  }),
});

if (response.status === 402) {
  // Follow Coinbase buyer quickstart to replay with X-PAYMENT.
}

const job = await response.json();
console.log(job.jobId);
Bind secrets via wrangler.toml or your hosting platform’s secret manager so credentials remain encrypted at rest.