everypixel-cli 0.4.0__tar.gz → 0.4.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.
Files changed (25) hide show
  1. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/CHANGELOG.md +5 -0
  2. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/PKG-INFO +7 -1
  3. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/README.md +6 -0
  4. everypixel_cli-0.4.1/src/everypixel_cli/__init__.py +1 -0
  5. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/application/serialization.py +2 -0
  6. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/application/services.py +8 -2
  7. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/output.py +24 -0
  8. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/resources/openapi.json +36 -0
  9. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/schemas.py +2 -0
  10. everypixel_cli-0.4.0/src/everypixel_cli/__init__.py +0 -1
  11. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/.gitignore +0 -0
  12. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/LICENSE +0 -0
  13. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/pyproject.toml +0 -0
  14. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/__main__.py +0 -0
  15. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/application/__init__.py +0 -0
  16. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/application/chat.py +0 -0
  17. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/application/models.py +0 -0
  18. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/cli.py +0 -0
  19. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/client.py +0 -0
  20. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/config.py +0 -0
  21. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/errors.py +0 -0
  22. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/files.py +0 -0
  23. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/mcp_server.py +0 -0
  24. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/openapi.py +0 -0
  25. {everypixel_cli-0.4.0 → everypixel_cli-0.4.1}/src/everypixel_cli/resources/__init__.py +0 -0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.1] - 2026-10-08
4
+
5
+ - Display estimated and billed generation costs, including chat responses.
6
+ - Report observed queue time while waiting for tasks.
7
+
3
8
  ## [0.4.0] - 2026-10-07
4
9
 
5
10
  - Add ElevenLabs speech synthesis and voice design.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: everypixel-cli
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Official command line interface for Everypixel API
5
5
  Project-URL: Homepage, https://labs.everypixel.com
6
6
  Project-URL: Repository, https://github.com/everypixel/everypixel-cli
@@ -391,6 +391,12 @@ Passing `--download` always waits for a successful result before saving files:
391
391
  everypixel wait TASK_ID --download ./outputs
392
392
  ```
393
393
 
394
+ `elapsed_sec` is total local waiting time; `queue_sec` estimates time until the
395
+ first observed `STARTED` response.
396
+
397
+ API costs are USD strings: `estimated_cost` for pending tasks and `billed_cost`
398
+ for successful results and chat. Missing costs are omitted; `"0"` means no charge.
399
+
394
400
  A Bash automation example:
395
401
 
396
402
  ```bash
@@ -357,6 +357,12 @@ Passing `--download` always waits for a successful result before saving files:
357
357
  everypixel wait TASK_ID --download ./outputs
358
358
  ```
359
359
 
360
+ `elapsed_sec` is total local waiting time; `queue_sec` estimates time until the
361
+ first observed `STARTED` response.
362
+
363
+ API costs are USD strings: `estimated_cost` for pending tasks and `billed_cost`
364
+ for successful results and chat. Missing costs are omitted; `"0"` means no charge.
365
+
360
366
  A Bash automation example:
361
367
 
362
368
  ```bash
@@ -0,0 +1 @@
1
+ __version__ = "0.4.1"
@@ -14,6 +14,8 @@ def serialize_operation_result(result: OperationResult) -> Any:
14
14
  value = result.value
15
15
  if isinstance(value, Mapping):
16
16
  payload = dict(value)
17
+ if "task_id" in payload and payload.get("status") == "SUCCESS":
18
+ payload.pop("estimated_cost", None)
17
19
  if result.saved_files:
18
20
  payload["downloaded"] = [str(path) for path in result.saved_files]
19
21
  return payload
@@ -212,14 +212,20 @@ class TaskService:
212
212
 
213
213
  def wait(self, task_id: str, options: ExecutionOptions) -> dict[str, Any]:
214
214
  started = time.monotonic()
215
+ queue_sec: float | None = None
215
216
  while True:
216
217
  options.check_cancelled()
217
218
  payload = self.status(task_id)
218
219
  options.check_cancelled()
220
+ elapsed = time.monotonic() - started
221
+ if payload.get("status") == "STARTED" and queue_sec is None:
222
+ queue_sec = round(elapsed, 2)
219
223
  if payload.get("status") == "SUCCESS":
220
- payload["elapsed_sec"] = round(time.monotonic() - started, 2)
224
+ payload["elapsed_sec"] = round(elapsed, 2)
225
+ if queue_sec is not None:
226
+ payload["queue_sec"] = queue_sec
221
227
  return payload
