All four tools run as jobs: a 202 answer, the result by polling or webhook (Jobs and results). Voice, music, closing phrase and avatar are picked from the reference lists (Reference data).
Content pack
POST /content/generate - scope tools:contentgen. From property facts and photos GREM makes descriptions, social posts, a narrated video, a landing page and a PDF - in one job. A draft listing is created for the pack.
At least 4 photos are required - as public addresses in form.media.photos. Upload your own files with POST /uploads first and pass the returned urls (Files).
| Field | Type | Description |
|---|---|---|
form.language | string | result language: eng, rus, ukr, deu, spa, aze, arb, fra, zho, tur |
form.media.photos | array | 4-20 photo addresses (strings or { "url": "..." }) - required |
form.objectId | string | build the pack for your existing listing |
form.objectType | string | property, rental or complex |
form.propertyCategory | string | property type: apartment, house, penthouse, land, warehouse ... |
form.dealType | string | sale or rent |
form.title | string | title |
form.description | string | your description - used as facts |
form.customDirection | string | tone and emphasis wishes, up to 500 characters |
form.totalArea | number | m² |
form.rooms, form.floor, form.buildingFloors | number | rooms, floor, floors |
form.landPlotArea | number | plot, m² (houses) |
form.price | number | price |
form.priceCurrency | string | price currency |
form.addressCountry, form.addressCity, form.street, form.streetNumber | string | address |
form.voiceId | string | narration voice from GET /voices |
form.enableSubtitles | yes/no | video subtitles, on by default |
form.showPhone | yes/no | show the phone; the number goes in form.contactPhone |
form.options.music.trackId | string | track from GET /video/music; form.options.music.enabled: false - no music |
form.options.endCard.style | string | end card: photo, solid or split |
No user field is needed: the pack is created on behalf of the key's account.
curl -X POST https://developers.grem.capital/api/v1/content/generate \
-H "Authorization: Bearer gsk_live_xxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 0c0e3a5b-7d1e-4b8a-9b2f-1e6d4c3a2b10" \
-d '{
"form": {
"language": "eng",
"propertyCategory": "apartment", "dealType": "sale",
"title": "Bright 2-room flat near the park",
"totalArea": 64, "rooms": 2, "price": 320000, "priceCurrency": "EUR",
"addressCountry": "Germany", "addressCity": "Berlin",
"media": { "photos": ["https://example.com/1.jpg", "https://example.com/2.jpg",
"https://example.com/3.jpg", "https://example.com/4.jpg"] }
}
}'
202 response: jobId (job id) and propertyId (the draft listing). The finished job (GET /content/generate/jobs/{id}) holds:
| Field | Description |
|---|---|
artifacts | ids of the generated files |
artifactsSummary | one entry per file: kind, format, size |
bundle | the pack's landing page and PDF, when built |
progress | generation progress while the job runs |
masterProfile | the story outline the texts and narration were built on |
error | for a failed job: the reason, as a generic text |
File: GET /artifacts/v1/ai/assistant/announcement/jobs/{jobId}/artifacts/{artifactId}/download. Events - content.completed, content.partial (some files failed), content.failed. Fewer than 4 photos - 400.
Listing texts
POST /text/generate - scope tools:text. A description, a presentation and a social post. Needs either objectId or at least one of description, city, totalArea - otherwise 422 with code: not_enough_input.
| Field | Type | Description |
|---|---|---|
objectId | string | your listing (or your agency's) |
title | string | up to 120 characters |
description | string | your description, up to 2000 characters |
city | string | city |
totalArea | number | m² |
rooms | number | rooms |
price | number | price |
currency | string | price currency |
propertyCategory | string | property type |
language | string | en (default), ru, ua, de, es, az, ar, fr, zh, tr |
customDirection | string | tone and emphasis wishes; longer text is cut to 500 characters |
curl -X POST https://developers.grem.capital/api/v1/text/generate \
-H "Authorization: Bearer gsk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"city":"Berlin","totalArea":64,"rooms":2,"propertyCategory":"apartment","language":"en","description":"Renovated, quiet courtyard, 5 min to U-Bahn."}'
202 with jobId. The texts are in the job files, as with the content pack; the job also carries progress, masterProfile and error. Events - text.completed / text.failed.
Video from photos
POST /video/create - scope tools:video. A short narrated video from your photos or a listing's photos.
Body - multipart/form-data, each option as its own form field (not JSON in a data field):
| Field | Description |
|---|---|
photos | photo files, 1 to 8 - one part per file; not needed with objectId; JPEG, PNG, WebP or HEIC up to 20 MB each; photos past the 8th are not used |
objectId | take photos and facts from your listing |
prompt | what the clip is about, up to 500 characters; required without objectId; a longer text is cut |
title | title, up to 120 characters |
length | short (default) or long; another value is treated as short; long needs at least 4 photos (code: long_needs_more_photos) |
aspect | 9:16, 1:1 or 16:9; another value - the default |
language | narration language: en, ru, ua, de, es, az, ar, fr, zh, tr |
narration | true (default) - with narration |
voiceId | voice from GET /voices |
enableSubtitles | subtitles |
musicEnabled | with music |
musicTrackId | track from GET /video/music |
musicVolume | music volume, 0-100 |
music | your own music file instead of a track |
endCardEnabled, endCardStyle | end card: photo, solid or split |
ctaMode | closing phrase: auto (default) - picked for the listing; manual - use ctaIntent or ctaText |
ctaIntent | a ready closing phrase: one of the intent values from GET /video/endings |
ctaText | your own closing phrase, up to 60 characters |
ctaMarket | who the video speaks to: local, remote or international; tunes the auto phrase |
curl -X POST https://developers.grem.capital/api/v1/video/create \
-H "Authorization: Bearer gsk_live_xxx" \
-F "[email protected]" -F "[email protected]" -F "[email protected]" \
-F "prompt=Sunny 2-room flat in Berlin Mitte, quiet courtyard" \
-F "length=short" -F "aspect=9:16" -F "language=en"
202 with jobId; the video is in the job files. The job also carries progress, masterProfile and error, as with the content pack. The price depends on length. Events - video.completed / video.failed.
Avatar video
POST /avatar/video - scope tools:avatar. A presenter talks about your listing.
| Field | Type | Description |
|---|---|---|
avatarId | string | required: an avatar with status ready from GET /avatar/avatars |
objectId | string | required: your listing |
scriptText | string | required: the presenter's text, at least 100 characters; at most 1200 |
voiceId | string | voice from GET /voices |
language | string | language |
background.type | string | background: color, photo or slideshow |
background.color | string | background colour #RRGGBB |
background.photoUrl | string | background photo |
dimension.width, dimension.height | number | frame size, 100-4096 px; send both or neither |
enableSubtitles | yes/no | subtitles |
curl -X POST https://developers.grem.capital/api/v1/avatar/video \
-H "Authorization: Bearer gsk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"avatarId":"AVATAR_ID","objectId":"OBJECT_ID","voiceId":"VOICE_ID","scriptText":"..."}'
202 with jobId. Video: GET /artifacts/v1/ai/assistant/avatar/jobs/{jobId}/artifacts/{artifactId}/download, artifactId from the artifacts of the finished job. Events - avatar.completed / avatar.failed. Missing avatarId, objectId or a short text - 400 with the fields in errors.
Related
- Reference data - voices, avatars, music, closing phrases.
- Jobs and results - states and files.
- Files - uploading photos.