sogrok API

API reference

Use a key to list models, quote, upload references, and create jobs. Each key only sees the models you allowed. Generating, checking the wallet, and uploading files need a signed-in session or a key.

1. Base URL and auth

Base URL:

https://sogrok.com

Prefix: /api/v1. JSON over HTTPS unless noted. Authorization: Bearer hxsk_....

ItemValue
AuthAuthorization: Bearer hxsk_...
Quote TTL5 minutes, single use
Upload TTL24 hours
Prompt1–5000 characters

Create keys on the keys page. The full key is shown once, starts with hxsk_, and is about 37 characters. Send the id from GET /api/v1/models, not the product label. Age confirmation is required before uploads or jobs.

2. Resources and status

ObjectMeaning
ModelCallable model. Use id in params.model.
SKUPrice tier. Video by resolution, image by quality, chat by context.
QuotePriced offer bound to SKU, prompt, and params.
JobOne generation. Balance is held, then settled or refunded. On success, includes usage.
UploadReference file. Returns upload_id for params.
WalletAvailable and frozen USD.
statusMeaning
queuedAccepted, waiting
reserved / submitting / runningIn progress
succeededDone, result available
failedFailed, hold usually refunded
rejectedModeration reject, not billed

Success returns the business object. Errors are non-2xx with { "error": { "code": "...", "message": "..." } }. Job creation returns 202. Treat only 2xx bodies as success.

3. Operations

MethodPathPurpose
GET/api/v1/modelsList models and tiers for this key
POST/api/v1/quotesQuote SKU + prompt + params
POST/api/v1/jobsCreate a job with that quote
GET/api/v1/jobs/:idPoll one job
GET/api/v1/jobs?job_id=Search history, max 20
GET/api/v1/jobs/:id/mediaFetch output; ?thumb=1 for poster
POST/api/v1/uploadsUpload a reference
GET/api/v1/walletBalance and holds
POST/v1/videosCompat: one-shot video job
GET/v1/videos/:idCompat: poll a video job

4. Models and SKUs

params.model must be an id below, or the current id from GET /api/v1/models. Do not send the keys-page label.

Video

idNameResolutionDurationModes
seedance-2-0-miniseedance-2-0-mini480p / 720p4–15s, -1 adaptivet2v / i2v / v2v
seedance-2-0-fastseedance-2-0-fast480p / 720p4–15s, -1 adaptivet2v / i2v / v2v
seedance-2-0seedance-2-0480p / 720p / 1080p / 4K4–15s, -1 adaptivet2v / i2v / v2v
seedance-2-5seedance-2-5480p / 720p / 1080p4–30s, -1 adaptivet2v / i2v / v2v
dreamina-seedance-2-0-mini-260615dreamina-seedance-2-0-mini-260615480p / 720p4–15s, -1 adaptivet2v / i2v / v2v
dreamina-seedance-2-0-fast-260128dreamina-seedance-2-0-fast-260128480p / 720p4–15s, -1 adaptivet2v / i2v / v2v
dreamina-seedance-2-0dreamina-seedance-2-0480p / 720p / 1080p / 4K4–15s, -1 adaptivet2v / i2v / v2v
dreamina-seedance-2-5dreamina-seedance-2-5480p / 720p / 1080p4–30s, -1 adaptivet2v / i2v / v2v
grok-imagine-videoGrok Imagine Video480p / 720p1–15st2v / i2v
grok-imagine-video-1.5Grok Imagine Video 1.5480p / 720p / 1080p1–15st2v / i2v
wan-3.0Wan 3.0480p / 720p / 1080p2–30s, -1 adaptivet2v / i2v

Image

idNameQualityModesMax stills
seedreamdola-seedream-5-0-pro-2606281K / 1.5K / 2Kimg / i2i / layer10
seedream5seedream-5-0-2601282K / 3K / 4Kimg / i2i14
seedream45Seedream 4.52K / 3K / 4Kimg / i2i14
grok-imagine-imageGrok Imagine Image1K / 2Kimg3
grok-imagine-image-2.0Grok Imagine Image 2.01K / 2Kimg / i2i3
grok-imagine-image-qualityGrok Imagine Image Quality1K / 2Kimg / i2i3
gpt-image-2GPT Image 21K / 2K / 4Kimg / i2i16
gpt-image-2.5-flareGPT Image 2.5 Flare1K / 2K / 4Kimg / i2i16
gpt-image-2.5-sunburstGPT Image 2.5 Sunburst1K / 2K / 4Kimg / i2i16
gpt-image-2.5-4kGPT Image 2.54Kimg / i2i16
banana-proBanana Pro1K / 2K / 4Kimg / i2i16
banana-2.1Banana 2.11K / 2K / 4Kimg / i2i16
dola-seedream-5-0-flash-260915dola-seedream-5-0-flash-2609151K / 1.5K / 2Kimg / i2i10

Chat

idSKUNotes
grok-4.5text.200k / text.500kBilled by token
grok-4.6text.200k / text.500kBilled by token
grok-4.7text.200k / text.500kBilled by token

