runapi-core 0.2.3__tar.gz → 0.2.5__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.
- {runapi_core-0.2.3 → runapi_core-0.2.5}/PKG-INFO +8 -3
- {runapi_core-0.2.3 → runapi_core-0.2.5}/README.md +6 -1
- {runapi_core-0.2.3 → runapi_core-0.2.5}/pyproject.toml +1 -1
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/contract_gen.py +84 -4
- runapi_core-0.2.5/src/runapi/core/version.py +1 -0
- runapi_core-0.2.3/src/runapi/core/version.py +0 -1
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/__init__.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/auth.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/config.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/constants.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/errors.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/files.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/http_client.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/models.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/multipart.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/options.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/polling.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/py.typed +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/resource.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/src/runapi/core/response.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_auth.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_config.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_errors.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_files.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_http_client.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_models.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_polling.py +0 -0
- {runapi_core-0.2.3 → runapi_core-0.2.5}/tests/test_resource.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runapi-core
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: RunAPI core SDK for JavaScript, Python, Ruby, Go, Java, and PHP
|
|
5
5
|
Project-URL: Homepage, https://runapi.ai/models
|
|
6
6
|
Project-URL: Documentation, https://runapi.ai/docs#runapi-sdks
|
|
7
7
|
Project-URL: Source, https://github.com/runapi-ai/core-sdk
|
|
8
8
|
Project-URL: Issues, https://github.com/runapi-ai/core-sdk/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/runapi-ai/core-sdk/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Release Notes, https://github.com/runapi-ai/core-sdk/releases/tag/python%2Fv0.2.
|
|
10
|
+
Project-URL: Release Notes, https://github.com/runapi-ai/core-sdk/releases/tag/python%2Fv0.2.5
|
|
11
11
|
Author-email: RunAPI <contact@runapi.ai>
|
|
12
12
|
License-Expression: Apache-2.0
|
|
13
13
|
Keywords: api,core,golang,gradle,java,maven,pypi,python,ruby,runapi,runapi-ai,sdk,typescript
|
|
@@ -39,6 +39,8 @@ runapi.configure(api_key="sk-...") # or set RUNAPI_API_KEY in the environment
|
|
|
39
39
|
|
|
40
40
|
RunAPI accepts an optional `X-Client-Request-Id` header on public API calls. Use printable ASCII values up to 512 characters. Accepted values are echoed in the response and stored with the RunAPI task for support and reconciliation.
|
|
41
41
|
|
|
42
|
+
Task-creation calls also accept an optional opaque `Idempotency-Key` up to 512 characters. Generate one value per logical task and reuse it only with identical input after an unknown result. Reusing the value with different input returns `409 Conflict`; do not derive it from `X-Client-Request-Id`.
|
|
43
|
+
|
|
42
44
|
High-level Python Provider Client resource methods accept per-request options and keep response headers on the returned model object. This example uses the Suno Provider Client; install `runapi-suno` to run it.
|
|
43
45
|
|
|
44
46
|
```python
|
|
@@ -49,7 +51,10 @@ from runapi.suno import SunoClient
|
|
|
49
51
|
|
|
50
52
|
client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
|
|
51
53
|
options = RequestOptions(
|
|
52
|
-
headers={
|
|
54
|
+
headers={
|
|
55
|
+
"X-Client-Request-Id": "order-123",
|
|
56
|
+
"Idempotency-Key": "opaque-logical-task-123",
|
|
57
|
+
},
|
|
53
58
|
)
|
|
54
59
|
|
|
55
60
|
response = client.text_to_music.create(
|
|
@@ -22,6 +22,8 @@ runapi.configure(api_key="sk-...") # or set RUNAPI_API_KEY in the environment
|
|
|
22
22
|
|
|
23
23
|
RunAPI accepts an optional `X-Client-Request-Id` header on public API calls. Use printable ASCII values up to 512 characters. Accepted values are echoed in the response and stored with the RunAPI task for support and reconciliation.
|
|
24
24
|
|
|
25
|
+
Task-creation calls also accept an optional opaque `Idempotency-Key` up to 512 characters. Generate one value per logical task and reuse it only with identical input after an unknown result. Reusing the value with different input returns `409 Conflict`; do not derive it from `X-Client-Request-Id`.
|
|
26
|
+
|
|
25
27
|
High-level Python Provider Client resource methods accept per-request options and keep response headers on the returned model object. This example uses the Suno Provider Client; install `runapi-suno` to run it.
|
|
26
28
|
|
|
27
29
|
```python
|
|
@@ -32,7 +34,10 @@ from runapi.suno import SunoClient
|
|
|
32
34
|
|
|
33
35
|
client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
|
|
34
36
|
options = RequestOptions(
|
|
35
|
-
headers={
|
|
37
|
+
headers={
|
|
38
|
+
"X-Client-Request-Id": "order-123",
|
|
39
|
+
"Idempotency-Key": "opaque-logical-task-123",
|
|
40
|
+
},
|
|
36
41
|
)
|
|
37
42
|
|
|
38
43
|
response = client.text_to_music.create(
|
|
@@ -19,7 +19,7 @@ Documentation = "https://runapi.ai/docs#runapi-sdks"
|
|
|
19
19
|
Source = "https://github.com/runapi-ai/core-sdk"
|
|
20
20
|
Issues = "https://github.com/runapi-ai/core-sdk/issues"
|
|
21
21
|
Changelog = "https://github.com/runapi-ai/core-sdk/blob/main/CHANGELOG.md"
|
|
22
|
-
"Release Notes" = "https://github.com/runapi-ai/core-sdk/releases/tag/python%2Fv0.2.
|
|
22
|
+
"Release Notes" = "https://github.com/runapi-ai/core-sdk/releases/tag/python%2Fv0.2.5"
|
|
23
23
|
|
|
24
24
|
[tool.hatch.version]
|
|
25
25
|
path = "src/runapi/core/version.py"
|
|
@@ -632,8 +632,23 @@ CONTRACT = {
|
|
|
632
632
|
"kling-v1-avatar-standard": {}
|
|
633
633
|
}
|
|
634
634
|
},
|
|
635
|
+
"kling/extend-video": {
|
|
636
|
+
"models": ["kling-v2.5-turbo-image-to-video-pro", "kling-v2.5-turbo-text-to-video-pro"],
|
|
637
|
+
"fields_by_model": {
|
|
638
|
+
"kling-v2.5-turbo-image-to-video-pro": {
|
|
639
|
+
"mode": {
|
|
640
|
+
"enum": ["std", "pro"]
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"kling-v2.5-turbo-text-to-video-pro": {
|
|
644
|
+
"mode": {
|
|
645
|
+
"enum": ["std", "pro"]
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
635
650
|
"kling/image-to-video": {
|
|
636
|
-
"models": ["kling-v2.1-master-image-to-video", "kling-v2.1-pro", "kling-v2.1-standard", "kling-v2.5-turbo-image-to-video-pro", "kling-v2.6", "kling-v3-turbo-image-to-video"],
|
|
651
|
+
"models": ["kling-v2.1-master-image-to-video", "kling-v2.1-pro", "kling-v2.1-standard", "kling-v2.5-turbo-image-to-video-pro", "kling-v2.6", "kling-v3-omni", "kling-v3-turbo-image-to-video"],
|
|
637
652
|
"fields_by_model": {
|
|
638
653
|
"kling-v2.1-master-image-to-video": {
|
|
639
654
|
"duration_seconds": {
|
|
@@ -666,6 +681,17 @@ CONTRACT = {
|
|
|
666
681
|
"enum": ["std", "pro"]
|
|
667
682
|
}
|
|
668
683
|
},
|
|
684
|
+
"kling-v3-omni": {
|
|
685
|
+
"aspect_ratio": {
|
|
686
|
+
"enum": ["16:9", "9:16", "1:1"]
|
|
687
|
+
},
|
|
688
|
+
"duration_seconds": {
|
|
689
|
+
"enum": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
690
|
+
},
|
|
691
|
+
"output_resolution": {
|
|
692
|
+
"enum": ["720p", "1080p", "4k"]
|
|
693
|
+
}
|
|
694
|
+
},
|
|
669
695
|
"kling-v3-turbo-image-to-video": {
|
|
670
696
|
"duration_seconds": {
|
|
671
697
|
"enum": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
@@ -677,7 +703,7 @@ CONTRACT = {
|
|
|
677
703
|
}
|
|
678
704
|
},
|
|
679
705
|
"kling/motion-control": {
|
|
680
|
-
"models": ["kling-3.0"],
|
|
706
|
+
"models": ["kling-3.0", "kling-v2.6"],
|
|
681
707
|
"fields_by_model": {
|
|
682
708
|
"kling-3.0": {
|
|
683
709
|
"background_source": {
|
|
@@ -689,11 +715,19 @@ CONTRACT = {
|
|
|
689
715
|
"output_resolution": {
|
|
690
716
|
"enum": ["720p", "1080p"]
|
|
691
717
|
}
|
|
718
|
+
},
|
|
719
|
+
"kling-v2.6": {
|
|
720
|
+
"character_orientation": {
|
|
721
|
+
"enum": ["video", "image"]
|
|
722
|
+
},
|
|
723
|
+
"output_resolution": {
|
|
724
|
+
"enum": ["720p", "1080p"]
|
|
725
|
+
}
|
|
692
726
|
}
|
|
693
727
|
}
|
|
694
728
|
},
|
|
695
729
|
"kling/text-to-video": {
|
|
696
|
-
"models": ["kling-3.0", "kling-v2.1-master-text-to-video", "kling-v2.5-turbo-text-to-video-pro", "kling-v2.6", "kling-v3-turbo-text-to-video"],
|
|
730
|
+
"models": ["kling-3.0", "kling-v2.1-master-text-to-video", "kling-v2.5-turbo-text-to-video-pro", "kling-v2.6", "kling-v3-omni", "kling-v3-turbo-text-to-video"],
|
|
697
731
|
"fields_by_model": {
|
|
698
732
|
"kling-3.0": {
|
|
699
733
|
"aspect_ratio": {
|
|
@@ -733,6 +767,17 @@ CONTRACT = {
|
|
|
733
767
|
"enum": ["std", "pro"]
|
|
734
768
|
}
|
|
735
769
|
},
|
|
770
|
+
"kling-v3-omni": {
|
|
771
|
+
"aspect_ratio": {
|
|
772
|
+
"enum": ["16:9", "9:16", "1:1"]
|
|
773
|
+
},
|
|
774
|
+
"duration_seconds": {
|
|
775
|
+
"enum": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
776
|
+
},
|
|
777
|
+
"output_resolution": {
|
|
778
|
+
"enum": ["720p", "1080p", "4k"]
|
|
779
|
+
}
|
|
780
|
+
},
|
|
736
781
|
"kling-v3-turbo-text-to-video": {
|
|
737
782
|
"aspect_ratio": {
|
|
738
783
|
"enum": ["16:9", "9:16", "1:1"]
|
|
@@ -886,12 +931,47 @@ CONTRACT = {
|
|
|
886
931
|
}
|
|
887
932
|
},
|
|
888
933
|
"producer/text-to-music": {
|
|
889
|
-
"models": ["fuzz-2.0"],
|
|
934
|
+
"models": ["fuzz-0.8", "fuzz-1.0", "fuzz-1.0-pro", "fuzz-1.1", "fuzz-1.1-pro", "fuzz-2.0", "fuzz-2.0-pro", "fuzz-2.0-raw"],
|
|
890
935
|
"fields_by_model": {
|
|
936
|
+
"fuzz-0.8": {
|
|
937
|
+
"vocal_mode": {
|
|
938
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
"fuzz-1.0": {
|
|
942
|
+
"vocal_mode": {
|
|
943
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
"fuzz-1.0-pro": {
|
|
947
|
+
"vocal_mode": {
|
|
948
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"fuzz-1.1": {
|
|
952
|
+
"vocal_mode": {
|
|
953
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"fuzz-1.1-pro": {
|
|
957
|
+
"vocal_mode": {
|
|
958
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
959
|
+
}
|
|
960
|
+
},
|
|
891
961
|
"fuzz-2.0": {
|
|
892
962
|
"vocal_mode": {
|
|
893
963
|
"enum": ["exact_lyrics", "instrumental"]
|
|
894
964
|
}
|
|
965
|
+
},
|
|
966
|
+
"fuzz-2.0-pro": {
|
|
967
|
+
"vocal_mode": {
|
|
968
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
"fuzz-2.0-raw": {
|
|
972
|
+
"vocal_mode": {
|
|
973
|
+
"enum": ["exact_lyrics", "instrumental"]
|
|
974
|
+
}
|
|
895
975
|
}
|
|
896
976
|
}
|
|
897
977
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|