Skip to content

feat: add CAMB AI API compatibility layer#8753

Open
neilruaro-camb wants to merge 2 commits intomudler:masterfrom
neilruaro-camb:feat/cambai-api
Open

feat: add CAMB AI API compatibility layer#8753
neilruaro-camb wants to merge 2 commits intomudler:masterfrom
neilruaro-camb:feat/cambai-api

Conversation

@neilruaro-camb
Copy link

@neilruaro-camb neilruaro-camb commented Mar 3, 2026

Summary

  • Add CAMB AI-compatible API endpoints to LocalAI, enabling apps using the CAMB AI SDK/API to use LocalAI as a drop-in local replacement
  • Follows the existing ElevenLabs integration pattern (schema structs → endpoint handlers → route registration)
  • Tested against the real camb-sdk Python package to ensure SDK compatibility
  • Includes e2e tests covering all endpoints via mock backend

Endpoints

Endpoint Method Backend Flag
/apis/tts-stream POST ModelTTSStream / ModelTTS FLAG_TTS
/apis/tts POST ModelTTS (async) FLAG_TTS
/apis/tts/:task_id GET Task polling
/apis/translated-tts POST LLM + ModelTTS FLAG_CHAT
/apis/translate POST LLM chat FLAG_CHAT
/apis/translation/stream POST LLM chat FLAG_CHAT
/apis/transcribe POST ModelTranscription FLAG_TRANSCRIPT
/apis/text-to-sound POST SoundGeneration FLAG_SOUND_GENERATION
/apis/list-voices GET Config iteration
/apis/create-custom-voice POST Voice file upload
/apis/audio-separation POST 501 stub

@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 733d573
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69a69b00b60d1c00082af687
😎 Deploy Preview https://deploy-preview-8753--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Add CAMB AI-compatible API endpoints to LocalAI, enabling apps using the
CAMB AI SDK/API to use LocalAI as a drop-in local replacement. Follows
the existing ElevenLabs integration pattern (schema structs, endpoint
handlers, route registration). Includes e2e tests covering all endpoints
via the mock backend.
Tested against the real camb-sdk Python package. Fixes:
- list-voices returns flat array (SDK expects list, not wrapped object)
- text-to-sound returns task_id JSON (SDK expects OrchestratorPipelineCallResult)
- translated-tts returns task_id JSON (SDK expects CreateTranslatedTtsOut)
- translation/stream returns JSON (SDK parses response as JSON)
- transcribe accepts media_url form field without requiring file upload
@localai-bot
Copy link
Contributor

Hello! Thank you for your contribution. Before we can proceed with this PR, we need to have a discussion about the proposed changes.

LocalAI doesn't support cloud-based backends, and there was no issue opened for this feature prior to the PR. We encourage contributors to first open an issue to discuss their proposed changes with the maintainers.

Could you please open an issue describing your use case and proposed implementation? Once we've had a chance to discuss and align on the direction, we can then continue reviewing this PR.

Thank you for your understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants