codai-sdk 0.70.0__tar.gz → 0.71.0__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.
Files changed (99) hide show
  1. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/CHANGELOG.md +6 -0
  2. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/PKG-INFO +1 -1
  3. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/pyproject.toml +1 -1
  4. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/__init__.py +1 -1
  5. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/_types.py +35 -3
  6. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/productions.py +17 -6
  7. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_resources.py +1 -1
  8. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  9. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  10. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.github/dependabot.yml +0 -0
  11. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.github/pull_request_template.md +0 -0
  12. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.github/workflows/publish.yml +0 -0
  13. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/.gitignore +0 -0
  14. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/CODE_OF_CONDUCT.md +0 -0
  15. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/CONTRIBUTING.md +0 -0
  16. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/LICENSE +0 -0
  17. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/README.md +0 -0
  18. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/SECURITY.md +0 -0
  19. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/examples/agent.py +0 -0
  20. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/examples/chat.py +0 -0
  21. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/examples/feedback.py +0 -0
  22. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/examples/streaming.py +0 -0
  23. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/scripts/gen-types.py +0 -0
  24. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/scripts/smoke_local.py +0 -0
  25. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/_http.py +0 -0
  26. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/_operations.py +0 -0
  27. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/_resolve_types.py +0 -0
  28. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/__init__.py +0 -0
  29. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/_base.py +0 -0
  30. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/abuse_reports.py +0 -0
  31. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/agents.py +0 -0
  32. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/batches.py +0 -0
  33. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/billing.py +0 -0
  34. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/brand_kits.py +0 -0
  35. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/cards.py +0 -0
  36. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/chat.py +0 -0
  37. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/core.py +0 -0
  38. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/creatives.py +0 -0
  39. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/environments.py +0 -0
  40. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/exports.py +0 -0
  41. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/lists.py +0 -0
  42. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/lyrics.py +0 -0
  43. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/media_ops.py +0 -0
  44. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/memory.py +0 -0
  45. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/messages.py +0 -0
  46. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/music_room.py +0 -0
  47. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/platform.py +0 -0
  48. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/prompts.py +0 -0
  49. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/provenance.py +0 -0
  50. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/referrals.py +0 -0
  51. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/research.py +0 -0
  52. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/resolve.py +0 -0
  53. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/responses.py +0 -0
  54. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/sandboxes.py +0 -0
  55. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/schedules.py +0 -0
  56. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/sessions.py +0 -0
  57. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/shares.py +0 -0
  58. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/templates.py +0 -0
  59. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/transcripts.py +0 -0
  60. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/triggers.py +0 -0
  61. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/usage_keys.py +0 -0
  62. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/vault.py +0 -0
  63. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/voice_revocations.py +0 -0
  64. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/src/codai/resources/voices.py +0 -0
  65. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/conftest.py +0 -0
  66. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_abuse_reports.py +0 -0
  67. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_batches.py +0 -0
  68. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_billing_referrals.py +0 -0
  69. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_brand_kits.py +0 -0
  70. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_cards.py +0 -0
  71. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_creatives.py +0 -0
  72. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_creatives_cx07.py +0 -0
  73. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_creatives_documents.py +0 -0
  74. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_creatives_e11.py +0 -0
  75. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_creatives_e11b.py +0 -0
  76. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_environments_exec.py +0 -0
  77. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_exports.py +0 -0
  78. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_http.py +0 -0
  79. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_lists.py +0 -0
  80. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_lyrics.py +0 -0
  81. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_media_ops.py +0 -0
  82. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_memory.py +0 -0
  83. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_music_room.py +0 -0
  84. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_os_gate.py +0 -0
  85. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_parity.py +0 -0
  86. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_productions.py +0 -0
  87. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_prompts.py +0 -0
  88. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_provenance.py +0 -0
  89. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_research.py +0 -0
  90. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_resolve.py +0 -0
  91. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_sandboxes.py +0 -0
  92. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_settings.py +0 -0
  93. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_shares_e12a.py +0 -0
  94. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_templates.py +0 -0
  95. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_transcripts.py +0 -0
  96. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_vault.py +0 -0
  97. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_voice_revocations.py +0 -0
  98. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/tests/test_voices.py +0 -0
  99. {codai_sdk-0.70.0 → codai_sdk-0.71.0}/uv.lock +0 -0
@@ -6,6 +6,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.71.0] - 2026-10-24
10
+
11
+ - `productions.create(kind=..., duration_s=...)`: 8 production kinds (video, image, deck, doc, sheet, audio,
12
+ carousel, print) and a 15-60 s target length for video; non-video responses carry `kind`, `output_asset_id` and
13
+ `outputs`.
14
+
9
15
  ## [0.70.0] - 2026-10-24
10
16
 
11
17
  - `vault.resolve_challenge()` (`POST /v1/vault/resolve/challenge`) and a required `proof` on `vault.resolve()`: local
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: codai-sdk
3
- Version: 0.70.0
3
+ Version: 0.71.0
4
4
  Summary: Official Python SDK for the codai AI gateway — chat, messages, responses, streaming, agents, sessions, hosts, tasks, account.
5
5
  Project-URL: Homepage, https://codai.ro
6
6
  Project-URL: Repository, https://github.com/codai-ro/codai-sdk-python
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codai-sdk"
7
- version = "0.70.0"
7
+ version = "0.71.0"
8
8
  description = "Official Python SDK for the codai AI gateway — chat, messages, responses, streaming, agents, sessions, hosts, tasks, account."
9
9
  readme = "README.md"
10
10
 
@@ -172,7 +172,7 @@ __all__ = [
172
172
  "vault_resolve_message",
173
173
  "vault_unlock_message",
174
174
  ]
175
- __version__ = "0.70.0"
175
+ __version__ = "0.71.0"
176
176
  class _CallableGroup:
177
177
  """A resource group that is also callable — keeps ``client.chat(...)``,
178
178
  ``client.embeddings(...)``, ``client.models()`` and ``client.feedback(...)``
@@ -2518,14 +2518,20 @@ class MediaOpJob(TypedDict):
2518
2518
  updated_at: str
2519
2519
 
2520
2520
 
2521
+ # What the production builds: `video` (MP4), `image` (PNG), `deck` (PPTX), `doc` (DOCX), `sheet` (XLSX), `audio`…
2522
+ StudioProductionKind = Literal['video', 'image', 'deck', 'doc', 'sheet', 'audio', 'carousel', 'print']
2523
+
2524
+
2521
2525
  class _StudioProductionCreateRequired(TypedDict):
2522
2526
  brief: str
2523
2527
 
2524
2528
 
2525
2529
  class StudioProductionCreate(_StudioProductionCreateRequired, total=False):
2526
2530
  """Studio production request"""
2531
+ kind: StudioProductionKind
2527
2532
  language: Literal['en', 'ro']
2528
2533
  aspect_ratio: Literal['16:9', '9:16', '1:1']
2534
+ duration_s: int
2529
2535
  starter: str
2530
2536
  voice: str
2531
2537
  narration: bool
@@ -2539,8 +2545,24 @@ class StudioProductionQa(TypedDict, total=False):
2539
2545
  skipped: str
2540
2546
 
2541
2547
 
2542
- class StudioProduction(TypedDict):
2543
- """Studio production"""
2548
+ class StudioProductionOutput(TypedDict):
2549
+ """A built output of a non-video production: the regular Studio asset plus its `role`. `url` is a 1 h signed GET,…"""
2550
+ asset_id: str
2551
+ kind: AssetKind
2552
+ status: Literal['pending', 'ready', 'failed', 'deleted']
2553
+ model: str
2554
+ url: Optional[str]
2555
+ mime_type: str
2556
+ bytes: int
2557
+ duration_seconds: Optional[float]
2558
+ width: Optional[int]
2559
+ height: Optional[int]
2560
+ created_at: str
2561
+ expires_at: Optional[str]
2562
+ role: Literal['image', 'cover', 'document', 'pages', 'pdf', 'audio']
2563
+
2564
+
2565
+ class _StudioProductionRequired(TypedDict):
2544
2566
  id: str
2545
2567
  object: Literal['studio.production']
2546
2568
  status: Literal['running', 'succeeded', 'failed']
@@ -2562,6 +2584,14 @@ class StudioProduction(TypedDict):
2562
2584
  created_at: str
2563
2585
 
2564
2586
 
2587
+ class StudioProduction(_StudioProductionRequired, total=False):
2588
+ """Studio production"""
2589
+ duration_s: Optional[int]
2590
+ kind: StudioProductionKind
2591
+ output_asset_id: Optional[str]
2592
+ outputs: List[StudioProductionOutput]
2593
+
2594
+
2565
2595
  class _MusicRoomCreateRequired(TypedDict):
2566
2596
  brief: str
2567
2597
 
@@ -5745,7 +5775,7 @@ class AccountPatchResponse(TypedDict):
5745
5775
  training_opt_out: bool
5746
5776
  consents: List[AccountConsent]
5747
5777
  username_error: Optional[Literal['invalid', 'taken', 'change_limit']]
5748
- referral_result: Optional[Literal['window_closed', 'none', 'invalid_code', 'self', 'already_referred', 'flagged', 'granted', 'cap_reached']]
5778
+ referral_result: Optional[Literal['window_closed', 'none', 'invalid_code', 'self', 'already_referred', 'flagged', 'pending_payment', 'granted', 'cap_reached']]
5749
5779
 
5750
5780
 
5751
5781
  class BillingSubscription(TypedDict):
@@ -10832,6 +10862,8 @@ __all__ = [
10832
10862
  'StudioPostCopyRequest',
10833
10863
  'StudioProduction',
10834
10864
  'StudioProductionCreate',
10865
+ 'StudioProductionKind',
10866
+ 'StudioProductionOutput',
10835
10867
  'StudioProductionQa',
10836
10868
  'StudioPublicDecisionRequest',
10837
10869
  'StudioPublicNameRequest',
@@ -1,10 +1,16 @@
1
- """``/v1/studio/productions`` — codai Studio brief → finished promo video (RC-20): one model turn storyboards the brief
2
- on a built-in video starter, every scene gets an image and a voice-over line, the result is saved as an editable
3
- creative and a draft render is queued; a vision review may fix text once.
1
+ """``/v1/studio/productions`` — codai Studio brief → finished output (RC-20), one of 8 kinds (``kind``, default
2
+ ``video``): ``video`` (MP4 render), ``image`` (PNG), ``deck`` (PPTX), ``doc`` (DOCX), ``sheet`` (XLSX), ``carousel``
3
+ (ZIP of PNG slides + cover PNG), ``print`` (A4/A5 PDF) and ``audio`` (MP3 jingle or song).
4
4
 
5
- ``create`` returns 202 ``{id, status: "running", phase}`` after the render is queued (about a minute), ``retrieve``
5
+ ``video``: one model turn storyboards the brief on a built-in video starter, every scene gets an image and a voice-over
6
+ line, the result is saved as an editable creative and a draft render is queued; a vision review may fix text once.
7
+ Other kinds: one plan turn, generated images or music, an editable creative and the output built by the Studio
8
+ builders; the response adds ``kind``, ``output_asset_id`` and ``outputs`` (Studio assets with a ``role``).
9
+ ``starter``, ``voice``, ``narration`` and ``aspect_ratio`` apply to ``video`` only.
10
+
11
+ ``create`` returns 202 ``{id, status: "running", phase}`` after the output is queued (about a minute), ``retrieve``
6
12
  advances and reads it, ``wait`` polls until ``succeeded`` / ``failed`` and ``run`` does ``create`` + ``wait``. The
7
- storyboard and review turns are token-metered; images, voice-over and renders are billed at their usual prices;
13
+ plan and review turns are token-metered; images, music, voice-over and renders are billed at their usual prices;
8
14
  ``budget_micro_usd`` (default 3,000,000 = $3) caps the whole production.
9
15
  """
