{"info":{"title":"Endless API","summary":"REST API for Endless.","description":"The Endless REST API. Guides and per-endpoint pages: https:\/\/endless.app\/docs\/api\n\n## Authentication\n\nEvery operation takes `Authorization: Bearer <token>`, with one of two tokens: a workspace API key (`esk_live_\u2026`, the `apiKey` scheme) or a Clerk session JWT (`clerkSession`). Every documented operation accepts a key and names the ability it needs; what a key may not do (managing keys, chatting, billing changes, connectors, deleting the workspace or the account) is done in the Endless app and is not documented here. There is no unauthenticated surface.\n\n## Errors\n\nEvery failure \u2014 including a path that matches no route \u2014 returns `application\/json` in one shape:\n\n```json\n{\n  \"code\": \"FORBIDDEN\",\n  \"status\": 403,\n  \"message\": \"Your role does not have permission to do this\",\n  \"data\": { \"code\": \"permission_denied\", \"hint\": \"\u2026\", \"documentation\": \"\u2026\" }\n}\n```\n\n`code` is the symbolic HTTP status and `data.code` the specific reason \u2014 branch on `data.code`, never on `message`, which is written for a person and may be reworded. The `Error` schema lists every `data.code` the API can raise.\n\n## Versioning\n\nThe current version is **1.0.0**. The URL carries no version segment: send `Endless-Api-Version: 1` to pin yourself to a major, or omit the header to accept the current one. A major this deployment cannot serve is refused with 400 `unsupported_api_version` rather than answered in a shape you are not expecting.\n\nWithin a major, changes are additive only \u2014 new operations, new optional inputs, new response fields. Anything that removes or retypes an existing field is a new major. Treat unknown response fields as forward compatibility, not as an error.\n\n## Deprecation\n\nAn operation on its way out answers with `Deprecation` (RFC 9745) and `Sunset` (RFC 8594) headers, plus a `Link` with `rel=\"deprecation\"` pointing at the migration note, and is marked `deprecated: true` here. It keeps working for at least 180 days after that first header ships. The full versioning and deprecation policy: https:\/\/endless.app\/docs\/reference\/api-versioning\n\n## Rate limits\n\nThe published policy is **1000 requests per 60s** per caller, named `default`. Every response \u2014 success and failure alike \u2014 carries `RateLimit` and `RateLimit-Policy` (draft-ietf-httpapi-ratelimit-headers) as well as the older `RateLimit-Limit` \/ `RateLimit-Remaining` \/ `RateLimit-Reset` triple, so a client can pace itself before it is refused. A 429 adds `Retry-After`, in seconds.\n\nA workspace API key (`esk_\u2026`) is limited per key instead: **50 requests per 60s**, named `api_key`, shared by every secret of the key, so rotating it does not reset the window.\n","version":"1.0.0","termsOfService":"https:\/\/endless.app\/legal\/terms-of-service","contact":{"name":"Endless Support","email":"support@endless.app","url":"https:\/\/endless.app"}},"servers":[{"url":"https:\/\/api.endless.app"}],"security":[{"apiKey":[]},{"clerkSession":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"esk_live_\u2026","description":"A workspace API key created in workspace settings. It acts as the member who created it, narrowed to its abilities, projects and credit limit. Each operation names the ability it needs."},"clerkSession":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Clerk session JWT, the token the Endless app sends for the signed-in person."}},"schemas":{"Error":{"type":"object","title":"Error","description":"The shape of every failure this API returns, whatever the status.","required":["code","status","message"],"properties":{"code":{"type":"string","description":"Symbolic form of the HTTP status. Stable, and safe to branch on.","enum":["BAD_REQUEST","UNAUTHORIZED","PAYMENT_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","TOO_MANY_REQUESTS","INTERNAL_SERVER_ERROR"]},"status":{"type":"integer","description":"The HTTP status, repeated in the body."},"message":{"type":"string","description":"A human-readable explanation. Written for a person; do not branch on it."},"defined":{"type":"boolean","description":"True when the failure is one the operation's contract declares, so its `data` is part of the documented shape. False for a generic failure."},"data":{"type":"object","description":"Machine-readable detail. `code` is the reason to branch on; some errors add their own fields (e.g. `issues` on a validation failure).","properties":{"code":{"type":"string","description":"The specific reason, in snake_case. This is the field to branch on.","enum":["access_pause_held_by_endless","access_resource_unsupported","adjustment_preview_required","admin_required","admin_transfer_required","already_invited","already_member","already_team_member","amount_required","api_access_not_in_plan","api_key_cannot_hand_out","api_key_creator_only","api_key_expiry_in_past","api_key_not_found","api_key_project_invalid","api_key_project_required","api_key_project_scope_unsupported","api_key_projects_required","api_key_revoked","api_key_scope_denied","api_key_scope_not_grantable","api_key_secret_current","api_key_secret_not_found","app_store_subscription_exists","app_store_subscription_renewing","asset_not_extractable","asset_not_found","asset_restore_conflict","asset_unmeasured","asset_upload_rate_limited","assistant_content_forbidden","audio_too_large","backdated_change_superseded","billing_day_requires_contract","billing_emails_must_be_array","billing_partner_contact_missing","billing_partner_invoice_not_collected","billing_partner_invoice_not_found","billing_partner_invoice_not_to_collect","billing_partner_invoice_paid","billing_partner_no_owners","billing_partner_not_found","billing_partner_notice_not_sent","billing_partner_owner_required","billing_partner_required","billing_partner_workspace_assigned","billing_partner_workspace_not_on","billing_partner_workspace_on_usage","brand_report_linkedin_invalid","brand_report_linkedin_no_company","brand_report_not_completed","brand_report_not_found","brand_report_rate_limited","brand_report_running","brand_report_subject_invalid","brand_report_website_required","brand_report_work_email_required","brand_source_rate_limited","brand_source_unreadable","bucket_changed","bucket_expiry_governed_by_cycle","bucket_not_live","cannot_demote_last_admin","cannot_grant_owner","cannot_invite_self","cannot_leave_last_admin","cannot_leave_last_member","cannot_remove_last_admin","cannot_remove_self","canvas_actions_rate_limited","canvas_actions_unavailable","canvas_name_required","canvas_not_found","card_charge_failed","card_conflicts_out_of_band","change_after_plan_end","change_scheduled_by_staff","charge_attribution_server_only","chat_cost_mapper_draft_unavailable","chat_cost_mapper_failed","chat_message_not_found","chat_model_codename_taken","chat_model_not_found","chat_model_variant_binding_taken","chat_model_variant_not_found","chat_not_found","chat_run_stopped","checkout_session_failed","clerk_error","clerk_rejected","clerk_sync_timeout","comment_not_found","comment_rate_limited","comment_thread_not_found","comment_threads_limit","conflicting_file_input","connector_connect_failed","connector_credential_failed","connector_rate_limited","connector_unknown","connector_url_not_allowed","contract_amount_underivable","contract_change_applies_now","contract_unpriced","cost_alert_not_found","credit_price_changed","credit_purchase_failed","credit_purchase_over_invoice_limit","credit_purchase_plan_too_low","credit_purchase_too_large","credit_purchase_too_small","credit_purchase_unavailable","credit_rate_underivable","current_period_end_not_found","current_price_not_found","customer_email_required","customer_not_found","customer_required","data_migration_conflict","data_migration_failed","data_migration_list_failed","data_migration_preview_failed","data_migration_status_failed","database_update_failed","default_card_required","default_variant_cannot_disable","default_variant_required","destination_not_found","destination_not_linked","destination_required_without_members","document_not_found","document_too_large","document_truncated","domain_not_found","draft_already_sent","draft_not_found","draft_send_not_allowed","drive_folder_link","drive_not_shared","drive_quota_exceeded","drive_unreadable","dual_clerk_not_configured","dual_database_not_configured","dual_storage_not_configured","dual_workspace_not_found","element_asset_unsupported","element_draft_failed","element_needs_asset","element_not_found","element_placement_failed","element_revise_rate_limited","element_revision_failed","email_address_not_found","email_recipients_required","email_required","empty_transcript","end_date_applies_now","end_date_requires_zero_plan","exceeds_api_key_spending_limit","exceeds_spending_limit","expiry_before_effective","fallback_limit","feature_not_enabled","feature_price_agent_unsupported","feature_price_not_found","file_too_large","forbidden","free_benefit_exemption_exists","free_benefit_exemption_not_found","free_benefit_not_releasable","gateway_model_not_found","generation_cost_unknown","generation_failed","generation_model_unavailable","generation_not_found","grant_not_found","identity_provider_unavailable","import_fetch_failed","import_too_large","import_unsupported_type","import_url_not_allowed","import_youtube_failed","import_youtube_refused","insufficient_credits","invalid_admin_transfer","invalid_alert_thresholds","invalid_amount","invalid_asset_input","invalid_billing_day","invalid_billing_email","invalid_cadence","invalid_chat_model_pricing","invalid_chat_model_successor","invalid_chat_model_thinking_options","invalid_cursor","invalid_date","invalid_email","invalid_empty_finalization","invalid_file_type","invalid_generation_parameters","invalid_knowledge_box","invalid_match_rule","invalid_media_model_successor","invalid_member_ids","invalid_model_mapper","invalid_model_parameters","invalid_parent_message","invalid_props_overlay","invalid_quick_action_schema","invalid_repeat_window","invalid_teams","invalid_timezone","invalid_token","invitation_expired","invitation_not_found","invitation_not_pending","invite_link_limit_reached","invite_link_not_found","invoice_finalize_failed","invoice_not_draft","invoice_not_found","invoice_not_payable","invoice_payment_failed","knowledge_skill_link","knowledge_skill_not_linkable","knowledge_skill_not_publishable","knowledge_skill_protected","last_enabled_variant","limit_requires_postpaid","mapper_draft_failed","mapper_proof_failed","media_model_draft_exists","media_model_not_found","media_model_publish_blocked","media_model_variant_not_found","media_model_variant_provider_required","media_model_version_current_locked","media_model_version_matches_disabled","media_model_version_not_draft","media_model_version_not_found","media_model_version_retired","media_model_version_transition_invalid","media_model_version_unchanged","member_not_found","members_required_for_mod","migration_already_running","missing_required_fields","missing_token","mod_database_not_configured","model_codename_taken","model_copy_english_missing","model_disabled","model_not_found","model_plan_required","name_required","new_price_not_found","no_backdated_change","no_changes","no_resolvable_owner","no_scheduled_change","no_subscription","not_a_custom_plan","not_found","not_member","not_team_member","nothing_changed","notification_not_found","organization_creation_failed","organization_not_found","organization_required","out_of_band_requires_contract","overrides_require_negotiated","partner_has_billing_partner","partner_has_usage_account","partner_last_owner","partner_member_exists","partner_member_not_found","partner_not_found","partner_owner_required","permission_denied","plan_not_self_serve","planned_cycle_not_found","planned_cycle_refused","portal_session_failed","postpaid_account_missing","postpaid_plan_stale","postpaid_window_not_found","price_archived","price_edit_failed","price_id_required","price_inactive","price_not_credit_pack","price_not_found","primary_email_removal_refused","project_limit_reached","project_not_found","project_title_required","prompt_extract_failed","protected_workspace_slug","provider_endpoint_not_found","provider_import_failed","provider_input_invalid","provider_model_not_found","provider_url_unrecognized","public_link_empty_chat","public_link_not_found","public_link_unavailable","public_link_unsupported","quick_action_codename_taken","quick_action_not_found","quote_exceeds_max_credits","recaptcha_failed","report_filter_unsupported","report_group_by_unsupported","report_no_billing_cycle","report_single_organization_required","report_timezone_unknown","reserved_workspace_slug","retroactive_requires_contract","retroactive_requires_same_cadence","retroactive_window_not_found","role_locked","run_not_found","same_plan","schedule_date_passed","scheduled_change_pending","scheduled_task_moved","scheduled_task_not_found","scheduled_task_run_not_found","search_input_invalid","search_not_configured","search_request_failed","seat_limit_reached","session_not_found","skill_body_too_large","skill_copy_exists","skill_listing_current","skill_listing_modified","skill_listing_not_found","skill_listing_slug_taken","skill_modified","slug_match_needs_confirmation","social_input_invalid","social_not_found","social_private","social_rate_limited","social_request_failed","source_refused","source_unavailable","source_unreadable","staff_domain_refused","staff_email_required","staff_permission_required","staff_required","staff_self_action_refused","staff_workspace_untagged","storage_misconfigured","stripe_customer_creation_failed","stripe_customer_update_failed","subscription_already_exists","subscription_creation_failed","subscription_is_contract","subscription_item_not_found","subscription_not_active","subscription_not_contract","subscription_not_found","subscription_not_trialing","subscription_retrieval_failed","subscription_scheduled","subscription_update_failed","support_access_grant_not_found","support_access_grant_required","support_account_limit","support_action_unauthorized","support_credit_cycle_limit","support_credit_cycle_unavailable","support_future_window","support_query_rejected","support_snapshot_drift","support_window_too_large","tax_id_invalid","tax_id_not_found","team_name_required","team_not_found","transaction_not_a_bucket","transaction_not_found","transcript_asset_link_invalid","transcript_asset_unavailable","transcript_language_switch_unsupported","transcript_not_found","transcript_source_conflict","transcript_source_required","transcript_unavailable","transcription_aborted","transcription_failed","transcription_invalid_response","transcription_rate_limited","transcription_still_processing","transcription_unavailable","trial_end_applies_now","trimmed_part_without_original","unsupported_mime_type","upload_not_pending","upload_object_missing","usage_account_ceiling_exceeded","usage_account_contact_required","usage_account_customer_busy","usage_account_customer_in_use","usage_account_customer_missing","usage_account_customer_not_found","usage_account_ended","usage_account_has_live_workspaces","usage_account_not_found","usage_account_owner_required","usage_account_requires_usage_plan","usage_account_workspace_already_on","usage_account_workspace_collected","usage_account_workspace_has_deal","usage_account_workspace_not_admin","usage_account_workspace_not_on","usage_account_workspace_paid","usage_adjustment_exceeds_invoice","usage_adjustment_needs_draft","usage_adjustment_not_found","usage_adjustment_workspace_not_on_account","usage_credit_not_found","usage_deal_has_no_trial","usage_invoice_not_created","usage_invoice_not_found","usage_invoice_not_ready","usage_product_not_configured","user_already_in_another_team","user_not_found","user_not_in_org","user_required","vertex_model_not_found","video_analysis_length_unknown","video_analysis_not_video","video_analysis_source_unsupported","video_analysis_too_large","video_analysis_unavailable","voice_delete_failed","voice_design_failed","voice_model_not_trainable","voice_not_found","voice_quota_reached","voice_sample_too_large","voice_samples_rejected","voice_training_failed","voice_training_unavailable","workspace_paused","workspace_rate_limited","workspace_role_not_offered","workspace_slug_taken","would_leave_without_admin","yearly_plan_change_not_allowed","invalid_path_parameter","rate_limited","route_not_found","unsupported_api_version"]},"hint":{"type":"string","description":"What to change to make the request succeed."},"documentation":{"type":"string","format":"uri","description":"Where to read more about this operation."}}}}}},"parameters":{"EndlessApiVersion":{"name":"Endless-Api-Version","in":"header","required":false,"description":"Pin the caller to an API major (`1`). Omit to accept the current version. A major this deployment cannot serve is refused with 400 `unsupported_api_version`.","schema":{"type":"string","example":"1"}}}},"openapi":"3.1.1","paths":{"\/users\/{user_id}":{"get":{"operationId":"users.get","summary":"Get user","description":"Returns a single user. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","emails","first_name","last_name","image_url","username","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["profile:read"]},{"clerkSession":[]}]}},"\/users\/{user_id}\/teams":{"get":{"operationId":"users.teams","summary":"List user teams","description":"List user teams. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"name":"organization_id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","color","icon_url","spending_limit","created_at"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["profile:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/logo":{"put":{"operationId":"organization_logo.update","summary":"Update organization logo","description":"Updates an organization logo and returns the updated row. Scoped to the organization named by `organization_id`.","tags":["Organization logo"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image\/png"},{"type":"string","contentMediaType":"image\/jpeg"},{"type":"string","contentMediaType":"image\/gif"},{"type":"string","contentMediaType":"image\/webp"}]}},"required":["file"]}},"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image\/png"},{"type":"string","contentMediaType":"image\/jpeg"},{"type":"string","contentMediaType":"image\/gif"},{"type":"string","contentMediaType":"image\/webp"}]}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"max_allowed_voices":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_company_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"share_new_canvases":{"type":"boolean"},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","slug","image_url","max_allowed_memberships","max_allowed_voices","stripe_customer_id","stripe_subscription_id","created_by_id","mod_organization_id","dual_organization_id","intercom_company_id","share_new_canvases","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","deleted_at","deleted_by_id","created_at","updated_at","clerk_updated_at"]}},"required":["success","organization"]},{"type":"object","properties":{"success":{"const":false},"error":{"enum":["not_found","clerk_error","database_error"],"type":"string"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["settings:write"]},{"clerkSession":[]}]},"delete":{"operationId":"organization_logo.remove","summary":"Remove organization logo","description":"Deletes an organization logo. Scoped to the organization named by `organization_id`.","tags":["Organization logo"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"max_allowed_voices":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_company_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"share_new_canvases":{"type":"boolean"},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","slug","image_url","max_allowed_memberships","max_allowed_voices","stripe_customer_id","stripe_subscription_id","created_by_id","mod_organization_id","dual_organization_id","intercom_company_id","share_new_canvases","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","deleted_at","deleted_by_id","created_at","updated_at","clerk_updated_at"]}},"required":["success","organization"]},{"type":"object","properties":{"success":{"const":false},"error":{"const":"not_found"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["settings:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}":{"get":{"operationId":"organizations.get","summary":"Get organization","description":"Returns a single organization. Scoped to the organization named by `organization_id`.","tags":["Organizations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"share_new_canvases":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","slug","image_url","max_allowed_memberships","stripe_customer_id","stripe_subscription_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","share_new_canvases","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["settings:read"]},{"clerkSession":[]}]},"patch":{"operationId":"organizations.update","summary":"Update organization","description":"Updates an organization and returns the updated row. Scoped to the organization named by `organization_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Organizations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"share_new_canvases":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"share_new_canvases":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","slug","image_url","max_allowed_memberships","stripe_customer_id","stripe_subscription_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","share_new_canvases","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["settings:write"]},{"clerkSession":[]}]}},"\/teams":{"get":{"operationId":"teams.list","summary":"List teams","description":"Lists the teams the caller can read.","tags":["Teams"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_count":{"type":"number"},"member_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id","member_count","member_previews"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:read"]},{"clerkSession":[]}]},"post":{"operationId":"teams.create","summary":"Create team","description":"Creates a team and returns the created row.","tags":["Teams"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"member_ids":{"type":"array","maxItems":100,"items":{"type":"string"}}},"required":["organization_id","name"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id"]},"memberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","team_id","user_id","organization_id","created_at"]}}},"required":["team","memberships"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/teams\/{team_id}":{"get":{"operationId":"teams.get","summary":"Get team","description":"Returns a single team. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:read"]},{"clerkSession":[]}]},"patch":{"operationId":"teams.update","summary":"Update team","description":"Updates a team and returns the updated row. Scoped to the team named by `team_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id"]}},"required":["team"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:write"]},{"clerkSession":[]}]},"delete":{"operationId":"teams.delete","summary":"Delete team","description":"Deletes a team. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:write"]},{"clerkSession":[]}]}},"\/teams\/{team_id}\/credits":{"get":{"operationId":"teams.credits","summary":"Get team credits","description":"Get team credits. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"team_used":{"type":"number"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"spending_limit_remaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["team_used","spending_limit","spending_limit_remaining","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:read"]},{"clerkSession":[]}]}},"\/teams\/{team_id}\/members":{"get":{"operationId":"teams.members.list","summary":"List team members","description":"Lists the team members the caller can read. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","team_id","user_id","organization_id","created_at","user"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:read"]},{"clerkSession":[]}]},"post":{"operationId":"teams.members.add","summary":"Add team member","description":"Add team member. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"}},"required":["user_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"membership":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","team_id","user_id","organization_id","created_at"]}},"required":["membership"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:write"]},{"clerkSession":[]}]}},"\/teams\/{team_id}\/members\/{user_id}":{"delete":{"operationId":"teams.members.remove","summary":"Remove team member","description":"Deletes a team member. Scoped to the team named by `team_id`, and the user named by `user_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["teams:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/members":{"get":{"operationId":"members.list","summary":"List members","description":"Lists the members the caller can read. Scoped to the organization named by `organization_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"include_teams","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},"team_ids":{"type":"array","items":{"type":"string"}}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user","team_ids"]},{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user"]}]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/members\/{user_id}":{"get":{"operationId":"members.get","summary":"Get member","description":"Returns a single member. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},"team_ids":{"type":"array","items":{"type":"string"}}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user","team_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:read"]},{"clerkSession":[]}]},"patch":{"operationId":"members.update","summary":"Update member","description":"Updates a member and returns the updated row. Scoped to the organization named by `organization_id`, and the user named by `user_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:manage"]},{"clerkSession":[]}]},"delete":{"operationId":"members.delete","summary":"Delete member","description":"Deletes a member. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:manage"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/members\/{user_id}\/credits":{"get":{"operationId":"members.credits","summary":"Get member credits","description":"Get member credits. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"org_available":{"type":"number"},"org_used":{"type":"number"},"org_total":{"type":"number"},"user_used":{"type":"number"},"team_used":{"type":"number"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"spending_limit_source":{"anyOf":[{"enum":["user","team"],"type":"string"},{"type":"null"}]},"spending_limit_remaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"chat_fallback":{"type":"object","properties":{"eligible":{"type":"boolean"},"can_start":{"type":"boolean"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["eligible","can_start","resets_at"],"default":{"eligible":false,"can_start":false,"resets_at":null}}},"required":["available","org_available","org_used","org_total","user_used","team_used","spending_limit","spending_limit_source","spending_limit_remaining","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/invitations":{"get":{"operationId":"invitations.list","summary":"List invitations","description":"Lists the invitations the caller can read. Scoped to the organization named by `organization_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"status":{"enum":["pending","accepted","revoked"],"type":"string"},"team_ids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"inviter":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","email_address","role","status","team_ids","spending_limit","expires_at","created_at","inviter"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:read"]},{"clerkSession":[]}]},"post":{"operationId":"invitations.create","summary":"Create invitation","description":"Creates an invitation and returns the created row. Scoped to the organization named by `organization_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"email_address":{"type":"string","format":"email"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string","default":"org:member"},"team_ids":{"type":"array","maxItems":1,"items":{"type":"string"}},"spending_limit":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["email_address"]}}},"required":["invitations"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"}},"required":["id","email_address","role"]}},"errors":{"type":"array","items":{"type":"object","properties":{"email_address":{"type":"string"},"error":{"type":"string"}},"required":["email_address","error"]}}},"required":["invitations","errors"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:manage"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/invitations\/{invitation_id}":{"patch":{"operationId":"invitations.update","summary":"Update invitation","description":"Updates an invitation and returns the updated row. Scoped to the organization named by `organization_id`, and the invitation named by `invitation_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^orginv_"},"example":"orginv_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"team_ids":{"type":"array","maxItems":1,"items":{"type":"string"}},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"status":{"enum":["pending","accepted","revoked"],"type":"string"},"team_ids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"inviter":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","email_address","role","status","team_ids","spending_limit","expires_at","created_at","inviter"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:manage"]},{"clerkSession":[]}]},"delete":{"operationId":"invitations.delete","summary":"Delete invitation","description":"Deletes an invitation. Scoped to the organization named by `organization_id`, and the invitation named by `invitation_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^orginv_"},"example":"orginv_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["members:manage"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/roles":{"get":{"operationId":"roles.list","summary":"List roles","description":"Lists the roles the caller can read. Scoped to the organization named by `organization_id`.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","support_access:manage","content:create","content:delete_own","content:publish","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}},"caller":{"type":"object","properties":{"role":{"anyOf":[{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","support_access:manage","content:create","content:delete_own","content:publish","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}},"required":["roles","caller"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["roles:read"]},{"clerkSession":[]}]},"patch":{"operationId":"roles.set_permissions","summary":"Set role permissions","description":"Set role permissions. Scoped to the organization named by `organization_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","support_access:manage","content:create","content:delete_own","content:publish","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","support_access:manage","content:create","content:delete_own","content:publish","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["roles:manage"]},{"clerkSession":[]}]},"delete":{"operationId":"roles.reset_permissions","summary":"Reset role permissions","description":"Reset role permissions. Scoped to the organization named by `organization_id`.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","support_access:manage","content:create","content:delete_own","content:publish","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["roles:manage"]},{"clerkSession":[]}]}},"\/access\/{resource_type}\/{resource_id}":{"get":{"operationId":"access.get","summary":"Get access","description":"Returns a single access. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:read"]},{"clerkSession":[]}]},"patch":{"operationId":"access.update_general_access","summary":"Update access general access","description":"Update access general access. Scoped to the resource named by `resource_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]}},"\/access\/{resource_type}\/{resource_id}\/grants":{"post":{"operationId":"access.create_grant","summary":"Create access grant","description":"Create access grant. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["user_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]}},"\/access\/{resource_type}\/{resource_id}\/grants\/{grant_id}":{"patch":{"operationId":"access.update_grant","summary":"Update access grant","description":"Update access grant. Scoped to the resource named by `resource_id`, and the grant named by `grant_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]},"delete":{"operationId":"access.delete_grant","summary":"Delete access grant","description":"Delete access grant. Scoped to the resource named by `resource_id`, and the grant named by `grant_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]}},"\/access\/{resource_type}\/{resource_id}\/public-link":{"post":{"operationId":"access.publish_public_link","summary":"Publish public link","description":"Publish public link. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]},"patch":{"operationId":"access.update_public_link","summary":"Update public link","description":"Update public link. Scoped to the resource named by `resource_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"refresh_snapshot":{"type":"boolean"},"reset_token":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]},"delete":{"operationId":"access.revoke_public_link","summary":"Revoke public link","description":"Revoke public link. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"workspace_roles":{"type":"array","items":{"enum":["viewer","editor"],"type":"string"}},"editable_by_others":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"role_without_grant":{"anyOf":[{"enum":["viewer","editor","manager"],"type":"string"},{"type":"null"}]}},"required":["id","user_id","role","granted_by_id","created_at","role_without_grant"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project","element"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}},"can_publish":{"type":"boolean"},"can_file":{"type":"boolean"},"public_link":{"anyOf":[{"type":"object","properties":{"show_prompts":{"type":"boolean"},"show_owner":{"type":"boolean"},"token":{"type":"string","pattern":"^[\\w-]{22}$"},"snapshot_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"snapshot_behind":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["show_prompts","show_owner","token","snapshot_at","snapshot_behind","created_at"]},{"type":"null"}]}},"required":["resource_type","resource_id","owner_id","title","role","shared","capabilities","can_leave","general_access","general_access_editable","editable_by_others","grants","inherited","can_publish","public_link"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:write"]},{"clerkSession":[]}]}},"\/assets":{"get":{"operationId":"assets.list","summary":"List assets","description":"Lists the assets the caller can read.","tags":["Assets"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"kinds","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"enum":["generated","uploaded","imported"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"include_chat_uploads","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"models","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]},"post":{"operationId":"assets.create","summary":"Create asset","description":"Creates an asset and returns the created row.","tags":["Assets"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"files":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","properties":{"mime_type":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+(?:[ \\t]*;[ \\t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"(?:[^\"\\\\\\x00-\\x1f\\x7f]|\\\\[\\x20-\\x7e])*\"))*$"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{}},"required":["mime_type"]}},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]}},"required":["organization_id","files"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"uploads":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"upload_url":{"type":"string","format":"uri"}},"required":["asset","upload_url"]}}},"required":["uploads"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/assets\/models":{"get":{"operationId":"assets.list_models","summary":"List models used by assets","description":"List models used by assets.","tags":["Assets"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["models"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/assets\/imports\/link":{"post":{"operationId":"assets.import_from_link","summary":"Import asset from link","description":"Import asset from link.","tags":["Assets"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","url"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["asset"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/assets\/trash":{"post":{"operationId":"assets.trash_many","summary":"Trash assets","description":"Trash assets.","tags":["Assets"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"asset_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"}}},"required":["organization_id","asset_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","deleted_at","deleted_by_id","updated_at"]}}},"required":["assets"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:delete"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/assets\/restore":{"post":{"operationId":"assets.restore_many","summary":"Restore assets","description":"Restore assets.","tags":["Assets"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"asset_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"}}},"required":["organization_id","asset_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","deleted_at","deleted_by_id","updated_at"]}}},"required":["assets"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:delete"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/assets\/{asset_id}":{"get":{"operationId":"assets.get","summary":"Get asset","description":"Returns a single asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]},"patch":{"operationId":"assets.update","summary":"Update asset","description":"Updates an asset and returns the updated row. Scoped to the asset named by `asset_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"document_sync":{"enum":["synced","unconfirmed"],"type":"string"}},"required":["asset"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:write"]},{"clerkSession":[]}]},"delete":{"operationId":"assets.delete","summary":"Delete asset","description":"Deletes an asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:delete"]},{"clerkSession":[]}]}},"\/assets\/{asset_id}\/voices":{"get":{"operationId":"assets.list_voices","summary":"List asset voices","description":"List asset voices. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"quick_action_id":{"type":"string"},"name":{"type":"string"},"model_name":{"type":"string"},"role":{"enum":["sample","generated"],"type":"string"}},"required":["quick_action_id","name","model_name","role"]}}},"required":["voices"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["voices:read"]},{"clerkSession":[]}]}},"\/assets\/{asset_id}\/imported-parameters":{"get":{"operationId":"assets.get_imported_parameters","summary":"Get asset imported parameters","description":"Get asset imported parameters. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"imported_parameters":{"anyOf":[{"type":"object","properties":{"source":{"enum":["mod","dual"],"type":"string"},"media_model_id":{"type":"string"},"media_model_version_id":{"type":"string"},"version_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quick_action_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"untranslated_fields":{"type":"array","items":{"type":"string"}}},"required":["source","media_model_id","media_model_version_id","version_number","quick_action_id","parameters","untranslated_fields"]},{"type":"null"}]}},"required":["imported_parameters"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]}},"\/assets\/{asset_id}\/prompt":{"post":{"operationId":"assets.extract_prompt","summary":"Extract prompt from asset","description":"Extract prompt from asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"cached":{"type":"boolean"}},"required":["prompt","cached"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]}},"\/assets\/{asset_id}\/restore":{"post":{"operationId":"assets.restore","summary":"Restore asset","description":"Restore asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:delete"]},{"clerkSession":[]}]}},"\/generations":{"get":{"operationId":"generations.list","summary":"List generations","description":"Lists the generations the caller can read.","tags":["Generations"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"model_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"written_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"quote_is_minimum":{"type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_job":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","url"]}},"trashed_outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","url"]}}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","written_prompt","quoted_per_output","quote_is_minimum","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","vertex_job","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number","conversation_id"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["generations:read"]},{"clerkSession":[]}]},"post":{"operationId":"generations.create","summary":"Create generation","description":"Creates a generation and returns the created row.","tags":["Generations"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"output_type":{"enum":["image","video","audio","3d"],"type":"string"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallback_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"strict_model":{"type":"boolean"},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},{"type":"null"}]},"canvas_size":{"anyOf":[{"type":"object","properties":{"w":{"type":"number","exclusiveMinimum":0},"h":{"type":"number","exclusiveMinimum":0}},"required":["w","h"]},{"type":"null"}]},"page_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"written_prompt":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}]},"elements":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"element_id":{"type":"string","format":"uuid"},"label":{"type":"string","minLength":1,"maxLength":129},"asset_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"reference_texts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["element_id","label","asset_ids"]}},"max_credits":{"type":"number","minimum":0},"dispatch":{"enum":["auto","inline"],"type":"string","default":"auto"}},"required":["organization_id","output_type"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"generation_id":{"type":"string"},"reused":{"type":"boolean"},"status":{"enum":["running","completed","failed"],"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"quote":{"type":"object","properties":{"per_output":{"type":"number"},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"number"},"is_minimum":{"type":"boolean"}},"required":["per_output","count","total","is_minimum"]},"credits_charged":{"type":"number"},"assets":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"}},"required":["asset_id","url","type"]}}},"required":["generation_id","reused","status","model","quote","credits_charged","assets"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["generations:create"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/generations\/quote":{"post":{"operationId":"generations.quote","summary":"Quote generation","description":"Quote generation.","tags":["Generations"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"output_type":{"enum":["image","video","audio","3d"],"type":"string"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallback_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"strict_model":{"type":"boolean"},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","output_type"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"output_type":{"type":"string"},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","output_type","version_id","version_number"]},"media_model_variant_id":{"type":"string"},"provider":{"type":"string"},"is_fallback":{"type":"boolean"},"quote":{"type":"object","properties":{"per_output":{"type":"number"},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"number"},"is_minimum":{"type":"boolean"}},"required":["per_output","count","total","is_minimum"]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["model","media_model_variant_id","provider","is_fallback","quote","parameters"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["generations:read"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/generations\/{generation_id}":{"get":{"operationId":"generations.get","summary":"Get generation","description":"Returns a single generation. Scoped to the generation named by `generation_id`.","tags":["Generations"],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-b04c-7036-a91e-3d6f8c25b7e0"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"written_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"quote_is_minimum":{"type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_job":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"elements":{"type":"array","items":{"type":"object","properties":{"element_id":{"type":"string","format":"uuid"},"label":{"type":"string","minLength":1,"maxLength":129},"asset_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"reference_texts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["element_id","label","asset_ids"]}},"placement_chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"credits_charged":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"default":null}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","written_prompt","quoted_per_output","quote_is_minimum","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","vertex_job","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number","conversation_id","assets","elements"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["generations:read"]},{"clerkSession":[]}]},"patch":{"operationId":"generations.update","summary":"Update generation","description":"Updates a generation and returns the updated row. Scoped to the generation named by `generation_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Generations"],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-b04c-7036-a91e-3d6f8c25b7e0"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"enum":["pending","running","completed","failed"],"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"generation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"written_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"quote_is_minimum":{"type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_job":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","written_prompt","quoted_per_output","quote_is_minimum","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","vertex_job","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at"]}},"required":["generation"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["generations:cancel"]},{"clerkSession":[]}]}},"\/library":{"get":{"operationId":"library.list","summary":"List library","description":"Lists the library the caller can read.","tags":["Library"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"kinds","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"models","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"statuses","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"origins","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"include_chat_uploads","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by_id":{"type":"string"},"status":{"enum":["ready","generating","failed"],"type":"string"},"type":{"anyOf":[{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"enum":["image","video","audio","3d","transcript","page","text","file"],"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"enum":["generated","uploaded","imported"],"type":"string"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"enum":["generated","uploaded","chat_upload","imported"],"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"asset":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},{"type":"null"}]},"generation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"written_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"quote_is_minimum":{"type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_job":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","written_prompt","quoted_per_output","quote_is_minimum","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","vertex_job","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number","conversation_id"]},{"type":"null"}]}},"required":["id","created_at","created_by_id","status","type","kind","media_model_id","source","uploaded_from","origin","deleted_at","asset","generation"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]}},"\/library\/periods":{"get":{"operationId":"library.periods","summary":"Periods library","description":"Periods library.","tags":["Library"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"kinds","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"models","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"origins","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"include_chat_uploads","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"granularity","in":"query","required":true,"schema":{"enum":["year","month"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"time_zone","in":"query","required":true,"schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z]"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cover":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},{"type":"null"}]}},"required":["period","starts_at","ends_at","count","cover"]}}},"required":["periods"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}]}},"\/transcripts":{"post":{"operationId":"transcripts.create","summary":"Create transcript","description":"Creates a transcript and returns the created row.","tags":["Transcripts"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"source_asset_id":{"type":"string","format":"uuid"},"source_url":{"type":"string","format":"uri"},"audio_url":{"type":"string","format":"uri"},"source_filename":{"type":"string"},"mime_type":{"type":"string","maxLength":255},"language":{"type":"string"},"method":{"enum":["fast","high-quality"],"type":"string"},"title":{"type":"string"},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits_hold":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","credits_hold","created_at","updated_at"]},"outcome":{"enum":["created","reused"],"type":"string"}},"required":["asset","detail","outcome"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:create"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/transcripts\/quote":{"post":{"operationId":"transcripts.quote","summary":"Quote a transcription","description":"What `POST \/transcripts` would cost for the same source, without transcribing or charging anything. A source whose length is unknown is measured first.","tags":["Transcripts"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"source_asset_id":{"type":"string","format":"uuid"},"source_url":{"type":"string","format":"uri"},"audio_url":{"type":"string","format":"uri"},"mime_type":{"type":"string","maxLength":255},"language":{"type":"string"},"method":{"enum":["fast","high-quality"],"type":"string"}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"reused":{"type":"boolean","description":"A saved transcript of this source, at least as good as the one asked for, would be handed back instead: nothing is charged."},"credits":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"What the transcription should cost: its length at the dearest rate it can run at. 0 when `reused`. The charge follows the length actually transcribed."},"duration_sec":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The source's length in seconds. Null when it couldn't be measured: `credits` then prices 10 minutes."},"method":{"enum":["fast","high-quality"],"type":"string","description":"The method that would actually run for this source."}},"required":["reused","credits","duration_sec","method"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:create"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/transcripts\/audio":{"post":{"operationId":"transcripts.reserve_audio","summary":"Reserve transcript audio upload","description":"Reserve transcript audio upload.","tags":["Transcripts"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"mime_type":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+(?:[ \\t]*;[ \\t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"(?:[^\"\\\\\\x00-\\x1f\\x7f]|\\\\[\\x20-\\x7e])*\"))*$"}},"required":["organization_id","mime_type"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"uri"},"audio_url":{"type":"string","format":"uri"}},"required":["upload_url","audio_url"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:create"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/transcripts\/{transcript_id}":{"get":{"operationId":"transcripts.get","summary":"Get transcript","description":"Returns a single transcript. Scoped to the transcript named by `transcript_id`.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits_hold":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","credits_hold","created_at","updated_at"]},"credits_charged":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["asset","detail","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:read"]},{"clerkSession":[]}]},"patch":{"operationId":"transcripts.update","summary":"Update transcript","description":"Updates a transcript and returns the updated row. Scoped to the transcript named by `transcript_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"identified_speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"replacements":{"type":"array","items":{"type":"object","properties":{"find":{"type":"string","minLength":1},"replace":{"type":"string"}},"required":["find","replace"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits_hold":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","credits_hold","created_at","updated_at"]}},"required":["asset","detail"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:create"]},{"clerkSession":[]}]}},"\/transcripts\/{transcript_id}\/language":{"post":{"operationId":"transcripts.switch_language","summary":"Switch transcript language","description":"Switch transcript language. Scoped to the transcript named by `transcript_id`.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"language_code":{"type":"string","minLength":2,"maxLength":35}},"required":["language_code"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits_hold":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","credits_hold","created_at","updated_at"]}},"required":["asset","detail"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["transcripts:create"]},{"clerkSession":[]}]}},"\/canvases":{"get":{"operationId":"canvases.list","summary":"List canvases","description":"Lists the canvases the caller can read.","tags":["Canvases"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","required":false,"schema":{"enum":["all","mine","shared"],"type":"string","default":"all"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete","created_by"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["canvases:read"]},{"clerkSession":[]}]},"post":{"operationId":"canvases.create","summary":"Create canvas","description":"Creates a canvas and returns the created row.","tags":["Canvases"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["user_id","role"]}},"project_id":{"type":"string","format":"uuid"}},"required":["organization_id","name"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["canvases:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/canvases\/{canvas_id}":{"get":{"operationId":"canvases.get","summary":"Get canvas","description":"Returns a single canvas. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["canvases:read"]},{"clerkSession":[]}]},"patch":{"operationId":"canvases.update","summary":"Update canvas","description":"Updates a canvas and returns the updated row. Scoped to the canvas named by `canvas_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["canvases:write"]},{"clerkSession":[]}]},"delete":{"operationId":"canvases.delete","summary":"Delete canvas","description":"Deletes a canvas. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["canvases:write"]},{"clerkSession":[]}]}},"\/canvases\/{canvas_id}\/access":{"get":{"operationId":"canvases.get_access","summary":"Get canvas access","description":"Get canvas access. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"can_write":{"type":"boolean"}},"required":["can_write"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/models":{"get":{"operationId":"workspace_models.list","summary":"List workspace models","description":"Lists the workspace models the caller can read. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"output_type","in":"query","schema":{"enum":["text","image","video","audio","3d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"unlisted":{"type":"boolean"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"enabled":{"type":"boolean"},"plan_available":{"type":"boolean"},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"cost_floor":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"cost_floor_by_input":{"type":"object","properties":{"image":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"video":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"audio":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]}}},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"replaces":{"type":"array","items":{"type":"string"},"default":[]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","vertex_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default"]},"default":[]},"quick_actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_id":{"type":"string","format":"uuid"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"voice_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}]},"schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","media_model_id","organization_id","created_by_id","visibility","voice_id","codename","name","description","description_translations","schema"]},"default":[]}},"required":["id","codename","name","owner","description","description_translations","released_at","output_type","type","minimum_required_plan","position","unlisted","parameters","version_id","version_number","enabled","plan_available","base_cost","cost_floor","cost_floor_by_input"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]},"patch":{"operationId":"workspace_models.set_state","summary":"Set workspace model state","description":"Set workspace model state. Scoped to the organization named by `organization_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}},"enabled":{"type":"boolean"}},"required":["scope","model_ids","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["model_id","enabled"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/models\/governance":{"get":{"operationId":"workspace_models.governance","summary":"Get workspace model governance","description":"Get workspace model governance. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"kind","in":"query","required":true,"schema":{"enum":["workspace","team","user"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"name":"output_type","in":"query","required":false,"schema":{"enum":["text","image","video","audio","3d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"access":{"enum":["everyone","allowlist","denylist"],"type":"string"},"unlisted":{"type":"boolean"},"successor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","vertex_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default","deleted_at","created_at","updated_at"]},"default":[]},"state":{"enum":["off","inherit"],"type":"string"},"locked":{"type":"boolean"},"locked_by":{"anyOf":[{"enum":["workspace","team","admin"],"type":"string"},{"type":"null"}]},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"cost_floor":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"position_from":{"anyOf":[{"enum":["workspace","team","user"],"type":"string"},{"type":"null"}],"default":null}},"required":["id","codename","name","owner","description","description_translations","released_at","output_type","type","minimum_required_plan","position","access","unlisted","successor_id","deleted_at","deleted_by_id","created_at","updated_at","parameters","version_id","version_number","state","locked","locked_by","base_cost","cost_floor"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/models\/position":{"put":{"operationId":"workspace_models.set_position","summary":"Set workspace model positions","description":"Set workspace model positions. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","maxItems":500,"items":{"type":"string","format":"uuid"}}},"required":["scope","model_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"model_ids":{"type":"array","items":{"type":"string"}}},"required":["model_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/models\/{media_model_id}\/versions\/{version_id}":{"get":{"operationId":"workspace_models.version","summary":"Get workspace model version","description":"Get workspace model version. Scoped to the organization named by `organization_id`, and the media model named by `media_model_id`, and the version named by `version_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"media_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-f480-747a-ad52-1c3b7e95f24d"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"unlisted":{"type":"boolean"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"enabled":{"type":"boolean"},"plan_available":{"type":"boolean"},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"cost_floor":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"cost_floor_by_input":{"type":"object","properties":{"image":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"video":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"audio":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]}}},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"replaces":{"type":"array","items":{"type":"string"},"default":[]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"vertex_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","vertex_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default"]},"default":[]},"quick_actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_id":{"type":"string","format":"uuid"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"voice_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}]},"schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","media_model_id","organization_id","created_by_id","visibility","voice_id","codename","name","description","description_translations","schema"]},"default":[]}},"required":["id","codename","name","owner","description","description_translations","released_at","output_type","type","minimum_required_plan","position","unlisted","parameters","version_id","version_number","enabled","plan_available","base_cost","cost_floor","cost_floor_by_input"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/alert-policy":{"get":{"operationId":"alert_policy.get","summary":"Get alert policy","description":"Returns a single alert policy. Scoped to the organization named by `organization_id`.","tags":["Alert policy"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"always_ask_above_enabled":{"type":"boolean"},"always_ask_above_credits":{"type":"integer","minimum":0,"maximum":2147483647},"auto_accept_below_enabled":{"type":"boolean"},"auto_accept_below_credits":{"type":"integer","minimum":0,"maximum":2147483647},"default_action":{"enum":["accept","decline"],"type":"string"},"countdown_seconds":{"type":"integer","minimum":1,"maximum":2147483647}},"required":["enabled","always_ask_above_enabled","always_ask_above_credits","auto_accept_below_enabled","auto_accept_below_credits","default_action","countdown_seconds"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/billing":{"get":{"operationId":"billing.info","summary":"Get billing info","description":"Get billing info. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string"},"organization_name":{"type":"string"},"has_customer":{"type":"boolean"},"has_subscription":{"type":"boolean"},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"balance":{"anyOf":[{"type":"number"},{"type":"null"}]},"delinquent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"chargeable_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]}},"required":["id","email","billing_emails","balance","delinquent"]},{"type":"null"}]},"subscription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","canceled","incomplete","incomplete_expired","past_due","paused","trialing","unpaid"],"type":"string"},"is_active":{"type":"boolean"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_invoice":{"anyOf":[{"type":"object","properties":{"amount_due":{"type":"number"},"currency":{"type":"string"},"billed_at":{"type":"string"}},"required":["amount_due","currency","billed_at"]},{"type":"null"}]},"cancel_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"trial_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"collection_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancels_at_trial_end":{"type":"boolean"},"is_linked":{"type":"boolean"},"latest_invoice":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount_due":{"type":"number"},"amount_paid":{"type":"number"},"currency":{"type":"string"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"created":{"type":"string"}},"required":["status","amount_due","amount_paid","currency","hosted_invoice_url","due_date","created"]},{"type":"null"}]},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"coupon_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"percent_off":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount_off":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration_in_months":{"anyOf":[{"type":"number"},{"type":"null"}]},"end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","coupon_name","percent_off","amount_off","currency","duration","duration_in_months","end"]}},"collection_state":{"type":"object","properties":{"collects":{"enum":["card","card_missing","card_unknown","emailed_invoice","outside_stripe","collection_paused","nothing_free"],"type":"string"},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"card_expired":{"type":"boolean"},"card_source":{"anyOf":[{"enum":["subscription","customer"],"type":"string"},{"type":"null"}]},"customer_default_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_outcome":{"anyOf":[{"enum":["bills","cancels","pauses","unknown"],"type":"string"},{"type":"null"}]},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end_behavior":{"anyOf":[{"type":"string"},{"type":"null"}]},"self_renews":{"type":"boolean"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_reason":{"anyOf":[{"enum":["scheduled_date","period_end","trial_end","canceled"],"type":"string"},{"type":"null"}]},"next_bill":{"enum":["scheduled","none","passed","unknown"],"type":"string"},"next_bill_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_payment":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"out_of_band":{"type":"boolean"}},"required":["at","amount","currency","out_of_band"]},{"type":"null"}]},"open_drafts":{"type":"number"}},"required":["collects","has_payment_method","card","card_expired","card_source","customer_default_card","billing_email","trial_outcome","trial_ends_at","trial_end_behavior","self_renews","ends_at","ends_reason","next_bill","next_bill_at","last_payment","open_drafts"]},"plan":{"anyOf":[{"type":"object","properties":{"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["plan_id","name","credits","price","currency","interval"]},{"type":"null"}]},"scheduled_change":{"anyOf":[{"type":"object","properties":{"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"managed_by_staff":{"type":"boolean"},"new_plan":{"type":"object","properties":{"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"type":"string"},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["plan_id","name","credits","price","currency","interval"]}},"required":["effective_date","new_plan"]},{"type":"null"}]}},"required":["id","status","is_active","current_period_start","current_period_end","cancel_at","canceled_at","trial_end","plan","scheduled_change"]},{"type":"null"}]},"entitled_plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"available_plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_interval":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_interval_count":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","amount","currency","interval","credits","usage_interval","usage_interval_count"]}}},"required":["id","plan_id","name","description","prices"]}},"credit_purchase":{"type":"object","properties":{"blocked_reason":{"anyOf":[{"enum":["no_subscription","plan_too_low","zero_plan","usage_plan","contract_unpriced","rate_underivable"],"type":"string"},{"type":"null"}]},"rate":{"anyOf":[{"type":"object","properties":{"unit_amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"credits_per_billing_period":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"credits_per_cycle":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"currency":{"type":"string"}},"required":["unit_amount_cents","credits_per_billing_period","credits_per_cycle","currency"]},{"type":"null"}]},"pays_out_of_band":{"type":"boolean"},"next_invoice_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["blocked_reason","rate","pays_out_of_band","next_invoice_at"]},"postpaid":{"anyOf":[{"type":"object","properties":{"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"partner_support":{"type":"boolean"}},"required":["contact_email","contact_phone","partner_support"]},{"type":"null"}]},"store_subscription":{"anyOf":[{"type":"object","properties":{"plan":{"enum":["hobby","basic","pro"],"type":"string"},"product_id":{"type":"string"},"original_transaction_id":{"type":"string"},"will_renew":{"type":"boolean"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"}},"required":["plan","product_id","will_renew","current_period_end","is_active"]},{"type":"null"}]}},"required":["organization_id","organization_name","has_customer","has_subscription","customer","subscription","entitled_plan_id","available_plans","credit_purchase","postpaid"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["billing:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/billing\/history":{"get":{"operationId":"billing.history","summary":"List billing history","description":"List billing history. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"kinds","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"outcomes","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["invoice","plan_change","payment","refund","credit_note"],"type":"string"},"outcome":{"enum":["succeeded","pending","failed","void"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"products":{"type":"array","items":{"type":"string"}},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","outcome","status","occurred_at","amount","currency","number","reason","products","card_brand","card_last4","failure_code","url","pdf_url"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["billing:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/subscription":{"get":{"operationId":"billing.subscription_status","summary":"Get subscription status","description":"Get subscription status. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"has_subscription":{"type":"boolean"},"status":{"anyOf":[{"enum":["active","canceled","incomplete","incomplete_expired","past_due","paused","trialing","unpaid"],"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"plan":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["name","credits","price","currency","interval"]},{"type":"null"}]},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["has_subscription","status","plan","current_period_end","cancel_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["billing:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/subscription\/preview":{"get":{"operationId":"billing.preview_change","summary":"Preview plan change","description":"Preview plan change. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"price_id","in":"query","required":true,"schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"is_upgrade":{"type":"boolean"},"current_plan":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","price","credits"]},"new_plan":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","price","credits"]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"immediate_charge":{"type":"number"},"effective_at":{"type":"string"},"next_billing_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_grant":{"type":"object","properties":{"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["credits","effective_at","expires_at"]}},"required":["is_upgrade","current_plan","new_plan","current_period_end","immediate_charge"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["billing:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/credits":{"get":{"operationId":"credits.balance","summary":"Get credit balance","description":"Get credit balance. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"used":{"type":"number"},"total":{"type":"number"},"subscription_credits":{"type":"number"},"purchase_credits":{"type":"number"},"buckets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"number"},"remaining":{"type":"number"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","amount","remaining","expires_at"]}},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["available","used","total","subscription_credits","purchase_credits","buckets","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["credits:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/credits\/free-benefit":{"get":{"operationId":"credits.free_benefit","summary":"Free credits benefit","description":"Free credits benefit. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"receives_free_credits":{"type":"boolean"},"withheld":{"type":"boolean"},"withheld_reason":{"anyOf":[{"enum":["linked_account","email_alias","tor","banned","rush","automated","blocklist","bot","timezone","risk_score"],"type":"string"},{"type":"null"}]}},"required":["receives_free_credits","withheld","withheld_reason"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["credits:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/credits\/cycle":{"get":{"operationId":"credits.cycle","summary":"Get credit cycle","description":"Get credit cycle. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid","store"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at"]},"window":{"anyOf":[{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"basis":{"enum":["free","contract","postpaid","trial","invoice","store"],"type":"string"}},"required":["start","end","basis"]},{"type":"null"}]},"starts_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_refill_credits":{"type":"number"},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid","store"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at"]}},"chat_fallback_available":{"type":"boolean","default":false}},"required":["current","window","starts_at","next_refill_credits","history"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["credits:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/credits\/transactions":{"get":{"operationId":"credits.transactions","summary":"List credit transactions","description":"List credit transactions. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","refunded_usage","plan_adjustment","usage","expiration","opening_adjustment","refunded_purchase","refunded_subscription","adjustment"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"api_key_id","in":"query","schema":{"type":"string","format":"uuid","description":"Only what this API key spent."},"allowEmptyValue":true,"allowReserved":true},{"name":"end_date","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"type":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","usage","expiration","opening_adjustment","refunded_usage","refunded_purchase","refunded_subscription","adjustment","plan_adjustment"],"type":"string"},"amount":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"remaining":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"grant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"feature":{"anyOf":[{"type":"string"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripe_checkout_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"effective_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"anyOf":[{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["first_name","last_name","email","image_url"]},{"type":"null"}]},"team":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","color"]},{"type":"null"}]},"api_key":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},{"type":"null"}]}},"required":["id","organization_id","user_id","team_id","type","amount","remaining","grant_id","description","feature","generation_id","conversation_id","asset_id","message_id","tool_call_id","api_key_id","stripe_checkout_session_id","idempotency_key","stripe_invoice_id","expires_at","effective_at","created_at","user","team","api_key"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"has_more_future":{"type":"boolean"}},"required":["transactions","total","limit","offset","has_more_future"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["credits:read"]},{"clerkSession":[]}]}},"\/reports\/query":{"post":{"operationId":"reports.query","summary":"Query a usage report","description":"Query a usage report.","tags":["Reports"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^org_"},"description":"The workspaces the report covers, by id. The caller must be a member of every one."},"metrics":{"type":"array","minItems":1,"items":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","free_messages","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"description":"The first metric orders a ranking and a breakdown."},"group_by":{"enum":["none","day","week","month","user","workspace","team","feature","model","variant","output_type","status","provider","source","credit_type","channel","tool"],"type":"string","default":"none"},"period":{"anyOf":[{"type":"object","properties":{"kind":{"const":"last_days"},"days":{"anyOf":[{"const":1},{"const":7},{"const":14},{"const":30},{"const":90}]}},"required":["kind","days"]},{"type":"object","properties":{"kind":{"const":"billing_cycle"},"offset":{"type":"integer","minimum":-24,"maximum":0,"description":"0 (or none) = the current cycle, -1 = the one before it, and so on."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"all_time"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"custom"},"from":{"type":"string","format":"date","description":"A calendar date in the report's timezone (YYYY-MM-DD)."},"to":{"type":"string","format":"date","description":"Exclusive: the first day NOT counted."}},"required":["kind","from","to"]}]},"timezone":{"type":"string","default":"UTC","description":"Day, week and month buckets and the period edges use this zone."},"filters":{"type":"object","properties":{"user_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^user_"}},"team_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"},"description":"The team each charge was made under."},"categories":{"type":"object","properties":{"feature":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"model":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"variant":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"output_type":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"status":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"provider":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"source":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"credit_type":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"channel":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"tool":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}}},"additionalProperties":false,"description":"Keep only facts whose category is one of these values: the keys a breakdown returns, e.g. a model's id or a feature."}},"default":{}},"limit":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Rows in a ranking or a breakdown."}},"required":["organization_ids","metrics","period"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"audience":{"anyOf":[{"const":"all"},{"type":"array","items":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string"},"slug":{"type":"string"},"user_ids":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^user_"}},{"type":"null"}]}},"required":["organization_id","name","slug","user_ids"]}}],"description":"Whose usage the report counted: each workspace by id, name and slug. `user_ids: null` = every member of that workspace; a list = only those people."},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"earlier_cycle":{"type":"boolean","description":"Billing cycle periods only: whether a cycle before this one exists, so `offset - 1` can be asked."}},"required":["from","to","timezone"]},"result":{"anyOf":[{"type":"object","properties":{"shape":{"const":"kpi"},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","free_messages","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["shape","values"]},{"type":"object","properties":{"shape":{"const":"series"},"interval":{"enum":["day","week","month"],"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","format":"date","description":"The first local day of the bucket. A week or month bucket at an edge of the period counts only the days inside it."},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","free_messages","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["bucket","values"]}}},"required":["shape","interval","points"]},{"type":"object","properties":{"shape":{"const":"ranking"},"dimension":{"enum":["user","workspace","team"],"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted":{"type":"boolean"},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","free_messages","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["id","name","detail","image_url","deleted","values"]}}},"required":["shape","dimension","rows"]},{"type":"object","properties":{"shape":{"const":"breakdown"},"category":{"enum":["feature","model","variant","output_type","status","provider","source","credit_type","channel","tool"],"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","free_messages","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["key","label","values"]}}},"required":["shape","category","rows"]}]}},"required":["audience","period","result"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["reports:read"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/organizations\/{organization_id}\/reports\/balance":{"get":{"operationId":"reports.balance","summary":"Get credit balance and runway","description":"Get credit balance and runway. Scoped to the organization named by `organization_id`.","tags":["Reports"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"buckets":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"},"remaining":{"type":"number"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["type","amount","remaining","expires_at"]}},"runway":{"type":"object","properties":{"cycle":{"anyOf":[{"type":"object","properties":{"credits_per_day":{"type":"number"},"runs_out_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["credits_per_day","runs_out_on"]},{"type":"null"}]},"last_7_days":{"type":"object","properties":{"credits_per_day":{"type":"number"},"runs_out_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["credits_per_day","runs_out_on"]},"renewal":{"type":"object","properties":{"renews_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"credits_per_day":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["renews_on","credits_per_day"]}},"required":["cycle","last_7_days","renewal"]},"plan_history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid","store"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at","plan_name"]}}},"required":["available","buckets","runway","plan_history"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["reports:read"]},{"clerkSession":[]}]}},"\/reports\/inventory":{"post":{"operationId":"reports.inventory","summary":"Get workspace inventory","description":"Get workspace inventory.","tags":["Reports"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^org_"},"description":"The workspaces the report covers, by id. The caller must be a member of every one."}},"required":["organization_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"number"},"seats":{"anyOf":[{"type":"number"},{"type":"null"}]},"users":{"type":"number"},"projects":{"type":"number"},"canvases":{"type":"number"},"skills":{"type":"number"},"connectors":{"type":"number"},"scheduled_tasks":{"type":"number"},"skills_by_source":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]}}},"required":["workspaces","seats","users","projects","canvases","skills","connectors","scheduled_tasks","skills_by_source"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["reports:read"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/skills":{"get":{"operationId":"custom_skills.list","summary":"List custom skills","description":"Lists the custom skills the caller can read.","tags":["Custom skills"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"shared":{"type":"boolean"},"verified":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"resources":{"type":"object","properties":{"scripts":{"type":"number"},"references":{"type":"number"},"assets":{"type":"number"}},"required":["scripts","references","assets"]},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}},"required":["id","codename","organization_id","source","name","description","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at","created_by","shared","verified","can_edit","can_delete","state","resources","projects"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]},"post":{"operationId":"custom_skills.create","summary":"Create custom skill","description":"Creates a custom skill and returns the created row.","tags":["Custom skills"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"body":{"type":"string","minLength":1},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}},"source":{"enum":["custom","community"],"type":"string"},"author":{"type":"string","maxLength":200},"project_id":{"type":"string","format":"uuid"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id","name","description","body"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at"]},"created":{"type":"boolean"}},"required":["skill","created"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/skills\/{skill_id}":{"get":{"operationId":"custom_skills.get","summary":"Get custom skill","description":"Returns a single custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"shared":{"type":"boolean"},"verified":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"last_edit":{"anyOf":[{"type":"object","properties":{"by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["by","at"]},{"type":"null"}]},"listing":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"update_available":{"type":"boolean"}},"required":["slug","title","update_available"]},{"type":"null"}]}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at","created_by","shared","verified","can_edit","can_delete","last_edit","listing"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]},"patch":{"operationId":"custom_skills.update","summary":"Update custom skill","description":"Updates a custom skill and returns the updated row. Scoped to the skill named by `skill_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"body":{"type":"string","minLength":1},"files":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["path","content"]},{"type":"object","properties":{"path":{"type":"string","minLength":1},"delete":{"const":true}},"required":["path","delete"]}]},"file_changes":{"type":"array","minItems":1,"items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["path","content"]},{"type":"object","properties":{"path":{"type":"string","minLength":1},"delete":{"const":true}},"required":["path","delete"]}]}},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"expected_updated_at":{"type":"string","format":"date-time","x-native-type":"date"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}]},"delete":{"operationId":"custom_skills.delete","summary":"Delete custom skill","description":"Deletes a custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}]}},"\/skills\/{skill_id}\/restore":{"post":{"operationId":"custom_skills.restore","summary":"Restore custom skill","description":"Restore custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}]}},"\/skills\/{skill_id}\/versions":{"get":{"operationId":"custom_skills.versions.list","summary":"List custom skill versions","description":"Lists the custom skill versions the caller can read. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"skill_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string"},"description":{"type":"string"},"restored_from_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}}},"required":["changed","added","removed"]},{"type":"null"}]}},"required":["id","skill_id","organization_id","version","name","description","restored_from_version_id","created_by_id","created_at","created_by","changes"]}}},"required":["versions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]}},"\/skills\/{skill_id}\/versions\/{version_id}":{"get":{"operationId":"custom_skills.versions.get","summary":"Get custom skill version","description":"Returns a single custom skill version. Scoped to the skill named by `skill_id`, and the version named by `version_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"version":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"skill_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"restored_from_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","skill_id","organization_id","version","name","description","body","files","restored_from_version_id","created_by_id","created_at","created_by"]}},"required":["version"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]}},"\/skills\/{skill_id}\/versions\/{version_id}\/restore":{"post":{"operationId":"custom_skills.versions.restore","summary":"Restore custom skill version","description":"Restore custom skill version. Scoped to the skill named by `skill_id`, and the version named by `version_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}]}},"\/skill-catalog":{"get":{"operationId":"skill_catalog.list","summary":"List skill catalog","description":"Lists the skill catalog the caller can read.","tags":["Skill catalog"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"category","in":"query","required":false,"schema":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"enum":["endless","community"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","required":false,"schema":{"enum":["added","not_added"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"categories":{"type":"array","items":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"}},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"author":{"type":"string"},"verified":{"type":"boolean"},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"uses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"added_skill_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","summary","categories","cover_url","color","author","verified","name","updated_at","uses","added_skill_id"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_any_category":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"categories":{"type":"object","propertyNames":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["items","next_cursor","total","total_any_category","categories"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]}},"\/skill-catalog\/{slug}":{"get":{"operationId":"skill_catalog.get","summary":"Get skill catalog","description":"Returns a single skill catalog.","tags":["Skill catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"example":"launch-2026"},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"listing":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"categories":{"type":"array","items":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"}},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"author":{"type":"string"},"verified":{"type":"boolean"},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"uses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"added_skill_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"body":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}}},"required":["id","slug","title","summary","categories","cover_url","color","author","verified","name","updated_at","uses","added_skill_id","examples","license","source_url","description","body","files"]}},"required":["listing"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:read"]},{"clerkSession":[]}]}},"\/skill-catalog\/{slug}\/add":{"post":{"operationId":"skill_catalog.add","summary":"Add skill catalog","description":"Add skill catalog.","tags":["Skill catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"example":"launch-2026"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"project_id":{"type":"string","format":"uuid"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skill_id":{"type":"string"},"created":{"type":"boolean"}},"required":["skill_id","created"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["skills:write"]},{"clerkSession":[]}]}},"\/scheduled-tasks":{"get":{"operationId":"scheduled_tasks.list","summary":"List scheduled tasks","description":"Lists the scheduled tasks the caller can read.","tags":["Scheduled tasks"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"delivery":{"enum":["every_run","when_relevant"],"type":"string"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled","quiet"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","delivery","next_run_at","last_run_at","mod_schedule_id","project_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails","shared","can_edit","can_delete"]}}},"required":["items"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["schedules:read"]},{"clerkSession":[]}]}},"\/scheduled-tasks\/{scheduled_task_id}":{"get":{"operationId":"scheduled_tasks.get","summary":"Get scheduled task","description":"Returns a single scheduled task. Scoped to the scheduled task named by `scheduled_task_id`.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"delivery":{"enum":["every_run","when_relevant"],"type":"string"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled","quiet"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","delivery","next_run_at","last_run_at","mod_schedule_id","project_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["schedules:read"]},{"clerkSession":[]}]}},"\/scheduled-task-runs":{"get":{"operationId":"scheduled_tasks.org_runs","summary":"List all scheduled task runs","description":"List all scheduled task runs.","tags":["Scheduled tasks"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"scheduled_task_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scheduled_task_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggered_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["in_progress","success","error","cancelled","quiet"],"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"quiet_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"type":"string","format":"date-time","x-native-type":"date"},"heartbeat_at":{"type":"string","format":"date-time","x-native-type":"date"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_refunded":{"type":"integer","minimum":0,"maximum":9007199254740991},"schedule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_by_id":{"type":"string"},"time":{"type":"string"},"timezone":{"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"},"repeat":{"type":"object","properties":{"every_minutes":{"type":"integer","minimum":15,"maximum":240,"multipleOf":15},"until":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["every_minutes","until"]}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"status":{"enum":["active","paused"],"type":"string"}},"required":["id","name","created_by_id","time","timezone","visibility","status"]}},"required":["id","scheduled_task_id","organization_id","conversation_id","workflow_run_id","triggered_by_id","status","error","quiet_reason","started_at","heartbeat_at","completed_at","credits_used","credits_refunded","schedule"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["schedules:read"]},{"clerkSession":[]}]}},"\/conversations":{"get":{"operationId":"conversations.list","summary":"List conversations","description":"Lists the conversations the caller can read.","tags":["Conversations"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","required":false,"schema":{"enum":["mine","shared","involved","all"],"type":"string","default":"mine"},"allowEmptyValue":true,"allowReserved":true},{"name":"include_scheduled","in":"query","required":false,"schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"element_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"run_status":{"anyOf":[{"enum":["running","failed"],"type":"string"},{"type":"null"}]}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","element_id","canvas_id","active_leaf_id","schedule_id","generation_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete","run_status"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:read"]},{"clerkSession":[]}]}},"\/conversations\/{conversation_id}":{"get":{"operationId":"conversations.get","summary":"Get conversation","description":"Returns a single conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"element_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"others_can_write":{"type":"boolean"},"canvas_ids":{"type":"array","items":{"type":"string"}}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","element_id","canvas_id","active_leaf_id","schedule_id","generation_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete","others_can_write","canvas_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:read"]},{"clerkSession":[]}]},"patch":{"operationId":"conversations.update","summary":"Update conversation","description":"Updates a conversation and returns the updated row. Scoped to the conversation named by `conversation_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"only_if_untitled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"element_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","element_id","canvas_id","active_leaf_id","schedule_id","generation_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["chat"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:write"]},{"clerkSession":[]}]},"delete":{"operationId":"conversations.delete","summary":"Delete conversation","description":"Deletes a conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:write"]},{"clerkSession":[]}]}},"\/conversations\/{conversation_id}\/access":{"get":{"operationId":"conversations.get_access","summary":"Get conversation access","description":"Get conversation access. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"can_send":{"type":"boolean"}},"required":["can_send"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:read"]},{"clerkSession":[]}]}},"\/conversations\/{conversation_id}\/restore":{"post":{"operationId":"conversations.restore","summary":"Restore conversation","description":"Restore conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"element_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","element_id","canvas_id","active_leaf_id","schedule_id","generation_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:write"]},{"clerkSession":[]}]}},"\/conversations\/{conversation_id}\/messages":{"get":{"operationId":"conversations.messages.list","summary":"List conversation messages","description":"Lists the conversation messages the caller can read. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"name":"view","in":"query","schema":{"enum":["full","display"],"type":"string","description":"`display` drops what only the model reads (reasoning signatures, connector tool results, the fields of a research tool's items the app does not show) and marks each trimmed part. Default `full`."},"allowEmptyValue":true,"allowReserved":true},{"name":"parts_of","in":"query","schema":{"type":"string","description":"Comma-separated message ids: only these messages carry their `parts`, every other one has `[]`. Empty for none. Omit for every message's parts."},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"role":{"enum":["system","user","assistant"],"type":"string"},"parts":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_message_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversation_id","role","parts","metadata","parent_id","created_by_id","model","chat_model_id","mod_message_id","created_at"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["chats:read"]},{"clerkSession":[]}]}},"\/chat-models\/available":{"get":{"operationId":"chat_models.available","summary":"List available chat models","description":"List available chat models.","tags":["Chat models"],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}],"default":null},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"variant_id":{"type":"string"},"price":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":1000000},"output":{"type":"number","minimum":0,"maximum":1000000},"cache_read":{"type":"number","minimum":0,"maximum":1000000},"cache_write":{"type":"number","minimum":0,"maximum":1000000}},"required":["input","output","cache_read","cache_write"]},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"price_index":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"pricing":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":10000},"output":{"type":"number","minimum":0,"maximum":10000},"cache_read":{"type":"number","minimum":0,"maximum":10000},"cache_write":{"type":"number","minimum":0,"maximum":10000}},"required":["input","output","cache_read","cache_write"]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"},"staff":{"type":"boolean","default":false},"available_without_credits":{"type":"boolean","default":false}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","variant_id","price","cost_tier","minimum_required_plan","position","created_at"]}},"successors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"successor_id":{"type":"string"}},"required":["id","codename","successor_id"]}}},"required":["items","successors"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/file-tokens":{"post":{"operationId":"files.tokens.create","summary":"Mint a file token","description":"A short-lived token that opens stored files on the files host as you: the browser's cookie (no keys, checked per file), or a token scoped to the files of one use (a model reading your images, a provider running a generation, an MCP result). A token never opens more than you can read.","tags":["Files"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"purpose":{"enum":["cookie","provider","model","mcp","export","push"],"type":"string"},"keys":{"type":"array","maxItems":100,"items":{"type":"string"}}},"required":["purpose"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["assets:read"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/organizations\/{organization_id}\/chat-models":{"get":{"operationId":"workspace_chat_models.list","summary":"List workspace chat models","description":"Lists the workspace chat models the caller can read. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}],"default":null},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"variant_id":{"type":"string"},"price":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":1000000},"output":{"type":"number","minimum":0,"maximum":1000000},"cache_read":{"type":"number","minimum":0,"maximum":1000000},"cache_write":{"type":"number","minimum":0,"maximum":1000000}},"required":["input","output","cache_read","cache_write"]},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"price_index":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"pricing":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":10000},"output":{"type":"number","minimum":0,"maximum":10000},"cache_read":{"type":"number","minimum":0,"maximum":10000},"cache_write":{"type":"number","minimum":0,"maximum":10000}},"required":["input","output","cache_read","cache_write"]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"},"staff":{"type":"boolean","default":false},"available_without_credits":{"type":"boolean","default":false},"enabled":{"type":"boolean"}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","variant_id","price","cost_tier","minimum_required_plan","position","created_at","enabled"]}},"successors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"successor_id":{"type":"string"}},"required":["id","codename","successor_id"]}}},"required":["items","successors"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]},"patch":{"operationId":"workspace_chat_models.set_state","summary":"Set workspace chat model state","description":"Set workspace chat model state. Scoped to the organization named by `organization_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}},"enabled":{"type":"boolean"}},"required":["scope","model_ids","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["model_id","enabled"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/chat-models\/governance":{"get":{"operationId":"workspace_chat_models.governance","summary":"Get workspace chat model governance","description":"Get workspace chat model governance. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"kind","in":"query","required":true,"schema":{"enum":["workspace","team","user"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"description_translations":{"anyOf":[{"type":"object","propertyNames":{"enum":["es","pt","de","fr"],"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2000}},{"type":"null"}],"default":null},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"variant_id":{"type":"string"},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"price_index":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"},"staff":{"type":"boolean","default":false},"available_without_credits":{"type":"boolean","default":false},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}]},"position_from":{"anyOf":[{"enum":["workspace","team","user"],"type":"string"},{"type":"null"}]},"state":{"enum":["off","on","inherit"],"type":"string"},"locked":{"type":"boolean"},"locked_by":{"anyOf":[{"enum":["workspace","team","admin"],"type":"string"},{"type":"null"}]},"inherited_enabled":{"type":"boolean"}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","variant_id","cost_tier","minimum_required_plan","position","created_at","preference_position","position_from","state","locked","locked_by","inherited_enabled"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:read"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/chat-models\/position":{"put":{"operationId":"workspace_chat_models.set_position","summary":"Set workspace chat model positions","description":"Set workspace chat model positions. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","maxItems":500,"items":{"type":"string","format":"uuid"}}},"required":["scope","model_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"model_ids":{"type":"array","items":{"type":"string"}}},"required":["model_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:write"]},{"clerkSession":[]}]}},"\/organizations\/{organization_id}\/activity":{"get":{"operationId":"activity.list","summary":"List activity","description":"Lists the activity the caller can read. Scoped to the organization named by `organization_id`.","tags":["Activity"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"categories","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"actors","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"teams","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"media","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"enum":["generation.ran","asset.uploaded","asset.trashed","chat.ran","chat.created","chat.trashed","canvas.created","canvas.trashed","connector.created","connector.deleted","credit.transaction","credit.spent","member.joined","invitation.sent","workspace.imported","project.created","project.trashed","access.granted","project.asset_linked","project.chat_linked","project.canvas_linked","project.skill_linked","team.created","team.deleted","team.member_added","team.member_removed","api_key.created","api_key.revoked"],"type":"string"},"category":{"enum":["generation","content","credit","member"],"type":"string"},"event_at":{"type":"string"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_key":{"type":"string"},"legacy_source":{"anyOf":[{"enum":["mod","dual"],"type":"string"},{"type":"null"}]},"generation":{"type":"object","properties":{"status":{"enum":["pending","running","completed","failed"],"type":"string"},"output_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","url"]}}},"required":["status","output_count","duration_ms","model_name","media","prompt","credits","outputs"]},"chat_run":{"type":"object","properties":{"status":{"enum":["completed","failed","declined","partial","unknown"],"type":"string"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"object","properties":{"completed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"declined":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["completed","failed","declined"]}},"required":["status","credits","conversation_id","tools"]},"asset":{"type":"object","properties":{"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","url"]},"credit":{"type":"object","properties":{"type":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","refunded_usage","plan_adjustment","usage","expiration","opening_adjustment","refunded_purchase","refunded_subscription","adjustment"],"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"feature":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","amount","feature","description","conversation_id"]},"invitation":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"}},"required":["email","role"]},"import_run":{"type":"object","properties":{"source":{"enum":["mod","dual"],"type":"string"},"status":{"enum":["queued","running","succeeded","failed"],"type":"string"},"members":{"type":"integer","minimum":0,"maximum":9007199254740991},"assets":{"type":"integer","minimum":0,"maximum":9007199254740991},"canvases":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","status","members","assets","canvases"]},"access":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element","connector_credential"],"type":"string"},"resource_id":{"type":"string"},"member_id":{"type":"string"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["resource_type","resource_id","member_id","role"]},"project":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"linked_title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","emoji","linked_title"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","member_id"]},"api_key":{"type":"object","properties":{"id":{"type":"string"},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]}},"required":["id","revoked_reason"]}},"required":["id","action","category","event_at","actor_id","target_id","title"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:read"]},{"clerkSession":[]}]}},"\/notifications":{"get":{"operationId":"notifications.list","summary":"List notifications","description":"Lists the notifications the caller can read.","tags":["Notifications"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"view","in":"query","required":false,"schema":{"enum":["inbox","archived"],"type":"string","default":"inbox"},"allowEmptyValue":true,"allowReserved":true},{"name":"resource_type","in":"query","required":false,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"share"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"workspace_share"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"mention"},"comment_id":{"type":"string","format":"uuid"},"thread_id":{"type":"string","format":"uuid"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","comment_id","thread_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"comment_reply"},"comment_id":{"type":"string","format":"uuid"},"thread_id":{"type":"string","format":"uuid"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","comment_id","thread_id"]}]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"unseen_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","next_cursor","unseen_count"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["notifications:read"]},{"clerkSession":[]}]}},"\/notifications\/{notification_id}":{"patch":{"operationId":"notifications.update","summary":"Update notification","description":"Updates a notification and returns the updated row. Scoped to the notification named by `notification_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Notifications"],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"share"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"workspace_share"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"mention"},"comment_id":{"type":"string","format":"uuid"},"thread_id":{"type":"string","format":"uuid"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","comment_id","thread_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"comment_reply"},"comment_id":{"type":"string","format":"uuid"},"thread_id":{"type":"string","format":"uuid"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","comment_id","thread_id"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["notifications:write"]},{"clerkSession":[]}]}},"\/notifications\/mark":{"post":{"operationId":"notifications.mark","summary":"Mark notification","description":"Mark notification.","tags":["Notifications"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"state":{"enum":["seen","read","archived"],"type":"string"},"through_id":{"type":"string","format":"uuid"},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill","element"],"type":"string"},"resource_id":{"type":"string","format":"uuid"}},"required":["resource_type","resource_id"]},"thread_id":{"type":"string","format":"uuid"}},"required":["organization_id","state"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["notifications:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/notifications\/preferences":{"get":{"operationId":"notifications.get_preferences","summary":"Get notification preferences","description":"Get notification preferences.","tags":["Notifications"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"object","propertyNames":{"enum":["share","workspace_share","mention","comment_reply","credits_low","credits_exhausted"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["email"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["notifications:read"]},{"clerkSession":[]}]},"patch":{"operationId":"notifications.update_preferences","summary":"Update notification preferences","description":"Update notification preferences. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Notifications"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"email":{"type":"object","propertyNames":{"enum":["share","workspace_share","mention","comment_reply","credits_low","credits_exhausted"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["organization_id","email"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"object","propertyNames":{"enum":["share","workspace_share","mention","comment_reply","credits_low","credits_exhausted"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["email"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["notifications:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/tools":{"get":{"operationId":"tools.list","summary":"List tools","description":"Lists the tools the caller can read.","tags":["Tools"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"can_manage_tools":{"type":"boolean"},"can_create_connectors":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"anyOf":[{"type":"number","minimum":-140737488355328,"maximum":140737488355327},{"type":"null"}]},"category":{"anyOf":[{"enum":["creative","marketing","research","analytics","meetings","productivity","communication","email","calendar","websites","sales","developer"],"type":"string"},{"type":"null"}]},"url":{"type":"string"},"transport":{"enum":["http","sse"],"type":"string"},"auth_kind":{"enum":["none","bearer","oauth"],"type":"string"},"call_kind":{"enum":["mcp","native"],"type":"string"},"scopes":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"client_env_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"catalog":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"catalog_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalog_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"shared_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","codename","organization_id","label","description","icon_url","position","category","url","transport","auth_kind","call_kind","scopes","client_env_prefix","published","visibility","catalog","catalog_fingerprint","catalog_at","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","state","can_edit","can_delete","created_by"]}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"copied_from_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"resources":{"type":"object","properties":{"scripts":{"type":"number"},"references":{"type":"number"},"assets":{"type":"number"}},"required":["scripts","references","assets"]},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"shared":{"type":"boolean"},"verified":{"type":"boolean"}},"required":["id","codename","organization_id","source","name","description","author","project_scoped","visibility","workspace_role","color","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","copied_from_skill_id","deleted_at","deleted_by_id","created_at","updated_at","resources","state","can_edit","can_delete","shared","verified"]}}},"required":["can_manage_tools","can_create_connectors","connectors","skills"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:read"]},{"clerkSession":[]}]}},"\/tools\/{tool_kind}\/{tool_id}":{"patch":{"operationId":"tools.set_state","summary":"Set tool state","description":"Set tool state. Scoped to the tool named by `tool_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Tools"],"parameters":[{"name":"tool_kind","in":"path","required":true,"schema":{"enum":["connector","skill"],"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"scope":{"enum":["workspace","user"],"type":"string"},"enabled":{"type":"boolean"},"user_id":{"type":"string","pattern":"^user_"}},"required":["organization_id","scope","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["governance:write"]},{"clerkSession":[]}]}},"\/documents\/{doc_id}\/access":{"get":{"operationId":"documents.get_access","summary":"Get document access","description":"Get document access. Scoped to the doc named by `doc_id`.","tags":["Documents"],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"kind":{"enum":["asset","project"],"type":"string"},"can_write":{"type":"boolean"}},"required":["kind","can_write"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["sharing:read"]},{"clerkSession":[]}]}},"\/projects":{"get":{"operationId":"projects.list","summary":"List projects","description":"Lists the projects the caller can read.","tags":["Projects"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"slug","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"can_archive":{"type":"boolean"},"can_leave":{"type":"boolean"},"shared":{"type":"boolean"},"people_count":{"type":"number"},"asset_count":{"type":"number"},"chat_count":{"type":"number"},"canvas_count":{"type":"number"},"skill_count":{"type":"number"},"people_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at","can_edit","can_delete","can_archive","can_leave","shared","people_count","asset_count","chat_count","canvas_count","skill_count","people_previews","created_by"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"post":{"operationId":"projects.create","summary":"Create project","description":"Creates a project and returns the created row.","tags":["Projects"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"title":{"type":"string","minLength":1,"maxLength":120},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"slug":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor","manager"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id","title"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]},"knowledge_skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","name","description","body","files"]}},"required":["project"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/projects\/accounts":{"get":{"operationId":"projects.accounts","summary":"List project accounts","description":"List project accounts.","tags":["Projects"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","minLength":1,"maxLength":40},"handle":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri"},"project_title":{"type":"string"}},"required":["platform","handle","project_title"],"additionalProperties":false}}},"required":["accounts"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]}},"\/projects\/{project_id}":{"get":{"operationId":"projects.get","summary":"Get project","description":"Returns a single project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"can_archive":{"type":"boolean"},"can_leave":{"type":"boolean"},"shared":{"type":"boolean"},"people_count":{"type":"number"},"asset_count":{"type":"number"},"chat_count":{"type":"number"},"canvas_count":{"type":"number"},"skill_count":{"type":"number"},"people_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at","can_edit","can_delete","can_archive","can_leave","shared","people_count","asset_count","chat_count","canvas_count","skill_count","people_previews","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"patch":{"operationId":"projects.update","summary":"Update project","description":"Updates a project and returns the updated row. Scoped to the project named by `project_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}},"required":["project"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]},"delete":{"operationId":"projects.delete","summary":"Delete project","description":"Deletes a project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/restore":{"post":{"operationId":"projects.restore","summary":"Restore project","description":"Restore project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/archive":{"post":{"operationId":"projects.archive","summary":"Archive project","description":"Archive project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/unarchive":{"post":{"operationId":"projects.unarchive","summary":"Unarchive project","description":"Unarchive project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/assets":{"get":{"operationId":"projects.assets.list","summary":"List project assets","description":"Lists the project assets the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"types","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"removable":{"type":"boolean"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","removable","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"post":{"operationId":"projects.assets.add","summary":"Add project asset","description":"Add project asset. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"}},"required":["asset_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/assets\/{asset_id}":{"delete":{"operationId":"projects.assets.remove","summary":"Remove project asset","description":"Deletes a project asset. Scoped to the project named by `project_id`, and the asset named by `asset_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/conversations":{"get":{"operationId":"projects.conversations.list","summary":"List project conversations","description":"Lists the project conversations the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"element_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","element_id","canvas_id","active_leaf_id","schedule_id","generation_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"post":{"operationId":"projects.conversations.add","summary":"Add project conversation","description":"Add project conversation. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid"},"share_history":{"const":true}},"required":["conversation_id","share_history"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/conversations\/{conversation_id}":{"delete":{"operationId":"projects.conversations.remove","summary":"Remove project conversation","description":"Deletes a project conversation. Scoped to the project named by `project_id`, and the conversation named by `conversation_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/canvases":{"get":{"operationId":"projects.canvases.list","summary":"List project canvases","description":"Lists the project canvases the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"post":{"operationId":"projects.canvases.add","summary":"Add project canvas","description":"Add project canvas. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"canvas_id":{"type":"string","format":"uuid"}},"required":["canvas_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/canvases\/{canvas_id}":{"delete":{"operationId":"projects.canvases.remove","summary":"Remove project canvas","description":"Deletes a project canvas. Scoped to the project named by `project_id`, and the canvas named by `canvas_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/skills":{"get":{"operationId":"projects.skills.list","summary":"List project skills","description":"Lists the project skills the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"source":{"enum":["built-in","custom","community"],"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"file_paths":{"type":"array","items":{"type":"string"}},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"is_knowledge":{"type":"boolean"}},"required":["id","name","description","source","author","created_by_id","project_scoped","created_at","updated_at","file_paths","can_edit","can_delete","is_knowledge"]}}},"required":["skills"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]},"post":{"operationId":"projects.skills.add","summary":"Add project skill","description":"Add project skill. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"skill_id":{"type":"string","format":"uuid"}},"required":["skill_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/projects\/{project_id}\/skills\/{skill_id}":{"delete":{"operationId":"projects.skills.remove","summary":"Remove project skill","description":"Deletes a project skill. Scoped to the project named by `project_id`, and the skill named by `skill_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:write"]},{"clerkSession":[]}]}},"\/assets\/{asset_id}\/projects":{"get":{"operationId":"projects.for_asset","summary":"List projects for asset","description":"List projects for asset. Scoped to the asset named by `asset_id`.","tags":["Projects"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"anyOf":[{"type":"object","properties":{"kind":{"enum":["chat","canvas"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title"]},{"type":"null"}]}},"required":["id","slug","title","emoji","via"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]}},"\/conversations\/{conversation_id}\/projects":{"get":{"operationId":"projects.for_chat","summary":"List projects for conversation","description":"List projects for conversation. Scoped to the conversation named by `conversation_id`.","tags":["Projects"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]}},"\/canvases\/{canvas_id}\/projects":{"get":{"operationId":"projects.for_canvas","summary":"List projects for canvas","description":"List projects for canvas. Scoped to the canvas named by `canvas_id`.","tags":["Projects"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]}},"\/skills\/{skill_id}\/projects":{"get":{"operationId":"projects.for_skill","summary":"List projects for skill","description":"List projects for skill. Scoped to the skill named by `skill_id`.","tags":["Projects"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["projects:read"]},{"clerkSession":[]}]}},"\/elements":{"get":{"operationId":"elements.list","summary":"List elements","description":"Lists the elements the caller can read.","tags":["Elements"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:read"]},{"clerkSession":[]}]},"post":{"operationId":"elements.create","summary":"Create element","description":"Creates an element and returns the created row.","tags":["Elements"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"prompting":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"asset_ids":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}},"project_id":{"type":"string","format":"uuid"}},"required":["organization_id","name","asset_ids","project_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/elements\/{element_id}":{"get":{"operationId":"elements.get","summary":"Get element","description":"Returns a single element. Scoped to the element named by `element_id`.","tags":["Elements"],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-7c25-7d13-9f52-3e6a1b0d4c28"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:read"]},{"clerkSession":[]}]},"patch":{"operationId":"elements.update","summary":"Update element","description":"Updates an element and returns the updated row. Scoped to the element named by `element_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Elements"],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-7c25-7d13-9f52-3e6a1b0d4c28"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"prompting":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:write"]},{"clerkSession":[]}]},"delete":{"operationId":"elements.delete","summary":"Delete element","description":"Deletes an element. Scoped to the element named by `element_id`.","tags":["Elements"],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-7c25-7d13-9f52-3e6a1b0d4c28"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:write"]},{"clerkSession":[]}]}},"\/elements\/{element_id}\/assets":{"post":{"operationId":"elements.assets.add","summary":"Add element asset","description":"Add element asset. Scoped to the element named by `element_id`.","tags":["Elements"],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-7c25-7d13-9f52-3e6a1b0d4c28"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"asset_ids":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}}},"required":["asset_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:write"]},{"clerkSession":[]}]}},"\/elements\/{element_id}\/assets\/{asset_id}":{"delete":{"operationId":"elements.assets.remove","summary":"Remove element asset","description":"Deletes an element asset. Scoped to the element named by `element_id`, and the asset named by `asset_id`.","tags":["Elements"],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-7c25-7d13-9f52-3e6a1b0d4c28"},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"created_by_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"object_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","manager","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"uploaded_from":{"anyOf":[{"enum":["library","chat","canvas","generate","project","element","voice","onboarding","mcp","api"],"type":"string"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"position":{"type":"number"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","object_key","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","uploaded_from","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","position"]}},"prompting":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","project_id","created_by_id","name","handle","description","knowledge_skill_id","deleted_at","deleted_by_id","created_at","updated_at","project","assets","prompting","can_edit","can_delete","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["elements:write"]},{"clerkSession":[]}]}},"\/models\/public":{"get":{"operationId":"models.public_list","summary":"Public model list","description":"Public model list.","tags":["Models"],"parameters":[{"name":"language","in":"query","schema":{"enum":["en","es","pt","de","fr"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"codename":{"type":"string"},"name":{"type":"string"},"maker":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"enum":["google","openai","anthropic","elevenlabs","blackforestlabs","minimax","bytedance","kuaishou","recraft","alibaba","xai","spacexai","zai","mistral","deepseek","typesafeai","moonshotai","krea","ideogram","lightricks","pixverse","pruna","veed","imagineart","clarity","reve","firered","meta","topaz","mirelo","nvidia","reflection","humansand","tencent","xiaomi","meituan","inclusionai","particle","thinkingmachines","paperinstruments","heygen","endless"],"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"enum":["chat","image","video","audio","3d"],"type":"string"},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"anyOf":[{"type":"object","properties":{"per":{"enum":["image","video","audio","3d"],"type":"string"},"credits":{"type":"number","minimum":0},"from":{"type":"boolean"}},"required":["per","credits","from"]},{"type":"object","properties":{"per":{"const":"tokens"},"input":{"type":"number","minimum":0},"output":{"type":"number","minimum":0}},"required":["per","input","output"]}]},{"type":"null"}]},"added_at":{"type":"string"},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"copy":{"anyOf":[{"type":"object","properties":{"tagline":{"type":"string","minLength":1,"maxLength":90},"summary":{"type":"string","minLength":1,"maxLength":155},"about":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"string","minLength":1}},"best_for":{"type":"array","maxItems":6,"items":{"type":"string","minLength":1,"maxLength":120}},"specs":{"type":"array","maxItems":8,"items":{"type":"object","properties":{"key":{"enum":["context_window","max_output","inputs","outputs","resolution","duration","references","audio","languages","editing"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":80}},"required":["key","value"]}},"faq":{"type":"array","maxItems":6,"items":{"type":"object","properties":{"q":{"type":"string","minLength":1},"a":{"type":"string","minLength":1}},"required":["q","a"]}}},"required":["tagline","summary","about","best_for","specs","faq"]},{"type":"null"}],"default":null},"copy_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"replaces":{"type":"array","items":{"type":"string"}}},"required":["codename","name","maker","description","kind","minimum_required_plan","price","added_at"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/models\/run-estimates":{"get":{"operationId":"models.run_estimates","summary":"Run model estimates","description":"Run model estimates.","tags":["Models"],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"media_model_id":{"type":"string","format":"uuid"},"p50_sec":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"p90_sec":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["media_model_id","p50_sec","p90_sec"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/models\/run-estimates\/params":{"get":{"operationId":"models.run_estimates_by_params","summary":"Run model estimates by params","description":"Run model estimates by params.","tags":["Models"],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object","properties":{"media_model_variant_id":{"type":"string","format":"uuid"},"resolution":{"type":"string"},"duration_bucket":{"type":"integer","minimum":0,"maximum":9007199254740991},"p50_sec":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"p90_sec":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["media_model_variant_id","resolution","duration_bucket","p50_sec","p90_sec"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["models:read"]},{"clerkSession":[]}]}},"\/search":{"post":{"operationId":"search.web","summary":"Search the web","description":"Ranked web results for a query through Exa \u2014 title, URL, a short snippet and the captioned photos found on each page. Charged as one flat call; a filtered search that returns nothing is retried once without its filters at no extra charge. A search scoped to a social platform is refused (400) with the social operations that read it.","tags":["Search"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"query":{"type":"string","minLength":1,"description":"The search query, phrased as you'd type it into a search engine. For pictures, search the subject together with its qualifier in the language the sources use; appending 'photos' only ranks stock libraries."},"num_results":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"How many results to return (max 10)."},"category":{"enum":["publication","news","personal site","financial report"],"type":"string","description":"Optional focus area \u2014 narrows results to one content type, so only set it when the query targets that exact type: 'news' for recent articles, 'publication' for academic work, 'financial report' for filings, 'personal site' for blogs. Leave it UNSET for how-tos, documentation, support articles, or general questions \u2014 a category will miss those and return nothing."},"time_range":{"enum":["day","week","month","year"],"type":"string","description":"Only return pages published within this window back from today."},"include_domains":{"type":"array","items":{"type":"string"},"description":"Restrict results to these domains (e.g. ['nasa.gov'])."},"exclude_domains":{"type":"array","items":{"type":"string"},"description":"Drop results from these domains."}},"required":["organization_id","query"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"published_date":{"type":"string"},"author":{"type":"string"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"caption":{"type":"string"}},"required":["url"]}},"snippet":{"type":"string"}},"required":["title","url"]}},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["summary","results","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["search:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/search\/operations":{"get":{"operationId":"search.operations","summary":"List the search operations","description":"The web search operations with their descriptions and input JSON Schemas, and the flat price of one call in whole credits.","tags":["Search"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"credits_per_call":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits one `web_search` or `read_url` call is charged, whatever it returns."},"operations":{"type":"array","items":{"type":"object","properties":{"name":{"enum":["web_search","read_url"],"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","description","input_schema"]}}},"required":["credits_per_call","operations"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["search:query"]},{"clerkSession":[]}]}},"\/read-url":{"post":{"operationId":"search.read_url","summary":"Read web pages","description":"The full text of up to ten known URLs through Exa, each capped at 200,000 characters, with a short preview. Charged as one flat call. A social platform URL is refused (400) with the social operations that read it.","tags":["Search"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"urls":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","format":"uri"},"description":"The URLs to read (max 10)."}},"required":["organization_id","urls"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"type":"string"}},"required":["url","title","text","chars","preview"]}},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["summary","pages","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["search:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/operations":{"get":{"operationId":"social.operations","summary":"List social operations","description":"The social operations this workspace can run: each one's name, network, description and the JSON Schema of its input and output. Call one with `POST \/social\/{operation}`.","tags":["Social"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"name":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"network":{"enum":["instagram","x","tiktok","youtube","facebook","linkedin","reddit","threads","meta_ads","google","pinterest"],"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","description","input_schema","output_schema"]}}},"required":["operations"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:read"]},{"clerkSession":[]}]}},"\/social\/trends":{"get":{"operationId":"social.trends","summary":"Get trending topics","description":"What's trending on X for a location \u2014 the Radar feed. Requires the Radar feature; not charged.","tags":["Social"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"woeid","in":"query","required":false,"schema":{"type":"number","description":"Yahoo WOEID of the location. Omitted: the caller's country, else worldwide."},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}}},"required":["woeid","trends"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:read"]},{"clerkSession":[]}]}},"\/social\/trends\/public\/{region}":{"get":{"operationId":"social.public_trends","summary":"Get public trending topics","description":"What's trending on X in a country, read from snapshots taken every few hours, with the last 24 hours of history. Public, no authentication.","tags":["Social"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"enum":["worldwide","argentina","brazil","canada","chile","colombia","dominican-republic","ecuador","guatemala","mexico","panama","peru","puerto-rico","united-states","venezuela","austria","belarus","belgium","denmark","france","germany","greece","ireland","italy","latvia","netherlands","norway","poland","portugal","russia","spain","sweden","switzerland","turkey","ukraine","united-kingdom","india","indonesia","japan","malaysia","pakistan","philippines","singapore","south-korea","thailand","vietnam","bahrain","israel","jordan","kuwait","lebanon","oman","qatar","saudi-arabia","united-arab-emirates","algeria","egypt","ghana","kenya","nigeria","south-africa","australia","new-zealand"],"type":"string","description":"Region slug, e.g. `argentina` or `worldwide`."}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"region":{"type":"string"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}},"timeline":{"type":"array","items":{"type":"object","properties":{"captured_at":{"type":"string"},"names":{"type":"array","items":{"type":"string"}}},"required":["captured_at","names"]}},"longest":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"snapshots":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","snapshots"]}}},"required":["region","captured_at","trends","timeline","longest"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}]}},"\/social\/tiktok-trends\/public\/{region}":{"get":{"operationId":"social.public_tiktok_trends","summary":"Get public trending TikTok videos","description":"The most played local videos in a country's TikTok trending feed over the last 24 hours, read from snapshots taken every few hours. Public, no authentication.","tags":["Social"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"enum":["argentina","brazil","canada","chile","colombia","dominican-republic","egypt","indonesia","japan","malaysia","mexico","peru","philippines","saudi-arabia","thailand","turkey","united-kingdom","united-states","venezuela","vietnam"],"type":"string","description":"Country slug, e.g. `argentina`."}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"region":{"type":"string"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"cover_url":{"type":"string"}}}},"longest":{"type":"array","items":{"type":"object","properties":{"video":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"cover_url":{"type":"string"}}},"snapshots":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["video","snapshots"]}},"sounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"video_count":{"type":"number"},"creators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"original":{"type":"boolean"}},"required":["id","creators","original"]}},"hashtags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"creators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","creators"]}}},"required":["region","captured_at","videos","longest","sounds","hashtags"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}]}},"\/social\/{operation}\/quote":{"post":{"operationId":"social.quote","summary":"Quote a social operation","description":"The most requests and credits a call with this input can cost. Nothing runs and nothing is charged; the same call is never charged more than this.","tags":["Social"],"parameters":[{"name":"operation","in":"path","required":true,"schema":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"example":"x_search"},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{},"description":"The operation's input, validated against its own schema."}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"max_requests":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Most billable upstream requests this call can make."},"max_credits":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Most whole credits this call can be charged. The same call is never charged more."}},"required":["operation","max_requests","max_credits"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:read"]},{"clerkSession":[]}]}},"\/social\/instagram_profile":{"post":{"operationId":"social.instagram_profile","summary":"Instagram profile","description":"Look up an Instagram profile by @username. Use whenever the user asks about follower counts, bio, verification, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_user_posts":{"post":{"operationId":"social.instagram_user_posts","summary":"Instagram user posts","description":"Use when the user asks for top\/most-liked\/most-viewed\/most-commented posts (e.g. 'top post of the week'). Returns recent Instagram posts (newest first) with engagement counts; sort and filter by `taken_at` (Unix seconds). For a VIDEO or date-range question prefer `instagram_user_reels`, which pages back more reliably; use this one for photos and carousels or a mixed feed. Also read this BEFORE writing copy in an account's voice: `caption_text` carries the voice and the engagement counts carry what actually landed, so the default `limit` of 12 is usually enough, and one read per account per conversation covers a whole thread of revisions. If a date window you chose returns no items, retry once without date filters before drafting; preserve any source period the user requested. If results are still empty or thin, say so \u2014 don't fall back to `web_search` and write from the open web, which is what produces the generic voice an account rejects.\n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":12,"description":"How many recent posts to return (max 100). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","user_id","coverage","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_user_reels":{"post":{"operationId":"social.instagram_user_reels","summary":"Instagram user reels","description":"Get an Instagram account's reels with view counts (`play_count`), likes and comments. Prefer this over `instagram_user_posts` for ANY question about video performance or covering a date range: it is the only Instagram feed that pages back reliably AND carries a true view count on every item. It sees ONLY reels \u2014 for photos and carousels use `instagram_user_posts`. If a date window you chose returns no items, retry once without date filters before drafting; preserve any source period the user requested.\n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":24,"description":"How many reels to return (max 200). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","user_id","coverage","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_user_stories":{"post":{"operationId":"social.instagram_user_stories","summary":"Instagram user stories","description":"Fetch an account's currently active Instagram stories (the last 24h) by @username. Stories expire after 24h and engagement on third-party accounts is private, so results carry timing and content (pass `image_url` to `analyze_image`), not like\/view counts.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"taken_at":{"type":"number"},"expiring_at":{"type":"number"},"media_type":{"type":"number"},"video_duration":{"type":"number"},"caption_text":{"type":"string"},"image_url":{"type":"string"}}}}},"required":["summary","username","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_user_highlights":{"post":{"operationId":"social.instagram_user_highlights","summary":"Instagram user highlights","description":"List an account's Instagram highlights (the permanent story collections pinned on the profile) by @username. Returns each highlight's id (`pk`), title, story count, and cover image; fetch the stories inside one with `instagram_highlight_stories`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"media_count":{"type":"number"},"created_at":{"type":"number"},"cover_url":{"type":"string"}}}}},"required":["summary","username","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_highlight_stories":{"post":{"operationId":"social.instagram_highlight_stories","summary":"Instagram highlight stories","description":"Fetch the stories inside one Instagram highlight by its id (the `pk` from `instagram_user_highlights`). Highlight stories don't expire, but engagement on third-party accounts is private, so results carry timing and content (pass `image_url` to `analyze_image`), not like\/view counts.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"highlight_id":{"type":"string","minLength":1,"description":"Highlight id \u2014 the `pk` from `instagram_user_highlights` (numeric string; `highlight:<pk>` also accepted)"}},"required":["highlight_id"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"highlight_id":{"type":"string"},"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"taken_at":{"type":"number"},"expiring_at":{"type":"number"},"media_type":{"type":"number"},"video_duration":{"type":"number"},"caption_text":{"type":"string"},"image_url":{"type":"string"}}}}},"required":["summary","highlight_id","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_post":{"post":{"operationId":"social.instagram_post","summary":"Instagram post","description":"Fetch a single Instagram post by URL. Returns engagement metrics (likes, comments, plays\/views), caption, and the author.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Instagram post URL (https:\/\/www.instagram.com\/p\/...)"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","description":"One-line result, for the reader."},"video_url":{"type":"string","description":"The video's mp4 (reels and videos only). Pass to `analyze_video` to see what it shows; signed, expires."},"author":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"}}}},"required":["summary","author"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_post_comments":{"post":{"operationId":"social.instagram_post_comments","summary":"Instagram post comments","description":"Get the comments on an Instagram post by URL, newest pages first, up to `limit`. Use when the user asks about comments, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Instagram post URL (https:\/\/www.instagram.com\/p\/...)"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"media_id":{"type":"string"},"truncated":{"type":"boolean"},"comments":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"created_at":{"type":"number"},"like_count":{"type":"number"},"text":{"type":"string"},"user":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"}}}},"required":["user"]}}},"required":["summary","media_id","truncated","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_search":{"post":{"operationId":"social.instagram_search","summary":"Instagram search","description":"Search Instagram posts by keyword, mostly reels plus some photos and carousels \u2014 what people, not just the official account, are posting about an event, brand, person or topic. Results are ranked by relevance, not date, and match captions and hashtags: a post whose caption never names the term won't appear. For social listening, run a few queries (the event name, the official @account, the featured people together with the event) and read the official account's own feed with `instagram_user_reels`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text; a #hashtag also works as a keyword."},"max_items":{"type":"integer","minimum":1,"maximum":60,"default":24,"description":"Maximum posts to return (paginated upstream, max 60)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"string","description":"The poster's @handle."}}}}},"required":["summary","query","count","truncated","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/instagram_hashtag_posts":{"post":{"operationId":"social.instagram_hashtag_posts","summary":"Instagram hashtag posts","description":"Get an Instagram hashtag's top posts \u2014 photos, carousels and reels. Instagram's own ranking, not chronological, and it mixes in years-old posts and unrelated uses of the same tag: check each post's `taken_at` and caption before counting it. For reels about a topic, `instagram_search` is more on-topic.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"hashtag":{"type":"string","minLength":1,"description":"Hashtag name, with or without the leading #."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many posts to return (max 90)."}},"required":["hashtag"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"hashtag":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"string","description":"The poster's @handle."}}}}},"required":["summary","hashtag","count","truncated","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_profile":{"post":{"operationId":"social.tiktok_profile","summary":"TikTok profile","description":"Look up a TikTok profile by @username. Use whenever the user asks about follower counts, bio, verification, total likes, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"TikTok handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"sec_uid":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"url":{"type":"string"},"bio":{"type":"string"},"verified":{"type":"boolean"},"private":{"type":"boolean"},"region":{"type":"string"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"like_count":{"type":"number"},"video_count":{"type":"number"},"image_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_user_posts":{"post":{"operationId":"social.tiktok_user_posts","summary":"TikTok user posts","description":"Get a TikTok account's videos with engagement counts (plays, likes, comments, shares, saves), hashtags, and the sound each video uses (`music.id` feeds `tiktok_music_posts`). For a date range, pass `since` and the walk pages back until it reaches that date \u2014 do NOT try to cover a range with a big `max_items`.\n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For comparing several accounts at once, prefer `tiktok_trend_scan`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"TikTok handle, without the leading @"},"max_items":{"type":"integer","minimum":1,"maximum":70,"default":30,"description":"How many posts to return (max 70). Ignored when `since` is set."},"sort":{"enum":["recent","popular"],"type":"string","default":"recent","description":"'recent' = newest first (monitoring); 'popular' = the account's top videos."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"sort":{"enum":["recent","popular"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","sort","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_post":{"post":{"operationId":"social.tiktok_post","summary":"TikTok post","description":"Fetch a single TikTok video by URL (or bare video id). Returns engagement metrics (plays, likes, comments, shares, saves), the caption, hashtags, the author, the sound it uses (`music.id` feeds `tiktok_music_posts`), and a direct `video_url` (TikTok refuses every download of it, so it CANNOT be analyzed \u2014 describe the video from the caption and metrics, or ask the user to upload the file). Call this directly for any tiktok.com video URL \u2014 those pages are client-rendered, so `read_url`\/`web_search` won't load them.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full TikTok video URL (https:\/\/www.tiktok.com\/@user\/video\/123...) or the bare numeric video id."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","description":"One-line result, for the reader."},"video_url":{"type":"string"}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_post_comments":{"post":{"operationId":"social.tiktok_post_comments","summary":"TikTok post comments","description":"Get the comments on a TikTok video by URL (or bare video id). Use when the user asks about comments, reactions, or sentiment on a specific video.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full TikTok video URL (https:\/\/www.tiktok.com\/@user\/video\/123...) or the bare numeric video id."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"video_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"comment_id":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"}}}},"required":["author"]}}},"required":["summary","video_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_search":{"post":{"operationId":"social.tiktok_search","summary":"TikTok search","description":"Search TikTok for public videos (or accounts) by topic, keyword, or hashtag. Use for trend analysis, monitoring conversations, or finding which videos\/creators are active on a theme. Use `tiktok_user_posts` for one account's own feed and `tiktok_hashtag_posts` when the query is exactly one hashtag.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text."},"type":{"enum":["videos","accounts"],"type":"string","default":"videos","description":"'videos' = matching videos (default); 'accounts' = matching creator accounts (e.g. to build a monitoring list)."},"region":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Two-letter country code to geo-scope video results to that market (e.g. AR, MX, BR). Videos only; each result carries its own `region`."},"max_items":{"type":"integer","minimum":1,"maximum":60,"default":20,"description":"Maximum results to return (paginated upstream, max 60)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"type":{"enum":["videos","accounts"],"type":"string"},"region":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"url":{"type":"string"},"bio":{"type":"string"},"follower_count":{"type":"number"},"verified":{"type":"boolean"}}}}},"required":["summary","query","type","count"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_hashtag_posts":{"post":{"operationId":"social.tiktok_hashtag_posts","summary":"TikTok hashtag posts","description":"Get a TikTok hashtag's stats (total videos, total views) plus its current videos. Use to size a hashtag trend and see what's being posted under it; compare each post's `created_at` to spot when the trend started accelerating.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"hashtag":{"type":"string","minLength":1,"description":"Hashtag name, with or without the leading #."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many videos to return (max 90)."}},"required":["hashtag"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"hashtag":{"type":"string"},"hashtag_id":{"type":"string"},"description":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","hashtag","hashtag_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_music_posts":{"post":{"operationId":"social.tiktok_music_posts","summary":"TikTok music posts","description":"Get the TikTok videos that use one sound\/music, plus the sound's total video count \u2014 the fastest way to confirm an audio trend. TikTok-only \u2014 the other platforms have no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"music":{"type":"string","minLength":1,"description":"Music id (the `music.id` from another TikTok tool's result) or a tiktok.com\/music\/... URL."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many videos to return (max 90)."}},"required":["music"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"music_id":{"type":"string"},"title":{"type":"string"},"music_author":{"type":"string"},"original":{"type":"boolean"},"video_count":{"type":"number"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","music_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_trending":{"post":{"operationId":"social.tiktok_trending","summary":"TikTok trending","description":"TikTok trend charts: 'videos' = a country's live trending feed (full videos with engagement, sound, and hashtags); 'hashtags' = a country's top 3 hashtags this week, optionally in one `industry`; 'viral_songs' = the US Viral 50 sound chart; 'songs' = commercial sounds ranked by use, the ones brand accounts may use (sounds carry a `music_id` for `tiktok_music_posts`); 'ads' = Creative Center's top ad creatives by country and period. For trends over specific accounts\/hashtags\/topics, use `tiktok_trend_scan`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"category":{"enum":["videos","hashtags","viral_songs","songs","ads"],"type":"string","description":"'videos', 'hashtags' and 'ads' are per country."},"country":{"type":"string","pattern":"^[A-Za-z]{2}$","default":"US","description":"Two-letter country code (e.g. US, MX, BR, AR) for videos\/hashtags\/ads."},"industry":{"enum":["apparel_accessories","baby_kids_maternity","beauty_personal_care","education","food_beverage","games","health","home_improvement","household_products","news_entertainment","pets","sports_outdoor","tech_electronics","travel","vehicle_transportation"],"type":"string","description":"Hashtags only. Omit for all industries."},"period":{"enum":["7","30","180"],"type":"string","default":"7","description":"Ads only: trailing window in days ('7', '30', or '180')."},"sort":{"enum":["like","ctr","impression","cvr"],"type":"string","default":"like","description":"Ads only: rank by 'like' (engagement, default), 'ctr', 'impression' (reach), or 'cvr'."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"How many entries to return (max 20)."}},"required":["category"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"category":{"enum":["videos","hashtags","viral_songs","songs","ads"],"type":"string"},"country":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}},{"type":"object","properties":{"hashtag":{"type":"string"},"rank":{"type":"number"},"post_count":{"type":"number"},"view_count":{"type":"number"},"top_creators":{"type":"array","items":{"type":"string"}},"url":{"type":"string"}},"required":["hashtag","url"]},{"type":"object","properties":{"music_id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"duration_seconds":{"type":"number"},"video_count":{"type":"number"},"image_url":{"type":"string"}}},{"type":"object","properties":{"ad_id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"string"},"like_count":{"type":"number"},"ctr":{"type":"number"},"industry":{"type":"string"},"objective":{"type":"string"},"duration_seconds":{"type":"number"},"image_url":{"type":"string"}}}]}}},"required":["summary","category","count","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/tiktok_trend_scan":{"post":{"operationId":"social.tiktok_trend_scan","summary":"TikTok trend scan","description":"Use whenever the user asks what's trending on TikTok \u2014 for a country, city, niche, or set of accounts. Scans recent videos from one source (a `region`'s trending feed, a list of `usernames`, a `hashtag`, or a `keyword`) and returns ranked clusters of videos sharing a sound or hashtag, each with distinct-account count (the trend signal), video count, plays, time span, and example URLs. Answers the question from TikTok's own data, so prefer it over web search. Drill into a cluster with `tiktok_music_posts` or `tiktok_hashtag_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"region":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Two-letter country code. Alone = scan that country's trending feed (the direct answer to 'what's trending in <country>'); with `keyword` = geo-scope the keyword scan."},"usernames":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1},"description":"Up to 10 TikTok handles (without @) to scan \u2014 e.g. a curated monitoring list. For a bigger list, call in batches and compare."},"hashtag":{"type":"string","minLength":1,"description":"Scan a hashtag's current videos instead (with or without #)."},"keyword":{"type":"string","minLength":1,"description":"Scan video search results for a topic instead."},"max_posts":{"type":"integer","minimum":20,"maximum":120,"default":60,"description":"How many videos to scan across the source (max 120)."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"source":{"type":"string"},"scanned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sounds":{"type":"array","items":{"type":"object","properties":{"music_id":{"type":"string"},"title":{"type":"string"},"music_author":{"type":"string"},"original":{"type":"boolean"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newest_at":{"type":"string"},"oldest_at":{"type":"string"},"total_plays":{"type":"number"},"examples":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"username":{"type":"string"},"created_at":{"type":"string"},"play_count":{"type":"number"}}}}},"required":["music_id","videos","accounts","total_plays","examples"]}},"hashtags":{"type":"array","items":{"type":"object","properties":{"hashtag":{"type":"string"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newest_at":{"type":"string"}},"required":["hashtag","videos","accounts"]}},"categories":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["category","videos","accounts"]}}},"required":["summary","source","scanned","sounds","hashtags","categories"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_profile":{"post":{"operationId":"social.linkedin_profile","summary":"LinkedIn profile","description":"Look up a LinkedIn PERSON profile by public handle. Returns headline, location, follower and connection counts, and open-to-work\/hiring status. Use for professional background or audience-size questions about an individual. Route by URL shape: `linkedin.com\/in\/<slug>` is a person (use this) \u2014 `linkedin.com\/company\/<slug>` is a company (use `linkedin_company`). Pass the bare slug or the full `\/in\/` URL.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"LinkedIn person handle \u2014 the vanity slug from a `linkedin.com\/in\/<slug>` URL (a full `\/in\/\u2026` URL is accepted too). For a company page (`linkedin.com\/company\/<slug>`) use `linkedin_company` instead."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"url":{"type":"string"},"username":{"type":"string"},"urn":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string"},"location":{"type":"string"},"followers":{"type":"number"},"connections":{"type":"number"},"is_open_to_work":{"type":"boolean"},"is_hiring":{"type":"boolean"},"current_company":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"}}},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_company":{"post":{"operationId":"social.linkedin_company","summary":"LinkedIn company","description":"Look up a LinkedIn COMPANY page by its handle (the slug in linkedin.com\/company\/<handle>). Returns description, industries, website, follower count, headcount, and headquarters. Use for competitor\/brand research. Route by URL shape: `linkedin.com\/company\/<slug>` (and `\/school\/<slug>`) is a company (use this) \u2014 `linkedin.com\/in\/<slug>` is a person (use `linkedin_profile`). Pass the bare slug or the full `\/company\/` URL.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"company":{"type":"string","minLength":1,"description":"Company handle, e.g. 'google' from linkedin.com\/company\/google (a full `\/company\/\u2026` or `\/school\/\u2026` URL is accepted too)."}},"required":["company"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"description":{"type":"string"},"website":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"followers":{"type":"number"},"employee_count":{"type":"number"},"headquarter":{"type":"string"},"logo_url":{"type":"string"},"cover_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_user_posts":{"post":{"operationId":"social.linkedin_user_posts","summary":"LinkedIn user posts","description":"Get a LinkedIn person's recent posts (newest first) with reaction, comment, and repost counts. Use when the user asks what someone has been posting or for their top\/most-engaged content (sort client-side). For a company's posts use `linkedin_company_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"LinkedIn person handle \u2014 the vanity slug from a `linkedin.com\/in\/<slug>` URL (a full `\/in\/\u2026` URL is accepted too). For a company page (`linkedin.com\/company\/<slug>`) use `linkedin_company` instead."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","username","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_company_posts":{"post":{"operationId":"social.linkedin_company_posts","summary":"LinkedIn company posts","description":"Get a LinkedIn company page's recent posts with engagement counts. Use for brand\/competitor content monitoring. For a person use `linkedin_user_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"company":{"type":"string","minLength":1,"description":"Company handle, e.g. 'microsoft' from linkedin.com\/company\/microsoft (a full `\/company\/\u2026` URL is accepted too). For a person's posts use `linkedin_user_posts`."},"sort_by":{"enum":["top","recent"],"type":"string","default":"top","description":"'top' for most-engaged, 'recent' for newest first."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["company"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"company":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","company","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_post":{"post":{"operationId":"social.linkedin_post","summary":"LinkedIn post","description":"Fetch a single LinkedIn post by URL, with its top comments. Returns the full text, reaction\/comment\/repost counts, and the author. Use when the user shares a post link or asks about reactions on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full LinkedIn post URL (e.g. ...\/feed\/update\/urn:li:activity:12345) or the activity id."},"comment_limit":{"type":"integer","minimum":0,"maximum":50,"default":20,"description":"How many comments to include (0 to skip; max 50)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}},"summary":{"type":"string","description":"One-line result, for the reader."},"comments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"posted_at":{"type":"string"},"reaction_count":{"type":"number"},"reply_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_search_people":{"post":{"operationId":"social.linkedin_search_people","summary":"LinkedIn search people","description":"Search LinkedIn for people by name, optionally narrowed by job title. Returns profiles with name, headline\/title, location, and a canonical profile URL. Use for prospecting, finding decision-makers, or resolving a person to their handle. For people in a role at a company, pass the company as `name` and the role as `title`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Full or display name to search for, e.g. 'Bill Gates'."},"title":{"type":"string","description":"Optional job-title\/headline filter, e.g. 'head of marketing'."},"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1,"description":"Result page (1-based)."},"max_items":{"type":"integer","minimum":1,"maximum":10,"default":10,"description":"How many people to return (one page, max 10)."}},"required":["name"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"name":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"location":{"type":"string"}}}}},"required":["summary","name","count","people"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_search_posts":{"post":{"operationId":"social.linkedin_search_posts","summary":"LinkedIn search posts","description":"Search LinkedIn for public posts about a topic, brand, or keyword. Use for tracking conversation and professional sentiment. Set `sort_by:'date_posted'` plus `date_posted` for recency-first monitoring. For one account's own posts use the `*_posts` tools.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"description":"The search query, e.g. a brand, product, or topic."},"sort_by":{"enum":["relevance","date_posted"],"type":"string","default":"relevance","description":"'relevance' for best matches, 'date_posted' for the most recent."},"date_posted":{"enum":["any","past_24h","past_week","past_month"],"type":"string","description":"Restrict to posts from the last 24h, week, or month. 'any' (the default) applies no date filter \u2014 use it unless the user bounded the period."},"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1,"description":"Result page (1-based)."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["keyword"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"keyword":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","keyword","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/linkedin_ads":{"post":{"operationId":"social.linkedin_ads","summary":"LinkedIn ads","description":"The ads in LinkedIn's Ad Library: by advertiser (`company`, its name, or `company_id`, the number in its linkedin.com\/company\/<id> URL) or by `keyword` in the ad copy. Returns headline, copy, format, call to action, landing link, creative, run dates and LinkedIn's impression bucket. A company name can match other advertisers with a similar name, so check `advertiser` before attributing an ad. Cite each ad's `url`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"company":{"type":"string","minLength":1,"description":"Advertiser name, e.g. 'ElevenLabs'."},"company_id":{"type":"string","pattern":"^\\d+$","description":"The advertiser's numeric LinkedIn company id \u2014 exact, unlike a name."},"keyword":{"type":"string","minLength":1,"description":"Words in the ad copy, across advertisers."},"countries":{"type":"array","maxItems":10,"items":{"type":"string","minLength":2,"maxLength":2},"description":"Two-letter codes of countries the ads ran in (US, GB). Omit for all."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only ads that ran from this date on (YYYY-MM-DD)."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only ads that ran up to this date (YYYY-MM-DD), before today."},"max_items":{"type":"integer","minimum":1,"maximum":72,"default":24,"description":"How many ads to return (24 a page, max 72). Each page is billed."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"advertiser":{"type":"string"},"advertiser_url":{"type":"string"},"paid_for_by":{"type":"string"},"headline":{"type":"string"},"text":{"type":"string"},"ad_type":{"type":"string"},"cta":{"type":"string"},"landing_url":{"type":"string"},"image_url":{"type":"string"},"video_url":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":"string"},"impressions":{"type":"string"},"impressions_by_country":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"share":{"type":"string"}},"required":["country","share"]}}}}}},"required":["summary","count","ads"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_channel":{"post":{"operationId":"social.youtube_channel","summary":"YouTube channel","description":"Look up a YouTube channel by handle, URL, or id. Returns title, description, subscriber\/video\/view counts, country, and links. Use for creator\/brand background or audience-size questions. For the channel's uploads use `youtube_channel_videos`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC\u2026)."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"subscribers":{"type":"number"},"subscribers_text":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"country":{"type":"string"},"joined_date":{"type":"string"},"is_live":{"type":"boolean"},"avatar":{"type":"string"},"banner":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_channel_videos":{"post":{"operationId":"social.youtube_channel_videos","summary":"YouTube channel videos","description":"Get a channel's long-form uploads with view counts, length, and publish dates. Use when asked what a channel has posted or for its top\/most-viewed videos (`sort_by:'popular'`). For a date range pass `since`: the listing cards are sparse, so each video is then fetched individually to get its date and counts \u2014 accurate, but one call per video, so keep the window tight. Pair `since` with `until` and the tool returns a `totals` block computed over exactly that window \u2014 quote it, never add up the rows yourself. Read `coverage` before reporting totals. For Shorts use `youtube_channel_shorts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC\u2026)."},"sort_by":{"enum":["newest","popular","oldest"],"type":"string","default":"newest","description":"'newest' first, 'popular' for most-viewed, or 'oldest'."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."},"with_comments":{"type":"boolean","default":false,"description":"Fetch each video's exact comment count. Off by default because it DOUBLES the requests (one extra call per video) \u2014 turn it on only when the answer needs comment totals or engagement including comments. Left off, comment counts come back absent, and totals report them as not measured rather than as zero."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","channel","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_channel_playlists":{"post":{"operationId":"social.youtube_channel_playlists","summary":"YouTube channel playlists","description":"Get a channel's playlists (title, video count, thumbnail). Use to understand how a channel organizes its content into series\/collections.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC\u2026)."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"video_count":{"type":"number"},"thumbnail":{"type":"string"}}}}},"required":["summary","channel","count","playlists"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_channel_shorts":{"post":{"operationId":"social.youtube_channel_shorts","summary":"YouTube channel shorts","description":"Get a channel's Shorts (short-form vertical videos), separate from its long-form uploads. Use for short-form strategy questions. Shorts cards carry ONLY a view-count string \u2014 no date, likes or comments \u2014 so a date range or any totals means fetching each Short individually, one call each. Comment counts need `with_comments` (a second call per video); without it they come back absent, NOT zero. \n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For regular videos use `youtube_channel_videos`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC\u2026)."},"sort_by":{"enum":["newest","popular","oldest"],"type":"string","default":"newest","description":"'newest' first, 'popular' for most-viewed, or 'oldest'."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."},"with_comments":{"type":"boolean","default":false,"description":"Fetch each video's exact comment count. Off by default because it DOUBLES the requests (one extra call per video) \u2014 turn it on only when the answer needs comment totals or engagement including comments. Left off, comment counts come back absent, and totals report them as not measured rather than as zero."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","channel","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_video":{"post":{"operationId":"social.youtube_video","summary":"YouTube video","description":"Fetch a single YouTube video by URL or id, with its top comments. Returns title, channel, view\/like\/comment counts, length, and publish date. Use when the user shares a video link or asks about a specific video's engagement. To transcribe a video, use `create_transcript` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full YouTube video URL (watch, youtu.be, or \/shorts\/) or the 11-char video id."},"comment_limit":{"type":"integer","minimum":0,"maximum":50,"default":10,"description":"How many top comments to include (0 to skip; max 50)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."},"comments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"author":{"type":"string"},"likes":{"type":"string"},"reply_count":{"type":"number"},"published_at":{"type":"string"},"is_verified":{"type":"boolean"}}}}},"required":["channel","summary","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_search":{"post":{"operationId":"social.youtube_search","summary":"YouTube search","description":"Search YouTube for videos, channels, or playlists by topic or keyword. Set `type` to narrow the result kind, `sort_by:'date'` + `upload_date` for recency-first monitoring, and `duration` to filter video length. For one channel's own uploads use the `youtube_channel_*` tools.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"The search query (topic, keyword, name)."},"type":{"enum":["video","channel","playlist"],"type":"string","default":"video","description":"Restrict results to one kind. Defaults to videos."},"sort_by":{"enum":["relevance","date","views"],"type":"string","default":"relevance","description":"'relevance' (default), 'date' for newest, or 'views' for most-viewed."},"upload_date":{"enum":["any","today","week","month","year"],"type":"string","description":"Restrict videos to those uploaded within this window. Only applies when type is 'video' (ignored for channel\/playlist searches). 'any' (the default) applies no date filter \u2014 use it unless the user bounded the period."},"duration":{"enum":["under3min","3to20min","over20min"],"type":"string","description":"Filter videos by length. Only applies when type is 'video' (ignored for channel\/playlist searches)."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"estimated_results":{"type":"number"},"results":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"},"kind":{"const":"video"}},"required":["channel","kind"]},{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"video_count":{"type":"number"},"thumbnail":{"type":"string"},"kind":{"const":"playlist"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"channel"},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"subscribers_text":{"type":"string"},"thumbnail":{"type":"string"}},"required":["kind"]}]}}},"required":["summary","query","count","results"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/youtube_trending":{"post":{"operationId":"social.youtube_trending","summary":"YouTube trending","description":"Get the top trending YouTube videos for a region, optionally by category (music, games, movies). Use for 'what's hot\/trending' research. Returns YouTube's one trending list (up to 50). For a specific topic use `youtube_search`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"geo":{"type":"string","minLength":2,"maxLength":2,"default":"US","description":"ISO 3166 country code, e.g. 'US', 'GB', 'IN'."},"type":{"enum":["now","music","games","movies"],"type":"string","description":"Trending category. Defaults to overall ('now')."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many trending videos to return (max 50 \u2014 the list has no further pages)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel\/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"geo":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","geo","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_page":{"post":{"operationId":"social.facebook_page","summary":"Facebook page","description":"Look up a public Facebook page by URL or slug. Use whenever the user asks about a page's followers, category, contact info, rating, or basic info. Works for pages (brands, businesses, creators) \u2014 personal profiles are mostly private.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https:\/\/www.facebook.com\/nike) or bare slug ('nike')."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"page_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"intro":{"type":"string"},"followers":{"type":"number"},"following":{"type":"number"},"likes":{"type":"number"},"categories":{"type":"array","items":{"type":"string"}},"website":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"rating":{"type":"number"},"verified":{"type":"boolean"},"image_url":{"type":"string"},"cover_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_page_posts":{"post":{"operationId":"social.facebook_page_posts","summary":"Facebook page posts","description":"Get a public Facebook page's recent posts (newest first) with engagement counts and per-type reaction breakdowns. For a date range, pass `start_date`\/`since` \u2014 the walk pages back until it reaches that date instead of stopping at a fixed count. This feed yields only ~3 posts per upstream call, so a month costs ~60 calls; if the page posts mostly reels, `facebook_page_reels` covers the same span 3x faster.\n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For search across many pages use `facebook_search`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https:\/\/www.facebook.com\/nike) or bare slug ('nike')."},"max_items":{"type":"integer","minimum":1,"maximum":24,"default":10,"description":"How many recent posts to return (max 24; ~3 fetched per upstream page, so large values are slower). Ignored when `since`\/`start_date` is set."},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts on\/after this date (YYYY-MM-DD). Also deepens the walk."},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts before this date (YYYY-MM-DD)."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"page_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_page_reels":{"post":{"operationId":"social.facebook_page_reels","summary":"Facebook page reels","description":"Get a public Facebook page's reels (newest first) with play counts, reactions, comments and reshares. Prefer this over `facebook_page_posts` whenever the question is about video\/reel performance or covers a date range: it returns 10 items per upstream call against that feed's 3, so the same span costs a third of the requests. It sees ONLY reels \u2014 for photos and text posts use `facebook_page_posts`.\n\nFor a date range pass `since` and `until` rather than a large item cap \u2014 plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields \u2014 each one exists because ignoring it produced a wrong report:\n- `partial: true` \u2014 the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` \u2014 names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` \u2014 which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` \u2014 when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` \u2014 a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https:\/\/www.facebook.com\/nike) or bare slug ('nike')."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"How many reels to return (max 100). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America\/Argentina\/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`\/`until` \u2014 days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"page_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"video_id":{"type":"string"},"type":{"const":"reel"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"play_count":{"type":"number"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"video_length_seconds":{"type":"number"},"image_url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}},"required":["type"]}}},"required":["summary","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_post":{"post":{"operationId":"social.facebook_post","summary":"Facebook post","description":"Fetch a single public Facebook post or reel by URL. Returns engagement metrics (reactions, comments, reshares, video views), text, the author, and the `post_id` that `facebook_post_comments` takes.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Facebook post\/reel URL (https:\/\/www.facebook.com\/...\/posts\/... or \/reel\/...)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"image_url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"video_length_seconds":{"type":"number"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_post_comments":{"post":{"operationId":"social.facebook_post_comments","summary":"Facebook post comments","description":"Get the comments on a public Facebook post. Pass `post_id` when you already have it (from `facebook_page_posts`, `facebook_search`, or `facebook_post` results \u2014 saves a lookup), otherwise pass the post URL. Use when the user asks about comments, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"post_id":{"type":"string","minLength":1,"description":"Numeric `post_id` from another Facebook tool's result."},"url":{"type":"string","format":"uri","description":"Full Facebook post URL."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"post_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"comment_id":{"type":"string"},"created_at":{"type":"string"},"text":{"type":"string"},"replies_count":{"type":"number"},"reactions_count":{"type":"number"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","post_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_group":{"post":{"operationId":"social.facebook_group","summary":"Facebook group","description":"Look up a Facebook group by URL or slug. Returns name, description, member count, location, and privacy ('Public group' \/ 'Private group' \u2014 only public groups' posts can be read).","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"group":{"type":"string","minLength":1,"description":"Facebook group URL (https:\/\/www.facebook.com\/groups\/<slug>), bare slug, or numeric group id."}},"required":["group"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"privacy":{"type":"string"},"members_count":{"type":"number"},"location":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_group_posts":{"post":{"operationId":"social.facebook_group_posts","summary":"Facebook group posts","description":"Get a PUBLIC Facebook group's posts with engagement counts and reaction breakdowns \u2014 community discussion, buy\/sell activity, niche conversations. Sort 'chronological' (newest first, default) or 'top'. Private groups return no posts. Use `facebook_post_comments` with a result's `post_id` to read a discussion thread.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"group":{"type":"string","minLength":1,"description":"Facebook group URL (https:\/\/www.facebook.com\/groups\/<slug>), bare slug, or numeric group id."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":10,"description":"How many posts to return (max 20; ~3 fetched per upstream page, so large values are slower)."},"sort":{"enum":["chronological","top"],"type":"string","default":"chronological","description":"'chronological' = newest first (real-time monitoring); 'top' = the group's top posts."}},"required":["group"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"guidance":{"type":"string"},"group_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","group_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/facebook_search":{"post":{"operationId":"social.facebook_search","summary":"Facebook search","description":"Search Facebook for public posts about a topic, brand, or keyword (across pages, public profiles, and public groups). Use for monitoring mentions and conversations. Set `recent:true` for the most recent posts instead of the most relevant; narrow with start_date\/end_date. There is no search for groups by topic: to find public-group discussion on a topic, `web_search` for `<topic> facebook group` (no `site:facebook.com` \u2014 that search is refused), then read the group URLs it returns with `facebook_group_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text."},"max_items":{"type":"integer","minimum":1,"maximum":36,"default":18,"description":"Maximum posts to return (paginated upstream, max 36)."},"recent":{"type":"boolean","default":false,"description":"When true, returns the most recent posts (chronological) instead of the most relevant. Use for real-time monitoring."},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts on\/after this date (YYYY-MM-DD)."},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts before this date (YYYY-MM-DD)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","query","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/reddit_search":{"post":{"operationId":"social.reddit_search","summary":"Reddit search","description":"Search Reddit for public posts about a topic, brand, product, or keyword. Use it for community sentiment, product complaints, niche discussion, or 'what is Reddit saying about\u2026' questions \u2014 early signal often appears here before X or the news. Optionally scope to a single subreddit. Returns posts with title, text, score, comment count and an absolute reddit.com `url`; cite the `url` of any post you use. `text` is an excerpt \u2014 `reddit_post` reads a full post, `reddit_post_comments` its discussion.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"The search query, e.g. a brand, product, or topic."},"subreddit":{"type":"string","minLength":1,"description":"Restrict the search to one subreddit (without the r\/ prefix)."},"sort":{"enum":["relevance","hot","top","new","comments"],"type":"string","default":"relevance","description":"'relevance' for best matches, 'new' for the most recent, 'top' for highest scoring, 'comments' for most discussed."},"within":{"type":"string","pattern":"^\\d+[smhd]$","description":"Only posts from the last relative window, e.g. '30m', '1h', '8h', '7d'. Use for real-time monitoring."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (paginated upstream, max 100)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"subreddit":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"}}}}},"required":["summary","query","count","truncated","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/reddit_subreddit_posts":{"post":{"operationId":"social.reddit_subreddit_posts","summary":"Reddit subreddit posts","description":"Browse a subreddit's feed: 'hot' (currently popular), 'new' (latest), 'rising' (gaining traction fast), or 'top' (highest scoring within `time`). Use to monitor a specific community \u2014 e.g. a brand's category subreddits. For keyword search across Reddit use `reddit_search` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"subreddit":{"type":"string","minLength":1,"description":"Subreddit name without the r\/ prefix, e.g. 'technology'."},"sort":{"enum":["hot","new","rising","top"],"type":"string","default":"hot","description":"'hot' = currently popular, 'new' = latest, 'rising' = gaining fast, 'top' = highest scoring within `time`."},"time":{"enum":["hour","day","week","month","year","all"],"type":"string","description":"Time window for sort:'top' (default 'day'). Ignored for other sorts."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (max 100)."}},"required":["subreddit"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"subreddit":{"type":"string"},"sort":{"enum":["hot","new","rising","top"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"}}}}},"required":["summary","subreddit","sort","count","truncated","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/reddit_post":{"post":{"operationId":"social.reddit_post","summary":"Reddit post","description":"Read one Reddit post by its exact URL, including its complete text, title, author, score and canonical URL. Use this first when the user supplies a specific Reddit post link. Do not search for its title or substitute similar posts. Cite the returned `url`. Comments are separate: use `reddit_post_comments` only when the discussion is needed.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"post_url":{"type":"string","format":"uri","description":"Full Reddit post URL, e.g. https:\/\/www.reddit.com\/r\/sub\/comments\/abc123\/title\/"}},"required":["post_url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/reddit_post_comments":{"post":{"operationId":"social.reddit_post_comments","summary":"Reddit post comments","description":"Get the comment thread of a Reddit post by URL. Nested replies are flattened depth-first with a `depth` field. Use when the user asks about reactions, sentiment, or discussion on a specific post. Does not include the post body (`reddit_post` does).","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"post_url":{"type":"string","format":"uri","description":"Full Reddit post URL, e.g. https:\/\/www.reddit.com\/r\/sub\/comments\/abc123\/title\/"},"sort":{"enum":["confidence","top","new","controversial","old","qa"],"type":"string","default":"confidence","description":"'confidence' = Reddit's default 'best' ranking, 'top' = highest scoring, 'new' = most recent, 'controversial' = most disputed."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return, including replies (max 50)."}},"required":["post_url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"post_url":{"type":"string"},"sort":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"depth":{"type":"number"},"created_at":{"type":"string"}}}}},"required":["summary","post_url","sort","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_search":{"post":{"operationId":"social.x_search","summary":"X search","description":"Search X (Twitter) for public posts about a topic, hashtag, keyword, or account. Use it for trend analysis, monitoring conversations, tracking what an account or its mentions are posting, or finding high-engagement\/viral posts. Supports X advanced-search operators directly in `query` (e.g. `from:nasa`, `to:nasa`, `#hashtag`, `\"exact phrase\"`, `since:2026-01-01`). When the user shares an X URL like https:\/\/x.com\/user\/status\/123, search the status id (`123`) to find the post and related conversation.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text. May embed X advanced-search operators (from:, to:, #tag, exact phrases in quotes, since:\/until:)."},"query_type":{"enum":["Top","Latest"],"type":"string","default":"Top","description":"'Top' for popular\/relevant posts, 'Latest' for the most recent chronological results."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (paginated upstream, max 100)."},"since_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only return posts on\/after this date (YYYY-MM-DD)."},"until_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only return posts before this date (YYYY-MM-DD)."},"within":{"type":"string","pattern":"^\\d+[smhd]$","description":"Only posts from the last relative window (fine-grained recency via within_time:), e.g. '30m', '1h', '8h', '7d'. Pair with query_type:'Latest' for real-time monitoring. Supersedes since_date."},"language":{"type":"string","pattern":"^[a-z]{2}$","description":"Restrict to a language (ISO 639-1 code, e.g. en, es, pt)."},"has_engagement":{"type":"boolean","default":false,"description":"When true, drops low-engagement posts (min_faves\/min_retweets\/min_replies >= 5). Set only when the user explicitly wants popular posts; it can sharply reduce results."},"min_faves":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many likes. Leave unset unless the user explicitly asks for popular posts; even a minimum of 1 drops every post with no likes and can sharply reduce results."},"min_retweets":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many retweets. Leave unset unless the user explicitly asks for widely-shared posts; even a minimum of 1 drops every post with no retweets and can sharply reduce results."},"min_replies":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many replies. Leave unset unless the user explicitly asks for posts that drew discussion; even a minimum of 1 drops every post with no replies and can sharply reduce results."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string","description":"The query sent to X, operators included."},"section":{"enum":["top","latest"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","query","section","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_profile":{"post":{"operationId":"social.x_profile","summary":"X profile","description":"Look up an X (Twitter) profile by @username. Use whenever the user asks about follower counts, bio, verification, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"},"url":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"created_at":{"type":"string"},"tweet_count":{"type":"number"},"media_count":{"type":"number"},"likes_count":{"type":"number"},"listed_count":{"type":"number"},"profile_image_url":{"type":"string"},"banner_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_user_posts":{"post":{"operationId":"social.x_user_posts","summary":"X user posts","description":"Use when the user asks for an account's recent\/top\/most-liked\/most-viewed posts (e.g. 'top tweet of the week'). Returns recent posts (newest first) with engagement counts; sort and filter client-side. For search across many accounts use `x_search` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"},"max_items":{"type":"integer","minimum":1,"maximum":40,"default":20,"description":"How many recent posts to return (max 40)."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","user_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_post":{"post":{"operationId":"social.x_post","summary":"X post","description":"Fetch a single X (Twitter) post by URL. Returns engagement metrics (likes, replies, retweets, views), the full text (long posts included), and the author; X Articles include their title and full body. Call this directly for any x.com\/twitter.com status URL \u2014 never `read_url` or `web_search` an X link (those pages are client-rendered and won't load); if an Article's body couldn't be fetched, say so rather than searching for it.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https:\/\/x.com\/user\/status\/123"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","description":"One-line result, for the reader."},"article":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["body"]},"article_note":{"type":"string"}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_post_comments":{"post":{"operationId":"social.x_post_comments","summary":"X post comments","description":"Get the replies (comments) on an X (Twitter) post by URL. Use when the user asks about replies, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https:\/\/x.com\/user\/status\/123"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many replies to return."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"tweet_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","tweet_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_user_connections":{"post":{"operationId":"social.x_user_connections","summary":"X user connections","description":"List an X (Twitter) account's followers or accounts it follows. Use for audience\/network questions ('who follows X', 'who does X follow'). X-only \u2014 Instagram has no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"},"relation":{"enum":["followers","following"],"type":"string","description":"'followers' = who follows them; 'following' = who they follow."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many accounts to return."}},"required":["username","relation"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"relation":{"enum":["followers","following"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}}}},"required":["summary","username","relation","count","users"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_tweet_engagers":{"post":{"operationId":"social.x_tweet_engagers","summary":"X tweet engagers","description":"List the accounts that retweeted or liked a specific X (Twitter) post (by URL). Use for engagement\/audience analysis on a post. X-only \u2014 Instagram has no equivalent. X does not expose engager lists for every post: an empty result means the list is unavailable, not that nobody engaged \u2014 use the post's like\/retweet counts for totals.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https:\/\/x.com\/user\/status\/123"},"type":{"enum":["retweeters","likers"],"type":"string","description":"'retweeters' = who retweeted; 'likers' = who liked."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many accounts to return."}},"required":["url","type"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"tweet_id":{"type":"string"},"type":{"enum":["retweeters","likers"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"coverage":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}}}},"required":["summary","tweet_id","type","count","truncated","coverage","users"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/x_trends":{"post":{"operationId":"social.x_trends","summary":"X trends","description":"Get the top trending topics on X (Twitter) for a location (WOEID). Defaults to worldwide. Use when the user asks what's trending. X-only \u2014 Instagram has no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":1,"description":"Yahoo WOEID for the location. 1 = worldwide (default), 23424977 = USA."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}}},"required":["summary","woeid","count","trends"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/threads_profile":{"post":{"operationId":"social.threads_profile","summary":"Threads profile","description":"Look up a Threads profile by @username: bio, follower count, verification, bio links. Threads is Meta's text network; an Instagram handle is usually the same name there.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Threads username, with or without @, or the profile URL."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"username":{"type":"string"},"url":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"followers":{"type":"number"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"bio_links":{"type":"array","items":{"type":"string"}},"profile_pic_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/threads_user_posts":{"post":{"operationId":"social.threads_user_posts","summary":"Threads user posts","description":"An account's most recent Threads posts (about 15, newest first, no paging further back) with text, likes, replies, reposts and quotes. Cite each post's `url`. Before reporting that an account never posts, confirm it exists with `threads_profile`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Threads username, with or without @, or the profile URL."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"How many of the recent posts to return (max 20)."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"media_type":{"enum":["text","image","video","carousel"],"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"repost_count":{"type":"number"},"quote_count":{"type":"number"},"author":{"type":"object","properties":{"username":{"type":"string"},"full_name":{"type":"string"},"is_verified":{"type":"boolean"}}}}}}},"required":["summary","username","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/threads_search":{"post":{"operationId":"social.threads_search","summary":"Threads search","description":"Search public Threads posts by keyword \u2014 what people on Threads say about a brand, product or topic. One page of results (up to ~20), ranked by Threads. Cite each post's `url`. For one account's posts use `threads_user_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Keyword, brand or topic."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts from this date on (YYYY-MM-DD)."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts up to this date (YYYY-MM-DD)."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"How many posts to return (one page, max 20)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"media_type":{"enum":["text","image","video","carousel"],"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"repost_count":{"type":"number"},"quote_count":{"type":"number"},"author":{"type":"object","properties":{"username":{"type":"string"},"full_name":{"type":"string"},"is_verified":{"type":"boolean"}}}}}}},"required":["summary","query","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/meta_ads_advertisers":{"post":{"operationId":"social.meta_ads_advertisers","summary":"Meta ads advertisers","description":"Find the Facebook page id of an advertiser in the Meta Ad Library, by name \u2014 the first step before `meta_ads_page_ads`. Returns every page with a similar name: brands share names with unrelated pages (for 'Higgsfield' the first hit is a car rental), so pick by category, likes and Instagram account, never by position, and ask the user when two candidates are plausible.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"The advertiser's name, e.g. 'ElevenLabs'."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"advertisers":{"type":"array","items":{"type":"object","properties":{"page_id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"likes":{"type":"number"},"is_verified":{"type":"boolean"},"instagram_username":{"type":"string"},"instagram_followers":{"type":"number"},"url":{"type":"string"}},"required":["page_id"]}}},"required":["summary","query","count","advertisers"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/meta_ads_page_ads":{"post":{"operationId":"social.meta_ads_page_ads","summary":"Meta ads page ads","description":"The ads one advertiser runs on Facebook, Instagram, Messenger, WhatsApp and Threads, from the Meta Ad Library: copy, headline, landing link, call to action, format, platforms, dates and creative. Takes the advertiser's `page_id` from `meta_ads_advertisers`. Ordered by impressions unless `sort` is 'recent'. Meta does not publish spend or reach for commercial ads, so don't report them. Cite each ad's `url`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"page_id":{"type":"string","pattern":"^\\d+$","description":"The advertiser's Facebook page id, from `meta_ads_advertisers`."},"country":{"type":"string","minLength":2,"maxLength":2,"description":"Two-letter country code where the ads ran (US, AR, BR). Omit for all countries."},"status":{"enum":["active","inactive","all"],"type":"string","default":"active","description":"'active' (default): running now \u00b7 'inactive': stopped \u00b7 'all'."},"sort":{"enum":["impressions","recent"],"type":"string","default":"impressions","description":"'impressions' (default): most seen first \u00b7 'recent': newest first."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many ads to return (30 a page, max 90). Each page is billed."}},"required":["page_id"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"page_id":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"skipped_templates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"page_id":{"type":"string"},"page_name":{"type":"string"},"text":{"type":"string"},"title":{"type":"string"},"link_url":{"type":"string"},"cta":{"type":"string"},"format":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"started_at":{"type":"string"},"ended_at":{"type":"string"},"image_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}},"video_url":{"type":"string"},"versions":{"type":"number"}}}}},"required":["page_id","summary","count","ads"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/meta_ads_search":{"post":{"operationId":"social.meta_ads_search","summary":"Meta ads search","description":"Search the Meta Ad Library for ads whose TEXT contains a keyword \u2014 what ads about a product, offer or topic say, across advertisers. It matches the ad copy, not the advertiser: for one brand's own ads find its page with `meta_ads_advertisers`, then `meta_ads_page_ads`. Cite each ad's `url`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Words the ad copy contains."},"country":{"type":"string","minLength":2,"maxLength":2,"description":"Two-letter country code where the ads ran (US, AR, BR). Omit for all countries."},"status":{"enum":["active","inactive","all"],"type":"string","default":"active","description":"'active' (default): running now \u00b7 'inactive': stopped \u00b7 'all'."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many ads to return (30 a page, max 90). Each page is billed."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"query":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"skipped_templates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"page_id":{"type":"string"},"page_name":{"type":"string"},"text":{"type":"string"},"title":{"type":"string"},"link_url":{"type":"string"},"cta":{"type":"string"},"format":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"started_at":{"type":"string"},"ended_at":{"type":"string"},"image_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}},"video_url":{"type":"string"},"versions":{"type":"number"}}}}},"required":["query","summary","count","ads"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/google_trends":{"post":{"operationId":"social.google_trends","summary":"Google trends","description":"Google Trends: how much people search for up to 5 terms in one country, week by week over the last 12 months (0-100, relative to the busiest week of any term). Shows whether a topic, brand or trend found elsewhere is rising in searches now. Takes terms; it does not list what is trending.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"keywords":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","minLength":2,"maxLength":100},"description":"1 to 5 search terms to compare."},"country":{"type":"string","pattern":"^[A-Za-z]{2}$","default":"US","description":"Two-letter country code (e.g. US, AR, MX)."}},"required":["keywords"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"country":{"type":"string"},"terms":{"type":"array","items":{"type":"object","properties":{"keyword":{"type":"string"},"latest":{"type":"number"},"average":{"type":"number"},"peak":{"type":"number"},"peak_week":{"type":"string"}},"required":["keyword","latest","average","peak","peak_week"]}},"weeks":{"type":"array","items":{"type":"object","properties":{"week_start":{"type":"string"},"values":{"type":"array","items":{"type":"number"}}},"required":["week_start","values"]}},"url":{"type":"string"}},"required":["summary","country","terms","weeks","url"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/pinterest_search":{"post":{"operationId":"social.pinterest_search","summary":"Pinterest search","description":"Search Pinterest pins by keyword: visual references for art direction, such as product photography, styling, interiors, packaging, moodboards. Search in the words of the look you want (`silver ring macro dark moody`), in English for the widest results. One page, ranked by Pinterest. Each pin carries `image_url`, its full-size image: to use one as a reference for a generation, bring it in with `ingest_url` (purpose `reference`) and ask the model to take its composition, staging and light, not to copy it. Cite each pin's `url`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"What the pins should show."},"max_items":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"How many pins to return (one page, max 25)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"link":{"type":"string"},"board":{"type":"string"},"pinner":{"type":"string"},"saves":{"type":"number"}},"required":["id","url"]}}},"required":["summary","query","count","pins"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/pinterest_pin":{"post":{"operationId":"social.pinterest_pin","summary":"Pinterest pin","description":"One Pinterest pin by URL: its full-size image, title, description, board, saves and the site it links to. Use a pin's `image_url` as a reference as `pinterest_search` describes.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The pin's URL (pinterest.com\/pin\/<id>\/ or a pin.it link)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"link":{"type":"string"},"board":{"type":"string"},"pinner":{"type":"string"},"saves":{"type":"number"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["id","url","summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/pinterest_board":{"post":{"operationId":"social.pinterest_board","summary":"Pinterest board","description":"The pins saved on a Pinterest board, by the board's URL: a ready-made moodboard. One page. To find a user's boards use `pinterest_user_boards`. Use a pin's `image_url` as a reference as `pinterest_search` describes.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The board's URL: pinterest.com\/<username>\/<board>\/."},"max_items":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"How many pins to return (one page, max 25)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"url":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"link":{"type":"string"},"board":{"type":"string"},"pinner":{"type":"string"},"saves":{"type":"number"}},"required":["id","url"]}}},"required":["summary","url","count","pins"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/pinterest_user_boards":{"post":{"operationId":"social.pinterest_user_boards","summary":"Pinterest user boards","description":"A Pinterest account's public boards by @username: name, URL, pin count and cover. Read a board's pins with `pinterest_board`.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Pinterest username, with or without @, or the profile URL."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"boards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"pin_count":{"type":"number"},"follower_count":{"type":"number"},"cover_image_url":{"type":"string"}},"required":["id","url"]}}},"required":["summary","username","count","boards"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/social\/resolve_mention":{"post":{"operationId":"social.resolve_mention","summary":"Resolve a social mention","description":"Resolve a social @handle to the real account(s) it maps to, so you can mention it correctly. Use this to DISAMBIGUATE which platform a handle belongs to (the same handle can exist on Instagram, X, TikTok, etc.) and to confirm an account exists before linking it. Returns each match's ready-to-paste `mention_markdown` (`[@handle](url)`) \u2014 emit that verbatim, never invent a handle or URL. Pass `platform` when you already know it (one lookup); omit it to probe every supported platform and disambiguate.","tags":["Social"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"input":{"type":"object","properties":{"handle":{"type":"string","description":"The account handle\/username, without a leading @ or URL."},"platform":{"enum":["instagram","x","linkedin","youtube","tiktok","facebook"],"type":"string","description":"The platform, if known: `instagram`, `x`, `tiktok`, `youtube`, `linkedin`, or `facebook`. Omit to probe all and disambiguate."}},"required":["handle"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","linkedin_ads","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","threads_profile","threads_user_posts","threads_search","meta_ads_advertisers","meta_ads_page_ads","meta_ads_search","google_trends","pinterest_search","pinterest_pin","pinterest_board","pinterest_user_boards","resolve_mention"],"type":"string","description":"Operation name \u2014 see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"guidance":{"type":"string"},"matches":{"type":"array","items":{"type":"object","properties":{"platform":{"enum":["instagram","x","linkedin","youtube","tiktok","facebook"],"type":"string"},"platform_label":{"type":"string"},"handle":{"type":"string"},"profile_url":{"type":"string"},"mention_markdown":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["platform","platform_label","handle","profile_url","mention_markdown","display_name","followers"]}}},"required":["summary","matches"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Billable upstream requests charged for, never more than the quote's `max_requests`."},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Whole credits this call was charged."}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["social:query"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/voices":{"get":{"operationId":"voices.list","summary":"List voices","description":"Lists the voices the caller can read.","tags":["Voices"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_delete"]},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","capabilities","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}},"quota":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"private_of_others":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["user_id","name","count"]}}},"required":["used","limit","private_of_others"]}},"required":["voices","quota"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["voices:read"]},{"clerkSession":[]}]},"post":{"operationId":"voices.create","summary":"Create voice","description":"Creates a voice and returns the created row.","tags":["Voices"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"provider":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"source":{"anyOf":[{"type":"object","properties":{"type":{"const":"clone"},"sample_asset_ids":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","format":"uuid"}},"consent":{"const":true}},"required":["type","sample_asset_ids","consent"]},{"type":"object","properties":{"type":{"const":"design"},"prompt":{"type":"string","minLength":20,"maxLength":1000}},"required":["type","prompt"]}]},"visibility":{"enum":["private","workspace"],"type":"string","default":"private"}},"required":["organization_id","provider","name","source"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_delete"]},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","capabilities","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["voices:write"]},{"clerkSession":[]}],"parameters":[{"$ref":"#\/components\/parameters\/EndlessApiVersion"}]}},"\/voices\/{voice_id}":{"patch":{"operationId":"voices.update","summary":"Update voice","description":"Updates a voice and returns the updated row. Scoped to the voice named by `voice_id`. Send a sparse body \u2014 only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Voices"],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"visibility":{"enum":["private","workspace"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_delete"]},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","capabilities","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["voices:write"]},{"clerkSession":[]}]},"delete":{"operationId":"voices.delete","summary":"Delete voice","description":"Deletes a voice. Scoped to the voice named by `voice_id`.","tags":["Voices"],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#\/components\/parameters\/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it \u2014 a taken name, a last admin, a limit already reached.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"apiKey":["voices:write"]},{"clerkSession":[]}]}}},"tags":[{"name":"Access"},{"name":"Activity"},{"name":"Alert policy"},{"name":"Assets"},{"name":"Billing"},{"name":"Canvases"},{"name":"Chat models"},{"name":"Conversations"},{"name":"Credits"},{"name":"Custom skills"},{"name":"Documents"},{"name":"Elements"},{"name":"Files"},{"name":"Generations"},{"name":"Invitations"},{"name":"Library"},{"name":"Members"},{"name":"Models"},{"name":"Notifications"},{"name":"Organization logo"},{"name":"Organizations"},{"name":"Projects"},{"name":"Reports"},{"name":"Roles"},{"name":"Scheduled tasks"},{"name":"Search"},{"name":"Skill catalog"},{"name":"Social"},{"name":"Teams"},{"name":"Tools"},{"name":"Transcripts"},{"name":"Users"},{"name":"Voices"},{"name":"Workspace chat models"},{"name":"Workspace models"}]}