In Development

API Reference

Programmatic access to seven specialized AI agents. Forecasting, attribution, and scenarios via REST.

Base URL
api.cresva.ai
Version
v1
Protocol
REST + JSON
Auth
Bearer Token
Response from Felix
200 OK
{
"agent": "Felix",
"accuracy": 0.91,
"forecast_90d": 142350.00,
"confidence": {
"low": 128115,
"high": 156585
},
"learns": "2% monthly"
}
FelixMayaParkerSamDanaOliviaDex

What You Can Build

Seven agents. Seven hard problems solved. Each API endpoint connects to a specialized AI that learns your specific patterns and constraints.

Felix

Forecasting That Learns

The hard problem: Static models miss seasonality shifts, market changes, and your specific patterns

90-day revenue, CAC, and ROAS forecasts that improve from 78% to 91% accuracy by learning from every prediction miss

Revenue planningBudget forecastingPerformance projectionsTrend detection
Maya

Infinite Contextual Memory

The hard problem: Tribal knowledge walks out the door. Every question starts from scratch.

Store and retrieve 847+ conversations, constraints, preferences, and learned patterns with semantic search

Constraint recallHistorical contextPreference learningKnowledge retention
Parker

True Incrementality

The hard problem: Platforms over-report by 25-40%. You're making decisions on inflated ROAS.

De-biased attribution using holdout-calibrated factors. See what's truly incremental vs what platforms claim.

Incremental ROASPlatform bias correctionHoldout analysisChannel efficiency
Sam

Risk-Free Scenario Testing

The hard problem: Testing budget shifts costs real money. Guessing wrong wastes $50K+.

Run 1,000+ Monte Carlo simulations with your constraints. Get confidence intervals before spending.

Budget reallocationChannel mix optimizationWhat-if analysisConstraint validation
Dana

Unified Cross-Channel Data

The hard problem: 6 platforms, 6 schemas, 6 definitions of 'conversion'. Reconciliation takes hours.

Single source of truth across Meta, Google, TikTok, Shopify, GA4, Klaviyo with automated reconciliation

Data unificationAnomaly detectionSchema standardizationReal-time sync
Olivia

Creative Intelligence

The hard problem: You know a creative is fatiguing after it's too late. You can't decode why winners work.

Predict fatigue 2 weeks early. Identify winning patterns across 10,000+ creatives with visual analysis.

Fatigue predictionPattern extractionWin rate predictionCreative optimization
Dex

Intelligent Delivery

The hard problem: Reports nobody reads. Alerts that get ignored. Wrong format for wrong person.

Auto-generate and deliver insights to Slack, email, or Sheets. Learns your preferred format and timing.

Automated reportsSmart alertsMulti-channel deliveryPersonalized formatting

All agents share context

When Parker detects platform bias, Felix adjusts forecasts. When Maya recalls a constraint, Sam applies it to simulations. Intelligence compounds across the network.

How it works

Quick Start

Get up and running in under 5 minutes. Make your first API call and receive a forecast powered by learning AI.

1

Generate your API key

Create an API key from your dashboard. Keys are scoped to your organization and can be revoked at any time.

API Key FormatProduction
cresva_sk_live_xxxxxxxxxxxxxxxxxxxxxxxx
256-bit encryptionRotatableScoped permissions
2

Make your first request

Call the forecasts endpoint to get a 90-day revenue prediction powered by Felix, our forecasting agent.

curl -X POST https://api.cresva.ai/v1/forecasts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "revenue",
    "horizon_days": 90,
    "include_confidence": true
  }'
3

Receive learning intelligence

Every response includes confidence intervals, learning trajectory, and metadata about the agent's reasoning.

Responsejson
1{
2 "id": "fcst_abc123xyz",
3 "object": "forecast",
4 "created": 1698765432,
5 "agent": {
6 "name": "Felix",
7 "version": "2.4.1",
8 "accuracy_current": 0.91,
9 "accuracy_baseline": 0.78,
10 "learning_rate": "2% monthly"
11 },
12 "data": {
13 "predicted_revenue": 142350.00,
14 "confidence_interval": {
15 "low": 128115.00,
16 "high": 156585.00,
17 "level": 0.95
18 },
19 "horizon_days": 90,
20 "factors": [
21 { "name": "seasonality", "impact": 0.23 },
22 { "name": "trend", "impact": 0.45 },
23 { "name": "channel_mix", "impact": 0.32 }
24 ]
25 },
26 "meta": {
27 "model_version": "ensemble-v3",
28 "data_points_used": 847,
29 "computation_time_ms": 234
30 }
31}

Endpoints

Each endpoint connects to a specialized AI agent. All responses include agent metadata, confidence scores, and learning trajectory.

Create forecasts for revenue, CAC, ROAS, or custom metrics. Felix learns from your historical data and improves accuracy over time. Supports configurable horizons from 7 to 365 days.

Parameters

typestringrequired

Forecast type: revenue, cac, roas, conversions, or custom

horizon_daysintegerrequired

Number of days to forecast (7-365)

granularitystring

daily, weekly, or monthly (default: daily)

include_confidenceboolean

Include confidence intervals (default: true)

channelsarray

Filter by channels: meta, google, tiktok, etc.

Response Fields

predicted_valuenumber

The forecasted value

confidence_intervalobject

Low/high bounds at 95% confidence

factorsarray

Contributing factors and their impact weights

agent.accuracy_currentnumber

Current model accuracy (0-1)

Example Request

{
  "type": "revenue",
  "horizon_days": 90,
  "granularity": "weekly",
  "include_confidence": true,
  "channels": ["meta", "google"]
}

Example Response

{
  "id": "fcst_abc123",
  "object": "forecast",
  "agent": { "name": "Felix", "accuracy_current": 0.91 },
  "data": {
    "predicted_revenue": 142350.00,
    "confidence_interval": { "low": 128115, "high": 156585 },
    "series": [...]
  }
}

Authentication

Secure your API requests with industry-standard authentication.

Bearer Token Authentication

Include your API key in the Authorization header of every request. All API requests must be made over HTTPS.

curl https://api.cresva.ai/v1/forecasts \
  -H "Authorization: Bearer cresva_sk_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json"

Test Keys

cresva_sk_test_*
  • Use for development and testing
  • Returns simulated data
  • No rate limits

Live Keys

cresva_sk_live_*
  • Use for production
  • Accesses real data and agents
  • Subject to rate limits

Security Best Practices

Never expose API keys in client-side code or version control
Use environment variables for key storage
Rotate keys periodically and immediately if compromised
Use scoped keys with minimum required permissions

Rate Limits

Starter
100
req/min
10K
daily
20
burst
Professional
500
req/min
100K
daily
100
burst
Enterprise
Custom
req/min
Unlimited
daily
Custom
burst

Rate Limit Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698765432

Error Codes

400
Bad Request
Invalid request parameters or malformed JSON
401
Unauthorized
Missing or invalid API key
403
Forbidden
API key lacks required permissions
404
Not Found
Resource does not exist
429
Rate Limited
Too many requests, retry after delay
500
Server Error
Internal error, contact support if persistent
Error Response Formatjson
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded",
    "retry_after": 30
  }
}

Webhooks

Receive real-time notifications when events occur. Configure webhook endpoints in your dashboard to subscribe to specific events.

Event Types

forecast.completedForecast generation finished
sync.completedData sync finished for all sources
sync.failedData sync encountered an error
alert.triggeredPerformance alert threshold crossed
report.deliveredScheduled report was sent
creative.fatigue_warningCreative approaching fatigue

Webhook Payload

1{
2 "id": "evt_abc123",
3 "type": "forecast.completed",
4 "created": 1698765432,
5 "data": {
6 "forecast_id": "fcst_xyz789",
7 "type": "revenue",
8 "predicted_value": 142350.00,
9 "confidence": 0.91
10 },
11 "signature": "sha256=..."
12}

Signature Verification

All webhooks include a signature header for verification. Compute HMAC-SHA256 of the payload using your webhook secret and compare.

SDKs & Libraries

Official client libraries for popular languages with full TypeScript support.

Node.js / TypeScript

v18+ required
npm install @cresva/sdk
import Cresva from '@cresva/sdk';

const cresva = new Cresva({
  apiKey: process.env.CRESVA_API_KEY
});

// Full TypeScript support
const forecast = await cresva.forecasts.create({
  type: 'revenue',
  horizonDays: 90
});

Python

3.8+ required
pip install cresva
from cresva import Cresva
import os

client = Cresva(api_key=os.environ["CRESVA_API_KEY"])

# Async support available
forecast = client.forecasts.create(
    type="revenue",
    horizon_days=90
)

print(forecast.data.predicted_revenue)

Enterprise Infrastructure

Built for reliability, security, and scale from day one.

99.9% Uptime
SLA guaranteed
Global Edge
Sub-100ms latency
SOC 2 Type II
Compliance ready
Encrypted
AES-256 at rest

Data Residency

Choose where your data lives. Available regions:

US-EastUS-WestEU-WestAPAC

Compute

Auto-scaling infrastructure:

  • • GPU-accelerated inference
  • • Dedicated compute available
  • • Priority queue for Enterprise

Versioning

API stability guarantees:

  • • Semantic versioning
  • • 12-month deprecation notice
  • • Backwards compatible updates

Ready to Build?

Request early access to integrate learning AI into your infrastructure.