You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 840867d
Browse filesBrowse the repository at this point in the historyBrowse files
1bcMax
committed
Merge pull request #97 from BlockRunAI/docs/realface-documented-the-pre-seal-contract
docs(realface): the published contract described the pre-seal API
@@ -67,21 +67,25 @@ POST https://blockrun.ai/api/v1/realface/init
67
67
| Parameter | Type | Required | Description |
68
68
|-----------|------|----------|-------------|
69
69
|`name`| string | Yes | Display name for your reference (1–64 chars). Stored upstream + in your list |
70
-
|`groupId`| string | No | If set, refresh the h5Link for this existing group instead of creating a new one. Use when the original 120s session expired |
70
+
|`groupId`| string | No | If set, refresh the h5Link for this existing group instead of creating a new one. Pass the `group_id` a previous `/init` returned, verbatim. Use when the original 120s session expired |
`group_id` is a ~215-character opaque handle, not an identifier you can construct, parse or guess. Store it and pass it back **verbatim** to `/status`, `/enroll` and the `/init` refresh path. It is scoped to the group it was issued for, so treat it as the credential for that enrollment — anyone holding it can refresh the H5 link and enroll into the group.
87
+
:::
88
+
85
89
### Rate limiting
86
90
87
91
Free but **rate-limited to 10 init calls per hour per IP** because each call generates an upstream session (real cost). For honest single-user usage this is plenty; if you hit `429` (`{ "error": "Rate limit exceeded", "retryAfterSeconds": n }` with a `Retry-After` header), wait or use the refresh path on an existing group. The refresh response carries `"refreshed": true` and no `next_steps`. An upstream failure on either path is `502`.
@@ -136,15 +140,15 @@ The H5 link works in any modern browser with a webcam. The rights-holder can ope
136
140
:::step{title="Poll for completion (FREE)"}
137
141
138
142
```
139
-
GET https://blockrun.ai/api/v1/realface/status?groupId=legacy_rf_…
143
+
GET https://blockrun.ai/api/v1/realface/status?groupId=rf1_…
140
144
```
141
145
142
146
### Response
143
147
144
148
```json
145
149
{
146
150
"object": "realface.status",
147
-
"group_id": "legacy_rf_8137",
151
+
"group_id": "rf1_…",
148
152
"status": "pending_validation",
149
153
"asset_count": 0,
150
154
"ready_to_finalize": false
@@ -153,7 +157,9 @@ GET https://blockrun.ai/api/v1/realface/status?groupId=legacy_rf_…
153
157
154
158
When `status` transitions to `"active"` (and `ready_to_finalize: true`), the rights-holder has completed the H5 and you can move to step 4.
155
159
156
-
Poll every 3-5 seconds. Free but rate-limited (same bucket as wallet reconciliation, 120/hour/IP). A `groupId` that is missing or not of the form `legacy_rf_<digits>` is `400`; a well-formed id that does not exist is `404` (`{ "error": "Asset group not found: …" }`) — only a genuine upstream failure is `502`.
160
+
Poll every 3-5 seconds. Free but rate-limited (same bucket as wallet reconciliation, 120/hour/IP).
161
+
162
+
A **missing**`groupId` is `400`. Anything else that is not a handle this service issued — malformed, tampered with, or for a group that does not exist — is `404` (`{ "error": "Unknown group", "message": "Pass the group_id returned by POST /api/v1/realface/init." }`). The two cases are deliberately not distinguished: a different answer for a real group than for an absent one would confirm which groups exist. Only a genuine upstream failure is `502`.
157
163
:::
158
164
159
165
:::step{title="Finalize (PAID, $0.011 USDC)"}
@@ -168,7 +174,7 @@ POST https://blockrun.ai/api/v1/realface/enroll
168
174
{
169
175
"name": "Spokesperson — Q3 campaign",
170
176
"image_url": "https://example.com/person.jpg",
171
-
"group_id": "legacy_rf_8137"
177
+
"group_id": "rf1_…"
172
178
}
173
179
```
174
180
@@ -201,7 +207,7 @@ If settlement itself fails after a successful enrollment, BlockRun absorbs the c
@@ -89,7 +89,7 @@ The settlement receipt is also returned in the `X-Payment-Response` / `PAYMENT-R
89
89
| Field | Description |
90
90
|-------|-------------|
91
91
|`asset_id`| The `ta_…` id to pass as `real_face_asset_id` on Seedance |
92
-
|`group_id`| Internal asset-group id — exposed for debugging / future delete operations|
92
+
|`group_id`| Internal asset-group id, returned for your own reference. No endpoint accepts it — enrollment mints its own group, so there is nothing to pass it back to. Not returned by the portraits listing|
93
93
|`image_url`| The BlockRun-hosted mirror of your image (so the listing thumbnail survives a dead source URL); falls back to the original URL if mirroring failed |
94
94
|`source_image_url` / `mirrored`| The URL you supplied, and whether the mirror succeeded |
95
95
|`usage.compatible_models`| Which BlockRun video models accept this asset id |
@@ -157,7 +157,6 @@ Returns the list of portraits the given wallet has enrolled. Free (rate-limited
0 commit comments