Cloud API
Cloud Services: asset storage, AI asset generation, data cleaning, sync/import, export, and audience segments. Routes are served under /v1/cloud and backed by module-f (with module-C).
Authentication
Authorization: Bearer ai92_live_<key> # production
Authorization: Bearer ai92_test_<key> # sandboxMutating requests support Idempotency-Key and are brand-gated.
Credit costs at a glance
| Endpoint | Cost |
|---|---|
GET /v1/cloud/storage | Free (storage billed at month-end on peak usage) |
POST /v1/cloud/generate | 5 cr |
POST /v1/cloud/clean | 10 cr per 5,000 records (rounded up) |
POST /v1/cloud/sync-import | 3 cr per 1,000 records (rounded up) |
POST /v1/cloud/export | 2 cr per 10,000 records (rounded up) |
POST /v1/cloud/segments | 5 cr |
GET /v1/cloud/storage
Cost: Free (listing is free; storage is billed at month-end based on observed peak GB-month usage)
List stored assets, optionally for a brand.
Auth: Bearer
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
brand_id | query | string / null | No | Restrict to a brand. |
Request
curl "https://api.ai92.ai/v1/cloud/storage?brand_id=acme" \
-H "Authorization: Bearer ai92_test_51a9c0de…"Response 200 OK
{
"assets": [
{ "id": "ast_01", "type": "image", "size_bytes": 184320, "url": "https://cdn.ai92.ai/ast_01.png" }
],
"total_bytes": 184320
}POST /v1/cloud/generate
Cost: 5 credits
Generate a creative asset from a prompt.
Auth: Bearer
| Field | Type | Required | Description |
|---|---|---|---|
brand_id | string | Yes | The brand. |
prompt | string | Yes | Generation prompt. |
Request
curl https://api.ai92.ai/v1/cloud/generate \
-H "Authorization: Bearer ai92_test_51a9c0de…" \
-H "Content-Type: application/json" \
-d '{"brand_id": "acme", "prompt": "minimalist product banner, blue palette"}'Response 200 OK
{
"asset_id": "ast_99",
"type": "image",
"url": "https://cdn.ai92.ai/ast_99.png"
}Errors
| Status | Code | When |
|---|---|---|
402 | INSUFFICIENT_CREDITS | Balance below 5 credits. |
POST /v1/cloud/clean
Cost: 10 credits per 5,000 records (rounded up per 5K pack)
AI data cleaning / deduplication. Cost = ceil(record_count / 5000) * 10.
Auth: Bearer
| Field | Type | Required | Description |
|---|---|---|---|
record_count | integer | Yes | Records to clean. Drives the cost. |
Request
curl https://api.ai92.ai/v1/cloud/clean \
-H "Authorization: Bearer ai92_test_51a9c0de…" \
-H "Content-Type: application/json" \
-d '{"record_count": 12000}'Response 200 OK
{
"status": "queued",
"record_count": 12000,
"credits_consumed": 30
}Errors
| Status | Code | When |
|---|---|---|
402 | INSUFFICIENT_CREDITS | Balance below the computed cost. |
POST /v1/cloud/sync-import
Cost: 3 credits per 1,000 records (rounded up per 1K pack)
Import / sync records from a source. Cost = ceil(record_count / 1000) * 3.
Auth: Bearer
| Field | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Source identifier. Length 1–64. |
record_count | integer | Yes | Records to import (>= 1). Drives the cost. |
target_brand_id | string / null | No | Brand to import into. |
Request
curl https://api.ai92.ai/v1/cloud/sync-import \
-H "Authorization: Bearer ai92_test_51a9c0de…" \
-H "Content-Type: application/json" \
-d '{"source": "salesforce", "record_count": 4500, "target_brand_id": "acme"}'Response 200 OK
{
"import_id": "imp_22",
"source": "salesforce",
"record_count": 4500,
"credits_consumed": 15
}Errors
| Status | Code | When |
|---|---|---|
402 | INSUFFICIENT_CREDITS | Balance below the computed cost. |
POST /v1/cloud/export
Cost: 2 credits per 10,000 records (rounded up per 10K pack)
Export a dataset. Cost = ceil(record_count / 10000) * 2.
Auth: Bearer
| Field | Type | Required | Description |
|---|---|---|---|
dataset | string | Yes | Dataset identifier. Length 1–64. |
record_count | integer | Yes | Records to export (>= 1). Drives the cost. |
format | string | No | csv (default) or json. |
delivery | string | No | download (default) or crm_push. |
Request
curl https://api.ai92.ai/v1/cloud/export \
-H "Authorization: Bearer ai92_test_51a9c0de…" \
-H "Content-Type: application/json" \
-d '{"dataset": "contacts", "record_count": 25000, "format": "csv", "delivery": "download"}'Response 200 OK
{
"export_id": "exp_71",
"dataset": "contacts",
"record_count": 25000,
"download_url": "https://cdn.ai92.ai/exports/exp_71.csv",
"credits_consumed": 6
}Errors
| Status | Code | When |
|---|---|---|
402 | INSUFFICIENT_CREDITS | Balance below the computed cost. |
POST /v1/cloud/segments
Cost: 5 credits
Create a dynamic or static audience segment from rules.
Auth: Bearer
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Segment name. Length 1–128. |
rules | object | Yes | Segment rule definition. |
segment_type | string | No | dynamic (default) or static. |
Request
curl https://api.ai92.ai/v1/cloud/segments \
-H "Authorization: Bearer ai92_test_51a9c0de…" \
-H "Content-Type: application/json" \
-d '{"name": "High intent US", "rules": {"country": "US", "intent_score_gte": 70}, "segment_type": "dynamic"}'Response 200 OK
{
"segment_id": "seg_15",
"name": "High intent US",
"segment_type": "dynamic",
"estimated_size": 3120
}Errors
| Status | Code | When |
|---|---|---|
402 | INSUFFICIENT_CREDITS | Balance below 5 credits. |