NetraFlow
API Reference

Account

Retrieve account information, credit balance, and usage statistics.

GET /v1/account

Retrieve your account details, credit balance, and plan limits.

curl https://api.netraflow.com/v1/account \
  -H "X-Api-Key: sk_live_your_key_here"
{
  "data": {
    "tenant_id": "ten_abc123",
    "name": "Acme Corp",
    "email": "[email protected]",
    "plan": "pro",
    "credits": {
      "balance": 850,
      "plan_credits": 850,
      "purchased_credits": 0,
      "monthly_allowance": 1000,
      "resets_at": "2026-08-17T09:30:00.000Z",
      "used_this_period": 150
    },
    "limits": {
      "max_video_duration_minutes": 10,
      "max_audio_duration_minutes": 90,
      "max_fps": 3,
      "requires_target": false,
      "max_requests_per_minute": 60,
      "max_concurrent_jobs": 10,
      "max_queries_per_job": 10,
      "webhooks_enabled": true,
      "downloadable_reports": true,
      "max_batch_size": 25,
      "max_aggregate_queries_per_batch": 5
    },
    "webhook_secret": "whsec_3f2a...",
    "created_at": "2026-01-15T10:00:00.000Z"
  },
  "meta": { "request_id": "req_xyz789" }
}

Credits fields

PropTypeDescription
balanceintegerTotal available credits (plan + purchased).
plan_creditsintegerRemaining credits from your monthly plan allowance.
purchased_creditsintegerRemaining credits from one-time purchases.
monthly_allowanceintegerTotal credits included in your plan each billing period.
resets_atstring (ISO 8601) | nullWhen plan credits next reset, from your billing cycle — so it falls on your subscription anniversary, not the 1st of the month. null means no scheduled reset.
used_this_periodintegerCredits consumed since the start of the current calendar month.

Unused plan credits are forfeited when they reset — they do not roll over. resets_at is your deadline for spending them. Purchased credits are not affected.

resets_at is null when no reset is scheduled: the Free plan's credits are a one-off signup grant rather than a monthly allowance, and custom Scale allowances are granted manually. Note that used_this_period is measured over the calendar month, so it does not align with the billing period resets_at refers to.

Other top-level fields

PropTypeDescription
webhook_secretstring | nullYour workspace signing secret, used to verify the X-NetraFlow-Signature header on webhook deliveries. Returned only to your own authenticated request.

Limits fields

PropTypeDescription
max_video_duration_minutesintegerMaximum video length your plan supports.
max_audio_duration_minutesintegerMaximum length for audio-only jobs (transcription and/or metadata, no visual analysis). Higher than max_video_duration_minutes because these jobs skip frame analysis.
max_requests_per_minuteintegerAPI rate limit for your plan.
max_concurrent_jobsintegerMaximum jobs processing simultaneously.
max_queries_per_jobintegerMaximum custom queries per job.
webhooks_enabledbooleanWhether webhook delivery is available on your plan.
max_fpsintegerFrame-sampling ceiling for your plan. A job's fps is clamped to it.
requires_targetbooleanWhen true, brand-detection jobs must specify a brands or surfaces target. Untargeted detection requires Pro or above.
downloadable_reportsbooleanWhether report export is available on your plan.
max_batch_sizeintegerMaximum videos per batch. 0 means batch is not available on your plan.
max_aggregate_queries_per_batchintegerMaximum cross-video aggregate queries per batch.

GET /v1/usage

Retrieve usage statistics and credit transaction history for a given period.

Query parameters

PropTypeDescription
start_datestring (ISO 8601)Period start. Defaults to start of current month.
end_datestring (ISO 8601)Period end. Defaults to now.
type"charge" | "purchase" | "refund" | "grant" | "forfeit"Filter transactions by type.
limitinteger (1-100)Number of transactions per page. Defaults to 50.
cursorstringPagination cursor from a previous response.
curl "https://api.netraflow.com/v1/usage?start_date=2026-04-01T00:00:00Z" \
  -H "X-Api-Key: sk_live_your_key_here"
{
  "data": {
    "summary": {
      "period": {
        "start": "2026-04-01T00:00:00.000Z",
        "end": "2026-04-03T15:30:00.000Z"
      },
      "credits_used": 120,
      "credits_purchased": 0,
      "credits_refunded": 5,
      "credits_granted": 0,
      "total_jobs": 15
    },
    "transactions": [
      {
        "id": "txn_abc123",
        "type": "charge",
        "amount": -10,
        "job_id": "job_xyz789",
        "description": "Job completed",
        "created_at": "2026-04-03T14:00:00.000Z"
      }
    ]
  },
  "pagination": {
    "has_more": false,
    "next_cursor": null
  },
  "meta": { "request_id": "req_abc456" }
}

On this page