222
- if time.monotonic() - started >= options.timeout:
228
+ if elapsed >= options.timeout:
223
229
  raise TaskPollingError(
224
230
  f"Timed out waiting for task {task_id}",
225
231
  code="timeout",
@@ -77,18 +77,22 @@ def emit_human(data: Any, *, title: str | None = None, no_color: bool = False) -
77
77
  if title:
78
78
  console.print(f"[bold]{title}[/bold]")
79
79
  if isinstance(data, dict) and render_known_table(console, data):
80
+ render_costs(console, data)
80
81
  return
81
82
  if isinstance(data, dict):
82
83
  table = Table(show_header=False, box=None)
83
84
  table.add_column("Key", style="cyan")
84
85
  table.add_column("Value")
85
86
  for key, value in data.items():
87
+ if key in {"estimated_cost", "billed_cost"}:
88
+ continue
86
89
  table.add_row(
87
90
  str(key),
88
91
  json.dumps(value, ensure_ascii=False)
89
92
  if isinstance(value, (dict, list))
90
93
  else str(value),
91
94
  )
95
+ render_costs(console, data, table=table)
92
96
  console.print(table)
93
97
  else:
94
98
  console.print(data)
@@ -140,6 +144,26 @@ class ChatRenderer:
140
144
  json.dumps(message["tool_calls"], ensure_ascii=False, indent=2),
141
145
  soft_wrap=True,
142
146
  )
147
+ render_costs(self.console, data)
148
+
149
+
150
+ def render_costs(
151
+ console: Console, data: dict[str, Any], *, table: Table | None = None
152
+ ) -> None:
153
+ """Display API-provided USD strings without rounding or inferring charges."""
154
+
155
+ cost_table = table if table is not None else Table(show_header=False, box=None)
156
+ if table is None:
157
+ cost_table.add_column("Key", style="cyan")
158
+ cost_table.add_column("Value")
159
+ for key in ("estimated_cost", "billed_cost"):
160
+ if key == "estimated_cost" and data.get("status") == "SUCCESS":
161
+ continue
162
+ value = data.get(key)
163
+ if value is not None:
164
+ cost_table.add_row(key, Text(f"${value}"))
165
+ if table is None and cost_table.row_count:
166
+ console.print(cost_table)
143
167
 
144
168
 
145
169
  def render_known_table(console: Console, data: dict[str, Any]) -> bool:
@@ -1722,6 +1722,18 @@
1722
1722
  },
1723
1723
  "ImgenStatusResponse": {
1724
1724
  "properties": {
1725
+ "billed_cost": {
1726
+ "anyOf": [
1727
+ {
1728
+ "type": "string"
1729
+ },
1730
+ {
1731
+ "type": "null"
1732
+ }
1733
+ ],
1734
+ "description": "Final accrued request cost in USD; settled later",
1735
+ "title": "Billed Cost"
1736
+ },
1725
1737
  "error": {
1726
1738
  "anyOf": [
1727
1739
  {
@@ -1733,6 +1745,18 @@
1733
1745
  ],
1734
1746
  "title": "Error"
1735
1747
  },
1748
+ "estimated_cost": {
1749
+ "anyOf": [
1750
+ {
1751
+ "type": "string"
1752
+ },
1753
+ {
1754
+ "type": "null"
1755
+ }
1756
+ ],
1757
+ "description": "Estimated request cost in USD, including free quota",
1758
+ "title": "Estimated Cost"
1759
+ },
1736
1760
  "queue": {
1737
1761
  "anyOf": [
1738
1762
  {
@@ -3397,6 +3421,18 @@
3397
3421
  },
3398
3422
  "TaskResponse": {
3399
3423
  "properties": {
3424
+ "estimated_cost": {
3425
+ "anyOf": [
3426
+ {
3427
+ "type": "string"
3428
+ },
3429
+ {
3430
+ "type": "null"
3431
+ }
3432
+ ],
3433
+ "description": "Estimated request cost in USD, including free quota",
3434
+ "title": "Estimated Cost"
3435
+ },
3400
3436
  "queue": {
3401
3437
  "anyOf": [
3402
3438
  {
@@ -106,6 +106,8 @@ class TaskResponse(BaseModel):
106
106
  result: Any | None = None
107
107
  queue: int | None = None
108
108
  error: str | None = None
109
+ estimated_cost: str | None = None
110
+ billed_cost: str | None = None
109
111
 
110
112
 
111
113
  def normalize_grok_model(value: Any) -> Any:
@@ -1 +0,0 @@
1
- __version__ = "0.4.0"
File without changes