Class: Zyphr::MuseApi

Inherits:
Object
  • Object
show all
Defined in:
lib/zyphr/api/muse_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MuseApi

Returns a new instance of MuseApi.



19
20
21
# File 'lib/zyphr/api/muse_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/zyphr/api/muse_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#v1_muse_audit_log_get(opts = {}) ⇒ nil

Paginated per-call audit log for Muse Returns Muse invocations for the caller’s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


26
27
28
29
# File 'lib/zyphr/api/muse_api.rb', line 26

def v1_muse_audit_log_get(opts = {})
  v1_muse_audit_log_get_with_http_info(opts)
  nil
end

#v1_muse_audit_log_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Paginated per-call audit log for Muse Returns Muse invocations for the caller&#39;s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/zyphr/api/muse_api.rb', line 35

def v1_muse_audit_log_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_audit_log_get ...'
  end
  # resource path
  local_var_path = '/v1/muse/audit-log'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_audit_log_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_audit_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_broadcasts_analyze_post(opts = {}) ⇒ nil

Stream a pre-send advisory for a draft broadcast Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


81
82
83
84
# File 'lib/zyphr/api/muse_api.rb', line 81

def v1_muse_broadcasts_analyze_post(opts = {})
  v1_muse_broadcasts_analyze_post_with_http_info(opts)
  nil
end

#v1_muse_broadcasts_analyze_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Stream a pre-send advisory for a draft broadcast Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/zyphr/api/muse_api.rb', line 90

def v1_muse_broadcasts_analyze_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_broadcasts_analyze_post ...'
  end
  # resource path
  local_var_path = '/v1/muse/broadcasts/analyze'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_broadcasts_analyze_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_broadcasts_analyze_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_entitlement_get(opts = {}) ⇒ nil

Return the current account’s Zyphr Muse entitlement Returns whether the caller’s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


136
137
138
139
# File 'lib/zyphr/api/muse_api.rb', line 136

def v1_muse_entitlement_get(opts = {})
  v1_muse_entitlement_get_with_http_info(opts)
  nil
end

#v1_muse_entitlement_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Return the current account&#39;s Zyphr Muse entitlement Returns whether the caller&#39;s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/zyphr/api/muse_api.rb', line 145

def v1_muse_entitlement_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_entitlement_get ...'
  end
  # resource path
  local_var_path = '/v1/muse/entitlement'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_entitlement_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_entitlement_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_eval_baselines_get(opts = {}) ⇒ nil

Per-prompt eval baseline snapshots Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don’t see this — it’s for the internal Muse settings page / admin portal.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


191
192
193
194
# File 'lib/zyphr/api/muse_api.rb', line 191

def v1_muse_eval_baselines_get(opts = {})
  v1_muse_eval_baselines_get_with_http_info(opts)
  nil
end

#v1_muse_eval_baselines_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Per-prompt eval baseline snapshots Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don&#39;t see this — it&#39;s for the internal Muse settings page / admin portal.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/zyphr/api/muse_api.rb', line 200

def v1_muse_eval_baselines_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_eval_baselines_get ...'
  end
  # resource path
  local_var_path = '/v1/muse/eval-baselines'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_eval_baselines_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_eval_baselines_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_settings_project_id_get(project_id, opts = {}) ⇒ nil

Read Muse settings for a project Returns the project’s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.

Parameters:

  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


247
248
249
250
# File 'lib/zyphr/api/muse_api.rb', line 247

def v1_muse_settings_project_id_get(project_id, opts = {})
  v1_muse_settings_project_id_get_with_http_info(project_id, opts)
  nil
end

#v1_muse_settings_project_id_get_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Read Muse settings for a project Returns the project&#39;s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.

Parameters:

  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/zyphr/api/muse_api.rb', line 257

def v1_muse_settings_project_id_get_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_settings_project_id_get ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling MuseApi.v1_muse_settings_project_id_get"
  end
  # resource path
  local_var_path = '/v1/muse/settings/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_settings_project_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_settings_project_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_settings_project_id_patch(project_id, opts = {}) ⇒ nil

Update Muse settings for a project (admin or developer only) Partial update — any omitted field keeps its existing value. Pass ‘monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.

Parameters:

  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


308
309
310
311
# File 'lib/zyphr/api/muse_api.rb', line 308

def v1_muse_settings_project_id_patch(project_id, opts = {})
  v1_muse_settings_project_id_patch_with_http_info(project_id, opts)
  nil
end

#v1_muse_settings_project_id_patch_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Muse settings for a project (admin or developer only) Partial update — any omitted field keeps its existing value. Pass &#x60;monthly_cap_usd_override: null&#x60; to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.

Parameters:

  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/zyphr/api/muse_api.rb', line 318

def v1_muse_settings_project_id_patch_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_settings_project_id_patch ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling MuseApi.v1_muse_settings_project_id_patch"
  end
  # resource path
  local_var_path = '/v1/muse/settings/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_settings_project_id_patch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_settings_project_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_subjects_suggest_post(v1_muse_subjects_suggest_post_request, opts = {}) ⇒ nil

Suggest 5 ranked subject-line candidates for a template

Parameters:

Returns:

  • (nil)


368
369
370
371
# File 'lib/zyphr/api/muse_api.rb', line 368

def v1_muse_subjects_suggest_post(v1_muse_subjects_suggest_post_request, opts = {})
  v1_muse_subjects_suggest_post_with_http_info(v1_muse_subjects_suggest_post_request, opts)
  nil
end

#v1_muse_subjects_suggest_post_with_http_info(v1_muse_subjects_suggest_post_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Suggest 5 ranked subject-line candidates for a template

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/zyphr/api/muse_api.rb', line 377

def v1_muse_subjects_suggest_post_with_http_info(v1_muse_subjects_suggest_post_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_subjects_suggest_post ...'
  end
  # verify the required parameter 'v1_muse_subjects_suggest_post_request' is set
  if @api_client.config.client_side_validation && v1_muse_subjects_suggest_post_request.nil?
    fail ArgumentError, "Missing the required parameter 'v1_muse_subjects_suggest_post_request' when calling MuseApi.v1_muse_subjects_suggest_post"
  end
  # resource path
  local_var_path = '/v1/muse/subjects/suggest'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_muse_subjects_suggest_post_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_subjects_suggest_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_subjects_suggest_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_templates_draft_post(opts = {}) ⇒ nil

Stream a draft template from a natural-language brief

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


431
432
433
434
# File 'lib/zyphr/api/muse_api.rb', line 431

def v1_muse_templates_draft_post(opts = {})
  v1_muse_templates_draft_post_with_http_info(opts)
  nil
end

#v1_muse_templates_draft_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Stream a draft template from a natural-language brief

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/zyphr/api/muse_api.rb', line 439

def v1_muse_templates_draft_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_templates_draft_post ...'
  end
  # resource path
  local_var_path = '/v1/muse/templates/draft'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_templates_draft_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_templates_draft_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_templates_rewrite_post(opts = {}) ⇒ nil

Stream a rewritten block per the user’s instruction

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


484
485
486
487
# File 'lib/zyphr/api/muse_api.rb', line 484

def v1_muse_templates_rewrite_post(opts = {})
  v1_muse_templates_rewrite_post_with_http_info(opts)
  nil
end

#v1_muse_templates_rewrite_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Stream a rewritten block per the user&#39;s instruction

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'lib/zyphr/api/muse_api.rb', line 492

def v1_muse_templates_rewrite_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_templates_rewrite_post ...'
  end
  # resource path
  local_var_path = '/v1/muse/templates/rewrite'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_templates_rewrite_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_templates_rewrite_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_usage_get(opts = {}) ⇒ nil

Per-account Zyphr Muse usage + budget tier Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


538
539
540
541
# File 'lib/zyphr/api/muse_api.rb', line 538

def v1_muse_usage_get(opts = {})
  v1_muse_usage_get_with_http_info(opts)
  nil
end

#v1_muse_usage_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Per-account Zyphr Muse usage + budget tier Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/zyphr/api/muse_api.rb', line 547

def v1_muse_usage_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_usage_get ...'
  end
  # resource path
  local_var_path = '/v1/muse/usage'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_usage_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_usage_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_muse_workflows_generate_post(opts = {}) ⇒ nil

Stream a generated workflow from a natural-language description Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project’s available_channels grounding; unsupported channels fall back to email via the prompt’s hard rules.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


593
594
595
596
# File 'lib/zyphr/api/muse_api.rb', line 593

def v1_muse_workflows_generate_post(opts = {})
  v1_muse_workflows_generate_post_with_http_info(opts)
  nil
end

#v1_muse_workflows_generate_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Stream a generated workflow from a natural-language description Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project&#39;s available_channels grounding; unsupported channels fall back to email via the prompt&#39;s hard rules.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# File 'lib/zyphr/api/muse_api.rb', line 602

def v1_muse_workflows_generate_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_workflows_generate_post ...'
  end
  # resource path
  local_var_path = '/v1/muse/workflows/generate'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MuseApi.v1_muse_workflows_generate_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MuseApi#v1_muse_workflows_generate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end