10
16
 
@@ -45,12 +51,17 @@ class Productions(Resource):
45
51
  title: Optional[str] = None,
46
52
  idempotency_key: Optional[str] = None,
47
53
  ext: Optional[RequestExtensions] = None,
54
+ kind: Optional[str] = None,
55
+ duration_s: Optional[int] = None,
48
56
  ) -> Dict[str, Any]:
49
- """``POST /v1/studio/productions`` — storyboard + images + voice-over + creative + queued draft render."""
57
+ """``POST /v1/studio/productions`` — plan + images / music + creative + the output being built
58
+ (``kind``: video | image | deck | doc | sheet | audio | carousel | print, default video)."""
50
59
  body: Dict[str, Any] = {"brief": brief}
51
60
  for k, v in (
61
+ ("kind", kind),
52
62
  ("language", language),
53
63
  ("aspect_ratio", aspect_ratio),
64
+ ("duration_s", duration_s),
54
65
  ("starter", starter),
55
66
  ("voice", voice),
56
67
  ("narration", narration),
@@ -24,7 +24,7 @@ def _chat_response(content="PONG", tool_calls=None):
24
24
 
25
25
 
26
26
  def test_version():
27
- assert codai.__version__ == "0.70.0"
27
+ assert codai.__version__ == "0.71.0"
28
28
  def test_chat_completions_create(client, stub):
29
29
  stub.reply(
30
30
  200,
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