{"data":{"slug":"elevenlabs-elevenlabs-python","name":"elevenlabs-python","tagline":"Official Python SDK for ElevenLabs API.","github_url":"https://github.com/elevenlabs/elevenlabs-python","owner":"elevenlabs","repo":"elevenlabs-python","owner_avatar_url":"https://avatars.githubusercontent.com/u/94471909?v=4","primary_language":"Python","stars":3104,"forks":448,"topics":["artificial-intelligence","conversational-ai","text-to-speech"],"archived":false,"github_pushed_at":"2026-09-16T15:32:46+00:00","maintenance_label":"Very active","stars_delta_30d":56,"url":"https://www.graphcanon.com/tools/elevenlabs-elevenlabs-python","markdown_url":"https://www.graphcanon.com/tools/elevenlabs-elevenlabs-python.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/elevenlabs-elevenlabs-python","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=elevenlabs-elevenlabs-python","description":"The official Python SDK for the ElevenLabs API.","homepage_url":"https://elevenlabs.io/docs/api-reference/overview","license":"MIT","open_issues":38,"watchers":50,"ai_summary":"The elevenlabs-python repository offers an official Python software development kit (SDK) that facilitates interaction with the ElevenLabs text-to-speech service through its API.","readme_excerpt":"## Install\n\n```bash\npip install elevenlabs\n```\n\n---\n\n### Quick Start\n\n```python\nimport asyncio\nfrom openai import AsyncOpenAI\nfrom elevenlabs import AsyncElevenLabs\n\nopenai_client = AsyncOpenAI()\nelevenlabs = AsyncElevenLabs()\n\nasync def main():\n    engine = await elevenlabs.speech_engine.get(\"seng_123\")\n\n    async def on_transcript(transcript, session):\n        stream = await openai_client.responses.create(\n            model=\"gpt-4o\",\n            input=[\n                {\"role\": \"assistant\" if m.role == \"agent\" else m.role, \"content\": m.content}\n                for m in transcript\n            ],\n            stream=True,\n        )\n        await session.send_response(stream)\n\n    async def on_init(conversation_id, session):\n        print(f\"Session started: {conversation_id}\")\n\n    async def on_close(session):\n        print(f\"Session ended: {session.conversation_id}\")\n\n    async def on_error(err, session):\n        print(f\"Error: {err}\")\n\n    await engine.serve(\n        port=3001,\n        debug=True,\n        on_init=on_init,\n        on_transcript=on_transcript,\n        on_close=on_close,\n        on_error=on_error,\n    )\n\nasyncio.run(main())\n```","github_created_at":"2023-03-26T11:59:52+00:00","created_at":"2026-07-11T12:07:59.195996+00:00","updated_at":"2026-09-20T07:07:38.296179+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"},{"slug":"speech-audio","name":"Speech & Audio","url":"https://www.graphcanon.com/categories/speech-audio","markdown_url":"https://www.graphcanon.com/categories/speech-audio.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/speech-audio"}],"tags":[{"slug":"api-integration","name":"api integration"},{"slug":"python-sdk","name":"python sdk"},{"slug":"text-to-speech","name":"text-to-speech"}],"trust":{"provenance":{"is_fork":false,"github_id":619143361,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-20T07:07:36.040Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":16,"days_since_push":3,"last_release_at":"2026-09-11T15:50:01Z","stars_delta_30d":56,"open_issues_delta_30d":18},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":24,"high_count":0,"last_scan_at":"2026-07-11T12:08:05.381Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-20T07:07:37.080Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-20T07:07:37.080Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-20T07:07:37.080Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"The API usage costs are determined by ElevenLabs billing policies and not the SDK itself, which is available under the MIT license for free use."},"requirements":{"notes":["Install via pip.","Requires Python asyncio knowledge for effective asynchronous process management within the application."]},"constraints":{"pricing_model":"freemium"},"when_to_use":["You need to integrate advanced text-to-speech in your application that supports real-time conversation sessions with robust error and lifecycle event handling.","Your project requires a Python-based tool that offers fine-grained control over speech engines and can manage asynchronous responses, leveraging ElevenLabs' service capabilities."],"when_not_to_use":["You are looking for a simpler integration that does not require managing real-time sessions with custom events such as on_transcript or on_error.","Your project needs synchronous calls exclusively, as the elevenlabs-python SDK focuses heavily on asynchronous processes which may complicate implementation if synchronous behavior is desired."],"source":"enrich:decision_facts","observed_at":"2026-07-17T12:11:56.725Z"},"constraint_facets":{"pricing_model":"freemium"},"decision_summary":[{"label":"Pricing","value":"freemium - The API usage costs are determined by ElevenLabs billing policies and not the SDK itself, which is available under the MIT license for free use."},{"label":"Requirements","value":"Install via pip.; Requires Python asyncio knowledge for effective asynchronous process management within the application."},{"label":"Adopt for","value":"The official Python SDK for ElevenLabs API which provides text-to-speech capabilities through asynchronous interaction supporting live session management and transcription handling."}]}}