AI92 е на живо – нашият глобален софт старт е в ход: пълната платформа е отворена по целия свят за първите 30 дни.
Меню на документацията

Тази документация за разработчици в момента е само на английски език. Кодът и поведението на API са идентични във всеки регион.

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>     # sandbox

Mutating requests support Idempotency-Key and are brand-gated.

Credit costs at a glance

EndpointCost
GET /v1/cloud/storageFree (storage billed at month-end on peak usage)
POST /v1/cloud/generate5 cr
POST /v1/cloud/clean10 cr per 5,000 records (rounded up)
POST /v1/cloud/sync-import3 cr per 1,000 records (rounded up)
POST /v1/cloud/export2 cr per 10,000 records (rounded up)
POST /v1/cloud/segments5 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

ParameterInTypeRequiredDescription
brand_idquerystring / nullNoRestrict to a brand.

Request

bash
curl "https://api.ai92.ai/v1/cloud/storage?brand_id=acme" \
  -H "Authorization: Bearer ai92_test_51a9c0de…"

Response 200 OK

json
{
  "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

FieldTypeRequiredDescription
brand_idstringYesThe brand.
promptstringYesGeneration prompt.

Request

bash
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

json
{
  "asset_id": "ast_99",
  "type": "image",
  "url": "https://cdn.ai92.ai/ast_99.png"
}

Errors

StatusCodeWhen
402INSUFFICIENT_CREDITSBalance 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

FieldTypeRequiredDescription
record_countintegerYesRecords to clean. Drives the cost.

Request

bash
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

json
{
  "status": "queued",
  "record_count": 12000,
  "credits_consumed": 30
}

Errors

StatusCodeWhen
402INSUFFICIENT_CREDITSBalance 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

FieldTypeRequiredDescription
sourcestringYesSource identifier. Length 164.
record_countintegerYesRecords to import (>= 1). Drives the cost.
target_brand_idstring / nullNoBrand to import into.

Request

bash
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

json
{
  "import_id": "imp_22",
  "source": "salesforce",
  "record_count": 4500,
  "credits_consumed": 15
}

Errors

StatusCodeWhen
402INSUFFICIENT_CREDITSBalance 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

FieldTypeRequiredDescription
datasetstringYesDataset identifier. Length 164.
record_countintegerYesRecords to export (>= 1). Drives the cost.
formatstringNocsv (default) or json.
deliverystringNodownload (default) or crm_push.

Request

bash
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

json
{
  "export_id": "exp_71",
  "dataset": "contacts",
  "record_count": 25000,
  "download_url": "https://cdn.ai92.ai/exports/exp_71.csv",
  "credits_consumed": 6
}

Errors

StatusCodeWhen
402INSUFFICIENT_CREDITSBalance below the computed cost.

POST /v1/cloud/segments

Cost: 5 credits

Create a dynamic or static audience segment from rules.

Auth: Bearer

FieldTypeRequiredDescription
namestringYesSegment name. Length 1128.
rulesobjectYesSegment rule definition.
segment_typestringNodynamic (default) or static.

Request

bash
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

json
{
  "segment_id": "seg_15",
  "name": "High intent US",
  "segment_type": "dynamic",
  "estimated_size": 3120
}

Errors

StatusCodeWhen
402INSUFFICIENT_CREDITSBalance below 5 credits.