SKU

SKUMaps to
video.fast480p
video.std720p
video.pro1080p
video.ultra4k
image.1k / image.15k / image.2k / image.3k / image.4k1K / 1.5K / 2K / 3K / 4K
text.200k / text.500kShort / long context

SKU must match resolution, e.g. 720p → video.std, 4k → video.ultra. The live list is GET /api/v1/models. Price is whatever the quote returns.

5. params

Quote and submit the same params object. Unknown fields return unsupported_field.

FieldTypeUse
modelstringModel id, required
modestringt2v / i2v / v2v / img / i2i / layer / chat
ratiostringAspect ratio
resolutionstringVideo 480p / 720p / 1080p / 4k; image 1K–4K
durationintegerVideo seconds. Seedance 2.x: -1 = adaptive (hold max, settle actual)
first_frame_upload_idstringFirst frame
tail_frame_upload_idstringLast frame, optional Seedance i2v
reference_image_upload_idsstring[]Reference still upload ids
reference_image_urlsstring[]Public HTTPS stills
reference_video_upload_idstringReference clip, required for v2v (or use a URL)
reference_video_upload_idsstring[]Multiple reference clips
reference_video_urlstringPublic HTTPS reference clip
reference_video_urlsstring[]Multiple public HTTPS reference clips
reference_audio_upload_idstringReference audio; needs an image or video
reference_audio_upload_idsstring[]Multiple reference audios
reference_audio_urlstringPublic HTTPS reference audio
reference_audio_urlsstring[]Multiple public HTTPS reference audios
generate_audiobooleanGenerate audio
watermarkbooleanWatermark
clean_outputbooleanClean output
negativestringNegative prompt, max 1000 chars
seedstring1–12 digits
camerastringfixed / push / pull / pan / truck / orbit / follow / crane
motioninteger1–8
stylePresetstringnone / photo / cinematic / anime / render3d / guofeng / film
refStrengthnumberImage-edit strength 0–1
batchintegerImage batch 1 / 2 / 4
renderTextstringOn-image text, max 120 chars
layer_countintegerLayer count 1–17
cfgnumber1–15
thinkingstringThinking level off / standard / high (Banana image models only)

Aspect ratios

Familyratio
Seedance21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16
Seedream1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9
Grok image1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3
Grok video16:9 / 4:3 / 3:2 / 1:1 / 2:3 / 3:4 / 9:16

Mode rules

  • i2v needs a first frame or reference image.
  • v2v needs a reference video.
  • A video job with a first frame or still is image-to-video. First frame uses first_frame_upload_id. Reference stills use reference_image_upload_ids. Do not mix the two.
  • Grok video accepts 1 still; Grok image accepts 3.
  • Seedance 2.5: 30 images, 10 audio/video clips, 50 assets total. 2.0: 9 images, 3 audio/video clips, 15 total.
  • Images, video and audio references accept either an upload_id or a public HTTPS URL. Both can be mixed and count toward the same limits. URLs must be directly downloadable, up to 2048 characters; private-network and http addresses are rejected.
  • Reference audio is checked for copyright in the output audio; a task may be rejected when the material contains protected music. For reliable results, supply only visual references and let the model generate audio.
  • layer is seedream only: one still, billed by returned layers.

6. Endpoints

List models

GET /api/v1/models

curl https://sogrok.com/api/v1/models \
  -H "Authorization: Bearer hxsk_..."

Returns { "object": "list", "data": [ ... ] }. Each item has id, modes, resolutions, and prices[].

Quote

POST /api/v1/quotes

curl https://sogrok.com/api/v1/quotes \
  -H "Authorization: Bearer hxsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "video.std",
    "prompt": "slow push down a rainy alley, neon reflections",
    "params": {
      "model": "seedance-2-5",
      "mode": "t2v",
      "resolution": "720p",
      "ratio": "16:9",
      "duration": 5
    }
  }'

Success fields: quote_id, price_usd, expires_at, estimated_time_seconds, params. Requote if prompt, SKU, or params change.

Create a job

POST /api/v1/jobs → 202

curl https://sogrok.com/api/v1/jobs \
  -H "Authorization: Bearer hxsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "quote_id": "PASTE_QUOTE_ID",
    "sku": "video.std",
    "prompt": "slow push down a rainy alley, neon reflections",
    "params": {
      "model": "seedance-2-5",
      "mode": "t2v",
      "resolution": "720p",
      "ratio": "16:9",
      "duration": 5
    }
  }'
{
  "job_id": "2f50c75e-...",
  "status": "queued",
  "quoted_price_usd": 0.45,
  "created_at": "2026-09-09T08:00:00.000Z",
  "queue": { "position": 1, "limit": 20 }
}

Creation holds the quoted amount. Do not resubmit the same quote before you know the job status.

Poll a job

GET /api/v1/jobs/:id

curl https://sogrok.com/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer hxsk_..."

