runapi-infinitetalk 0.1.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: runapi-infinitetalk
3
+ Version: 0.2.1
4
+ Summary: RunAPI InfiniteTalk SDK for audio-driven talking video workflows in JavaScript, Python, Ruby, Go, Java, and PHP
5
+ Project-URL: Homepage, https://runapi.ai/models/infinitetalk
6
+ Project-URL: Documentation, https://runapi.ai/docs/resources/sdks
7
+ Project-URL: Source, https://github.com/runapi-ai/infinitetalk-sdk
8
+ Project-URL: Issues, https://github.com/runapi-ai/infinitetalk-sdk/issues
9
+ Project-URL: Changelog, https://github.com/runapi-ai/infinitetalk-sdk/blob/main/CHANGELOG.md
10
+ Project-URL: Release Notes, https://github.com/runapi-ai/infinitetalk-sdk/releases/tag/python%2Fv0.2.1
11
+ Author-email: RunAPI <contact@runapi.ai>
12
+ License-Expression: Apache-2.0
13
+ Keywords: api,golang,gradle,infinitetalk,infinitetalk-api,java,maven,python,ruby,runapi,runapi-ai,sdk,text-to-video,typescript,video-api,video-generation
14
+ Requires-Python: >=3.9
15
+ Requires-Dist: runapi-core>=0.3.3
16
+ Description-Content-Type: text/markdown
17
+
18
+ # InfiniteTalk Python SDK for RunAPI
19
+
20
+ The InfiniteTalk Python SDK is the language-specific package for InfiniteTalk on RunAPI. Use this package for video generation, animation, and video editing workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.
21
+
22
+ This README is the Python package guide inside the public `infinitetalk-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/infinitetalk; for API reference, use https://runapi.ai/docs/api/infinitetalk/audio-to-video; for SDK docs, use https://runapi.ai/docs/resources/sdks.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ pip install runapi-infinitetalk
28
+ ```
29
+
30
+ ## Quick start
31
+
32
+ ```python
33
+ from runapi.infinitetalk import InfinitetalkClient
34
+
35
+ client = InfinitetalkClient() # reads RUNAPI_API_KEY, or pass api_key="sk-..."
36
+
37
+ task = client.audio_to_video.create(
38
+ model="infinitetalk-from-audio",
39
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
40
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
41
+ prompt="A person speaking to the camera",
42
+ output_resolution="720p",
43
+ )
44
+ status = client.audio_to_video.get(task.id)
45
+ ```
46
+
47
+ Use `create` to submit a task and return quickly, `get` to fetch the latest task state, and `run` to create and poll until completion:
48
+
49
+ ```python
50
+ result = client.audio_to_video.run(
51
+ model="infinitetalk-from-audio",
52
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
53
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
54
+ prompt="A person speaking to the camera",
55
+ )
56
+ print(result.videos[0].url)
57
+ ```
58
+
59
+ In web request handlers, prefer `create` plus webhook or later `get` polling so a worker is not held open.
60
+
61
+ RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
62
+
63
+ ## Language notes
64
+
65
+ Pass parameters as keyword arguments and catch the `runapi.infinitetalk` error classes when building video jobs or scripts. The available resource is `audio_to_video`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
66
+
67
+ ## Links
68
+
69
+ - Model page: https://runapi.ai/models/infinitetalk
70
+ - SDK docs: https://runapi.ai/docs/resources/sdks
71
+ - Product docs: https://runapi.ai/docs/api/infinitetalk/audio-to-video
72
+ - Pricing and rate limits: https://runapi.ai/models/infinitetalk
73
+ - Provider comparison: https://runapi.ai/providers/meigen-ai
74
+ - Full catalog: https://runapi.ai/models
75
+ - Repository: https://github.com/runapi-ai/infinitetalk-sdk
76
+
77
+ ## License
78
+
79
+ Licensed under the Apache License, Version 2.0.
@@ -0,0 +1,62 @@
1
+ # InfiniteTalk Python SDK for RunAPI
2
+
3
+ The InfiniteTalk Python SDK is the language-specific package for InfiniteTalk on RunAPI. Use this package for video generation, animation, and video editing workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.
4
+
5
+ This README is the Python package guide inside the public `infinitetalk-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/infinitetalk; for API reference, use https://runapi.ai/docs/api/infinitetalk/audio-to-video; for SDK docs, use https://runapi.ai/docs/resources/sdks.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install runapi-infinitetalk
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```python
16
+ from runapi.infinitetalk import InfinitetalkClient
17
+
18
+ client = InfinitetalkClient() # reads RUNAPI_API_KEY, or pass api_key="sk-..."
19
+
20
+ task = client.audio_to_video.create(
21
+ model="infinitetalk-from-audio",
22
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
23
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
24
+ prompt="A person speaking to the camera",
25
+ output_resolution="720p",
26
+ )
27
+ status = client.audio_to_video.get(task.id)
28
+ ```
29
+
30
+ Use `create` to submit a task and return quickly, `get` to fetch the latest task state, and `run` to create and poll until completion:
31
+
32
+ ```python
33
+ result = client.audio_to_video.run(
34
+ model="infinitetalk-from-audio",
35
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
36
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
37
+ prompt="A person speaking to the camera",
38
+ )
39
+ print(result.videos[0].url)
40
+ ```
41
+
42
+ In web request handlers, prefer `create` plus webhook or later `get` polling so a worker is not held open.
43
+
44
+ RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
45
+
46
+ ## Language notes
47
+
48
+ Pass parameters as keyword arguments and catch the `runapi.infinitetalk` error classes when building video jobs or scripts. The available resource is `audio_to_video`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
49
+
50
+ ## Links
51
+
52
+ - Model page: https://runapi.ai/models/infinitetalk
53
+ - SDK docs: https://runapi.ai/docs/resources/sdks
54
+ - Product docs: https://runapi.ai/docs/api/infinitetalk/audio-to-video
55
+ - Pricing and rate limits: https://runapi.ai/models/infinitetalk
56
+ - Provider comparison: https://runapi.ai/providers/meigen-ai
57
+ - Full catalog: https://runapi.ai/models
58
+ - Repository: https://github.com/runapi-ai/infinitetalk-sdk
59
+
60
+ ## License
61
+
62
+ Licensed under the Apache License, Version 2.0.
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "runapi-infinitetalk"
7
+ version = "0.2.1"
8
+ description = "RunAPI InfiniteTalk SDK for audio-driven talking video workflows in JavaScript, Python, Ruby, Go, Java, and PHP"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "Apache-2.0"
12
+ authors = [{ name = "RunAPI", email = "contact@runapi.ai" }]
13
+ keywords = ["runapi", "runapi-ai", "infinitetalk", "api", "sdk", "typescript", "python", "ruby", "golang", "java", "maven", "gradle", "video-generation", "text-to-video", "video-api", "infinitetalk-api"]
14
+ dependencies = ["runapi-core>=0.3.3"]
15
+
16
+ [project.urls]
17
+ Homepage = "https://runapi.ai/models/infinitetalk"
18
+ Documentation = "https://runapi.ai/docs/resources/sdks"
19
+ Source = "https://github.com/runapi-ai/infinitetalk-sdk"
20
+ Issues = "https://github.com/runapi-ai/infinitetalk-sdk/issues"
21
+ Changelog = "https://github.com/runapi-ai/infinitetalk-sdk/blob/main/CHANGELOG.md"
22
+ "Release Notes" = "https://github.com/runapi-ai/infinitetalk-sdk/releases/tag/python%2Fv0.2.1"
23
+
24
+ [tool.hatch.build.targets.wheel]
25
+ packages = ["src/runapi"]
26
+
27
+ [tool.uv]
28
+ package = true
29
+
30
+ [dependency-groups]
31
+ dev = ["pytest>=8"]
32
+
33
+ [tool.runapi]
34
+ slug = "infinitetalk"
@@ -4,12 +4,12 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Any, Optional
6
6
 
7
- from runapi.core import ClientOptions, HttpClient, resolve_api_key
7
+ from runapi.core import ProviderClient
8
8
 
9
9
  from .resources.audio_to_video import AudioToVideo
10
10
 
11
11
 
12
- class InfinitetalkClient:
12
+ class InfinitetalkClient(ProviderClient):
13
13
  """InfiniteTalk audio-to-video client.
14
14
 
15
15
  Example::
@@ -17,14 +17,13 @@ class InfinitetalkClient:
17
17
  client = InfinitetalkClient(api_key="sk-...")
18
18
  result = client.audio_to_video.run(
19
19
  model="infinitetalk-from-audio",
20
- source_image_url="https://example.com/face.jpg",
21
- source_audio_url="https://example.com/voice.mp3",
20
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
21
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
22
22
  prompt="A person speaking to the camera",
23
23
  )
24
24
  """
25
25
 
26
26
  def __init__(self, api_key: Optional[str] = None, **options: Any) -> None:
27
- resolved_api_key = resolve_api_key(api_key)
28
- client_options = ClientOptions(api_key=resolved_api_key, **options)
29
- http = client_options.http_client or HttpClient(client_options)
27
+ super().__init__(api_key, **options)
28
+ http = self._http
30
29
  self.audio_to_video = AudioToVideo(http)
@@ -0,0 +1,21 @@
1
+ CONTRACT = {
2
+ "audio-to-video": {
3
+ "models": ["infinitetalk-from-audio"],
4
+ "fields_by_model": {
5
+ "infinitetalk-from-audio": {
6
+ "output_resolution": {
7
+ "enum": ["480p", "720p"]
8
+ },
9
+ "seed": {
10
+ "type": "integer"
11
+ },
12
+ "source_audio_url": {
13
+ "required": True
14
+ },
15
+ "source_image_url": {
16
+ "required": True
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
@@ -2,13 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Any, Dict
5
+ from typing import Any, Dict, Optional
6
6
 
7
- from runapi.core import Resource, ValidationError
7
+ from runapi.core import Resource, ValidationError, RequestOptions
8
8
 
9
+ from ..contract_gen import CONTRACT
9
10
  from ..types import (
10
- MODELS,
11
- RESOLUTIONS,
12
11
  AudioToVideoResponse,
13
12
  CompletedAudioToVideoResponse,
14
13
  )
@@ -25,31 +24,23 @@ class AudioToVideo(Resource):
25
24
  RESPONSE_CLASS = AudioToVideoResponse
26
25
  COMPLETED_RESPONSE_CLASS = CompletedAudioToVideoResponse
27
26
 
28
- def run(self, **params: Any) -> Any:
27
+ def run(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
29
28
  """Create a task and poll until it completes."""
30
- task = self.create(**params)
31
- return self._poll_until_complete(lambda: self.get(task.id))
29
+ task = self.create(options=options, **params)
30
+ return self._poll_until_complete(lambda: self.get(task.id, options=options))
32
31
 
33
- def create(self, **params: Any) -> Any:
32
+ def create(self, options: Optional[RequestOptions] = None, **params: Any) -> Any:
34
33
  """Create an audio-to-video task and return immediately with an ``id``."""
35
34
  compacted = self._compact_params(params)
36
35
  self._validate_params(compacted)
37
- return self._request("post", self.ENDPOINT, body=compacted)
36
+ return self._request("post", self.ENDPOINT, body=compacted, options=options)
38
37
 
39
- def get(self, id: str) -> Any:
38
+ def get(self, id: str, options: Optional[RequestOptions] = None) -> Any:
40
39
  """Fetch the current status of an audio-to-video task."""
41
- return self._request("get", f"{self.ENDPOINT}/{id}")
40
+ return self._request("get", f"{self.ENDPOINT}/{id}", options=options)
42
41
 
43
42
  def _validate_params(self, params: Dict[str, Any]) -> None:
44
- model = params.get("model")
45
- if not model:
46
- raise ValidationError("model is required")
47
- if model not in MODELS:
48
- joined = ", ".join(MODELS)
49
- raise ValidationError(f"Invalid model: {model}. Must be one of: {joined}")
50
-
51
- self._validate_required(params, "source_image_url")
52
- self._validate_required(params, "source_audio_url")
43
+ self._validate_contract(CONTRACT["audio-to-video"], params)
53
44
 
54
45
  prompt = params.get("prompt")
55
46
  if not (isinstance(prompt, str) and prompt != ""):
@@ -57,8 +48,6 @@ class AudioToVideo(Resource):
57
48
  if len(prompt) > PROMPT_MAX_LENGTH:
58
49
  raise ValidationError(f"prompt must be at most {PROMPT_MAX_LENGTH} characters")
59
50
 
60
- self._validate_optional(params, "output_resolution", RESOLUTIONS)
61
-
62
51
  seed = params.get("seed")
63
52
  if seed is None:
64
53
  return
@@ -71,13 +60,6 @@ class AudioToVideo(Resource):
71
60
  f"seed must be an integer between {SEED_RANGE.start} and {SEED_RANGE.stop - 1}"
72
61
  )
73
62
 
74
- @staticmethod
75
- def _validate_required(params: Dict[str, Any], key: str) -> None:
76
- value = params.get(key)
77
- present = (value != "") if isinstance(value, str) else (value is not None)
78
- if not present:
79
- raise ValidationError(f"{key} is required")
80
-
81
63
  @staticmethod
82
64
  def _parse_integer(value: Any) -> Any:
83
65
  """Mirror Ruby ``Integer(value, exception: false)``.
@@ -1,12 +1,9 @@
1
- """InfiniteTalk model lists, enums, and response models."""
1
+ """InfiniteTalk response models."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
5
  from runapi.core import BaseModel, TaskResponse, optional, required
6
6
 
7
- MODELS = ["infinitetalk-from-audio"]
8
- RESOLUTIONS = ["480p", "720p"]
9
-
10
7
 
11
8
  class Video(BaseModel):
12
9
  url = optional(str)
@@ -33,8 +33,8 @@ def reset_config(monkeypatch):
33
33
 
34
34
  VALID_PARAMS = dict(
35
35
  model="infinitetalk-from-audio",
36
- source_image_url="https://example.com/face.jpg",
37
- source_audio_url="https://example.com/voice.mp3",
36
+ source_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
37
+ source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
38
38
  prompt="A person speaking to the camera",
39
39
  )
40
40
 
@@ -94,8 +94,8 @@ def test_create_posts_compacted_body():
94
94
  "/api/v1/infinitetalk/audio_to_video",
95
95
  {
96
96
  "model": "infinitetalk-from-audio",
97
- "source_image_url": "https://example.com/face.jpg",
98
- "source_audio_url": "https://example.com/voice.mp3",
97
+ "source_image_url": "https://cdn.runapi.ai/public/samples/portrait.jpg",
98
+ "source_audio_url": "https://cdn.runapi.ai/public/samples/voice.mp3",
99
99
  "prompt": "A person speaking to the camera",
100
100
  "output_resolution": "720p",
101
101
  },
@@ -131,14 +131,14 @@ def test_run_polls_and_narrows_completed_type():
131
131
  def test_create_requires_model():
132
132
  client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
133
133
  params = {k: v for k, v in VALID_PARAMS.items() if k != "model"}
134
- with pytest.raises(ValidationError, match="model is required"):
134
+ with pytest.raises(ValidationError, match="model must be one of: infinitetalk-from-audio"):
135
135
  client.audio_to_video.create(**params)
136
136
 
137
137
 
138
138
  def test_create_rejects_unknown_model():
139
139
  client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
140
140
  params = {**VALID_PARAMS, "model": "not-a-model"}
141
- with pytest.raises(ValidationError, match="Invalid model"):
141
+ with pytest.raises(ValidationError, match="model must be one of: infinitetalk-from-audio"):
142
142
  client.audio_to_video.create(**params)
143
143
 
144
144
 
@@ -173,7 +173,7 @@ def test_create_rejects_overlong_prompt():
173
173
  def test_create_rejects_invalid_resolution():
174
174
  client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
175
175
  params = {**VALID_PARAMS, "output_resolution": "1080p"}
176
- with pytest.raises(ValidationError, match="Invalid output_resolution"):
176
+ with pytest.raises(ValidationError, match="output_resolution must be one of: 480p, 720p"):
177
177
  client.audio_to_video.create(**params)
178
178
 
179
179
 
@@ -198,18 +198,14 @@ def test_create_rejects_seed_above_range():
198
198
  def test_create_rejects_non_integer_seed():
199
199
  client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
200
200
  params = {**VALID_PARAMS, "seed": "not-a-number"}
201
- with pytest.raises(
202
- ValidationError, match="seed must be an integer between 10000 and 1000000"
203
- ):
201
+ with pytest.raises(ValidationError, match="seed must be an integer"):
204
202
  client.audio_to_video.create(**params)
205
203
 
206
204
 
207
205
  def test_create_rejects_bool_seed():
208
206
  client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
209
207
  params = {**VALID_PARAMS, "seed": True}
210
- with pytest.raises(
211
- ValidationError, match="seed must be an integer between 10000 and 1000000"
212
- ):
208
+ with pytest.raises(ValidationError, match="seed must be an integer"):
213
209
  client.audio_to_video.create(**params)
214
210
 
215
211
 
@@ -220,8 +216,7 @@ def test_create_accepts_seed_in_range():
220
216
  assert fake.calls[0][2]["seed"] == 500_000
221
217
 
222
218
 
223
- def test_create_accepts_integer_string_seed():
224
- fake = FakeHttp({"id": "t1", "status": "pending"})
225
- client = InfinitetalkClient(api_key="k", http_client=fake)
226
- client.audio_to_video.create(**VALID_PARAMS, seed="500000")
227
- assert fake.calls[0][2]["seed"] == "500000"
219
+ def test_create_rejects_integer_string_seed():
220
+ client = InfinitetalkClient(api_key="k", http_client=FakeHttp())
221
+ with pytest.raises(ValidationError, match="seed must be an integer"):
222
+ client.audio_to_video.create(**VALID_PARAMS, seed="500000")
@@ -1,29 +0,0 @@
1
- # Build artifacts
2
- dist/
3
- build/
4
- *.egg-info/
5
- *.egg
6
-
7
- # Bytecode
8
- __pycache__/
9
- *.py[cod]
10
-
11
- # Virtual environments
12
- .venv/
13
- venv/
14
-
15
- # uv
16
- uv.lock
17
-
18
- # Test / type caches
19
- .pytest_cache/
20
- .mypy_cache/
21
- .ruff_cache/
22
- .coverage
23
- htmlcov/
24
-
25
- # IDE / OS
26
- .idea/
27
- .vscode/
28
- *.swp
29
- .DS_Store
@@ -1,84 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: runapi-infinitetalk
3
- Version: 0.1.0
4
- Summary: InfiniteTalk audio-to-video client for RunAPI
5
- Project-URL: Homepage, https://runapi.ai/models/infinitetalk
6
- Project-URL: Documentation, https://runapi.ai/docs#sdk-infinitetalk
7
- Author-email: RunAPI <contact@runapi.ai>
8
- License-Expression: Apache-2.0
9
- Keywords: ai,audio-to-video,infinitetalk,runapi,sdk
10
- Requires-Python: >=3.9
11
- Requires-Dist: runapi-core
12
- Description-Content-Type: text/markdown
13
-
14
- # InfiniteTalk Python SDK for RunAPI
15
-
16
- The InfiniteTalk Python SDK is the language-specific package for InfiniteTalk on
17
- RunAPI. Use it for audio-to-video flows when your application needs JSON request
18
- bodies, task status lookup, and consistent RunAPI errors in Python.
19
-
20
- For model details, use https://runapi.ai/models/infinitetalk; for API reference,
21
- use https://runapi.ai/docs#infinitetalk; for SDK docs, use
22
- https://runapi.ai/docs#sdk-infinitetalk.
23
-
24
- ## Install
25
-
26
- ```bash
27
- pip install runapi-infinitetalk
28
- ```
29
-
30
- ## Quick start
31
-
32
- ```python
33
- from runapi.infinitetalk import InfinitetalkClient
34
-
35
- client = InfinitetalkClient() # reads RUNAPI_API_KEY, or pass api_key="sk-..."
36
-
37
- task = client.audio_to_video.create(
38
- model="infinitetalk-from-audio",
39
- source_image_url="https://example.com/face.jpg",
40
- source_audio_url="https://example.com/voice.mp3",
41
- prompt="A person speaking to the camera",
42
- output_resolution="720p",
43
- )
44
- status = client.audio_to_video.get(task.id)
45
- ```
46
-
47
- Use `create` to submit a task and return quickly, `get` to fetch the latest task
48
- state, and `run` to create and poll until completion:
49
-
50
- ```python
51
- result = client.audio_to_video.run(
52
- model="infinitetalk-from-audio",
53
- source_image_url="https://example.com/face.jpg",
54
- source_audio_url="https://example.com/voice.mp3",
55
- prompt="A person speaking to the camera",
56
- )
57
- print(result.videos[0].url)
58
- ```
59
-
60
- In web request handlers, prefer `create` plus webhook or later `get` polling so a
61
- worker is not held open.
62
-
63
- RunAPI-generated file URLs are temporary. Download and store generated videos in
64
- your own durable storage within 7 days; do not treat returned URLs as long-term
65
- assets.
66
-
67
- ## Language notes
68
-
69
- Pass parameters as keyword arguments and catch the `runapi.infinitetalk` error
70
- classes when building video jobs or scripts. The available resource is
71
- `audio_to_video`. Keep `RUNAPI_API_KEY` in the environment or your secret
72
- manager; never commit API keys or callback secrets.
73
-
74
- ## Links
75
-
76
- - Model page: https://runapi.ai/models/infinitetalk
77
- - SDK docs: https://runapi.ai/docs#sdk-infinitetalk
78
- - Product docs: https://runapi.ai/docs#infinitetalk
79
- - Pricing and rate limits: https://runapi.ai/models/infinitetalk
80
- - Full catalog: https://runapi.ai/models
81
-
82
- ## License
83
-
84
- Licensed under the Apache License, Version 2.0.
@@ -1,71 +0,0 @@
1
- # InfiniteTalk Python SDK for RunAPI
2
-
3
- The InfiniteTalk Python SDK is the language-specific package for InfiniteTalk on
4
- RunAPI. Use it for audio-to-video flows when your application needs JSON request
5
- bodies, task status lookup, and consistent RunAPI errors in Python.
6
-
7
- For model details, use https://runapi.ai/models/infinitetalk; for API reference,
8
- use https://runapi.ai/docs#infinitetalk; for SDK docs, use
9
- https://runapi.ai/docs#sdk-infinitetalk.
10
-
11
- ## Install
12
-
13
- ```bash
14
- pip install runapi-infinitetalk
15
- ```
16
-
17
- ## Quick start
18
-
19
- ```python
20
- from runapi.infinitetalk import InfinitetalkClient
21
-
22
- client = InfinitetalkClient() # reads RUNAPI_API_KEY, or pass api_key="sk-..."
23
-
24
- task = client.audio_to_video.create(
25
- model="infinitetalk-from-audio",
26
- source_image_url="https://example.com/face.jpg",
27
- source_audio_url="https://example.com/voice.mp3",
28
- prompt="A person speaking to the camera",
29
- output_resolution="720p",
30
- )
31
- status = client.audio_to_video.get(task.id)
32
- ```
33
-
34
- Use `create` to submit a task and return quickly, `get` to fetch the latest task
35
- state, and `run` to create and poll until completion:
36
-
37
- ```python
38
- result = client.audio_to_video.run(
39
- model="infinitetalk-from-audio",
40
- source_image_url="https://example.com/face.jpg",
41
- source_audio_url="https://example.com/voice.mp3",
42
- prompt="A person speaking to the camera",
43
- )
44
- print(result.videos[0].url)
45
- ```
46
-
47
- In web request handlers, prefer `create` plus webhook or later `get` polling so a
48
- worker is not held open.
49
-
50
- RunAPI-generated file URLs are temporary. Download and store generated videos in
51
- your own durable storage within 7 days; do not treat returned URLs as long-term
52
- assets.
53
-
54
- ## Language notes
55
-
56
- Pass parameters as keyword arguments and catch the `runapi.infinitetalk` error
57
- classes when building video jobs or scripts. The available resource is
58
- `audio_to_video`. Keep `RUNAPI_API_KEY` in the environment or your secret
59
- manager; never commit API keys or callback secrets.
60
-
61
- ## Links
62
-
63
- - Model page: https://runapi.ai/models/infinitetalk
64
- - SDK docs: https://runapi.ai/docs#sdk-infinitetalk
65
- - Product docs: https://runapi.ai/docs#infinitetalk
66
- - Pricing and rate limits: https://runapi.ai/models/infinitetalk
67
- - Full catalog: https://runapi.ai/models
68
-
69
- ## License
70
-
71
- Licensed under the Apache License, Version 2.0.
@@ -1,30 +0,0 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "runapi-infinitetalk"
7
- version = "0.1.0"
8
- description = "InfiniteTalk audio-to-video client for RunAPI"
9
- readme = "README.md"
10
- requires-python = ">=3.9"
11
- license = "Apache-2.0"
12
- authors = [{ name = "RunAPI", email = "contact@runapi.ai" }]
13
- keywords = ["runapi", "infinitetalk", "audio-to-video", "ai", "sdk"]
14
- dependencies = ["runapi-core"]
15
-
16
- [project.urls]
17
- Homepage = "https://runapi.ai/models/infinitetalk"
18
- Documentation = "https://runapi.ai/docs#sdk-infinitetalk"
19
-
20
- [tool.hatch.build.targets.wheel]
21
- packages = ["src/runapi"]
22
-
23
- [tool.uv]
24
- package = true
25
-
26
- [tool.uv.sources]
27
- runapi-core = { path = "../runapi-core", editable = true }
28
-
29
- [dependency-groups]
30
- dev = ["pytest>=8"]