feat: Higgsfield Cloud API client + model priority fix#975
Conversation
- Fix model priority: Nano Banana Pro (Gemini 3.0) promoted to #1 from #6 Based on Higgsfield's own docs: native 4K, best text rendering, <10s generation - Add REST API client for cloud.higgsfield.ai (separate credit pool from web UI) - apiGenerateImage(): text-to-image via API with polling and auto-download - apiGenerateVideo(): image-to-video via API with file upload support - apiUploadFile(): pre-signed URL upload for local images/videos - apiPollStatus(): exponential backoff polling matching Python SDK pattern - apiStatus(): credential validation and connectivity check - apiRequest(): authenticated fetch with retry on transient errors (408/429/5xx) - Add --api flag: route image/video through REST API with Playwright fallback - Add --api-only flag: API-only mode, fail without fallback - Add api-status command: verify API credentials and connectivity - Add 17 API model ID mappings (7 image, 8 video, 1 edit, 1 reference) - Fix pre-existing syntax error: missing closing brace for batchLipsync() - Self-tests: 78 passing (up from 44), covering all new API logic
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 19:06:47 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Extract shared logic from apiGenerateImage/apiGenerateVideo into: - apiSubmitAndPoll(): submit + poll pattern - apiDownloadImages(): image download + sidecar - apiDownloadVideo(): video download + sidecar - requireApiCredentials(): credential validation - logApiPrompt(): truncated prompt logging Addresses CodeFactor 'Complex Method' notices.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 19:16:15 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
cloud.higgsfield.aiwith--apiflag for image and video generationbatchLipsync()that brokenode --checkand test executionAPI Client Details
Built from the official Higgsfield API docs and Python SDK source analysis:
HF_API_KEY+HF_API_SECRETfromcredentials.shapiGenerateImage()— text-to-image with auto-downloadapiGenerateVideo()— image-to-video with file uploadapiUploadFile()— pre-signed URL pattern from SDKapiPollStatus()— exponential backoff (2s→5s cap, 10min max)--apifalls back to Playwright on failure;--api-onlyfails hardImportant: The API uses a separate credit pool from the web UI subscription. Unlimited models are web-UI only. API credits must be topped up at
cloud.higgsfield.ai/credits.New CLI Flags
New Commands
Tests
78 passing (up from 44) — covers model priority, API flag parsing, model ID mapping, credential loading, and API_MODEL_MAP structure validation.