Poll until succeeded / failed / rejected. Success includes result.url and usage. Image and video files use the site media URL; add ?thumb=1 for a poster. Chat text is in result.text. usage is { input_tokens, output_tokens, total_tokens } and is 0 until reported.

{
  "job_id": "2f50c75e-...",
  "sku": "video.std",
  "model": "seedance-2-5",
  "status": "succeeded",
  "quoted_price_usd": 0.45,
  "usage": {
    "input_tokens": 0,
    "output_tokens": 40594,
    "total_tokens": 40594
  },
  "result": { "url": "https://sogrok.com/api/v1/jobs/JOB_ID/media" }
}
curl "https://sogrok.com/api/v1/jobs/JOB_ID/media?thumb=1" \
  -H "Authorization: Bearer hxsk_..." \
  -o thumb.webp

History

curl "https://sogrok.com/api/v1/jobs?job_id=2f50" \
  -H "Authorization: Bearer hxsk_..."

Max 20 rows. Filter by full or partial job id.

Upload a reference

POST /api/v1/uploads, multipart/form-data.

slotTypeSize
first / tail / refPNG / JPEG / WebP30 MB
videoMP4 / MOV50 MB
audioMP3 / WAV15 MB
curl https://sogrok.com/api/v1/uploads \
  -H "Authorization: Bearer hxsk_..." \
  -F slot=first \
  -F [email protected]

Write the returned upload_id to first_frame_upload_id or reference_image_upload_ids. 10 uploads per user per minute.

Audio references (audio slot) are capped at 15 seconds per clip; longer uploads are rejected (400 audio_too_long).

{
  "sku": "video.std",
  "prompt": "the subject walks toward camera, outfit unchanged",
  "params": {
    "model": "seedance-2-5",
    "mode": "i2v",
    "resolution": "720p",
    "ratio": "9:16",
    "duration": 5,
    "first_frame_upload_id": "UPLOAD_ID"
  }
}

Wallet

curl https://sogrok.com/api/v1/wallet \
  -H "Authorization: Bearer hxsk_..."

Watch available_usd and frozen_usd. The quoted amount freezes on create and moves after settle or refund.

7. Compat video API

For clients that cannot quote then submit. Path is /v1/videos, not /api/v1. Same auth. The server fills SKU from resolution, quotes, and holds the balance. Use the full API for everything else.

MethodPathPurpose
POST/v1/videosCreate a video job
GET/v1/videos/:idPoll status and result
curl https://sogrok.com/v1/videos \
  -H "Authorization: Bearer hxsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2-5",
    "prompt": "slow push down a rainy alley, neon reflections",
    "duration": 10,
    "resolution": "720p",
    "ratio": "16:9",
    "referenceImages": ["https://example.com/img.jpg"]
  }'
FieldRequiredNotes
modelyesid from GET /api/v1/models, e.g. seedance-2-5
promptyes1–5000 characters
durationyesInteger seconds. Seedance 2.x: -1
resolutionyes480p / 720p / 1080p
ratioyes21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16
referenceImagesnoPublic HTTPS image URLs
referenceVideosnoPublic HTTPS video URLs
referenceAudiosnoPublic HTTPS audio URLs

status is queued / processing / succeeded / failed. The success url expires; download promptly. Local files still need /api/v1/uploads. Insufficient balance returns 400 and creates no job.

8. Integration flow

  1. Create a key and allow the models you need.
  2. GET /api/v1/models to confirm id, modes, resolution, and SKU.
  3. Upload references if required, keep upload_id.
  4. POST /api/v1/quotes for quote_id and price_usd.
  5. Submit the same prompt, SKU, and params to POST /api/v1/jobs.
  6. Poll GET /api/v1/jobs/:id until succeeded, failed, or rejected.
  7. Download result.url. Use ?thumb=1 for posters.
JOB_ID='...'
while true; do
  STATUS=$(curl -sS "https://sogrok.com/api/v1/jobs/$JOB_ID" \
    -H "Authorization: Bearer hxsk_..." \
    | jq -r '.status')
  echo "status=$STATUS"
  case "$STATUS" in
    succeeded|failed|rejected) break ;;
  esac
  sleep 3
done

9. Error codes

HTTPcodeMeaning
400validation_errorInvalid request body
400invalid_sku / invalid_model / invalid_modeModel or SKU mismatch
400unsupported_fieldField not allowed for this model or mode
400missing_referenceImage-to-video or video-to-video missing a reference
400audio_too_longReference audio longer than 15 seconds
400quote_mismatch / invalid_quote / quote_expiredQuote expired or does not match
400insufficient_balance / insufficient_quotaWallet or key quota too low
401unauthorized / invalid_api_keyNot signed in or key invalid
403age_confirmation_required / model_not_allowedAge gate or model not allowed on this key
404job_not_foundJob missing or not owned by this account
409quote_already_used / wallet_busyQuote already used, or retry
429queue_full / rate_limitedQueue full or upload too fast; no extra hold
503generation_unavailableGeneration unavailable; nothing reserved

Moderation rejects are not billed. If submit times out, the hold stays — poll the job instead of resubmitting the same quote.