Skip to content

About

Official Ruby SDK for the LLM Pulse REST API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

llmpulse

LLMPulse - the Ruby gem for the LLM Pulse API

REST API client for LLM Pulse AI visibility analytics.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.99.0
  • Package version: 1.99.0
  • Generator version: 7.24.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://llmpulse.ai

Installation

Build a gem

To build the Ruby code into a gem:

gem build llmpulse.gemspec

Then either install the gem locally:

gem install ./llmpulse-1.99.0.gem

(for development, run gem install --dev ./llmpulse-1.99.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'llmpulse', '~> 1.99.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/LLM-Pulse/llmpulse-ruby, then add the following in the Gemfile:

gem 'llmpulse', :git => 'https://github.com/LLM-Pulse/llmpulse-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'llmpulse'

# Setup authorization
LLMPulse.configure do |config|
  # Configure Bearer authorization: BearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = LLMPulse::AIAgentTrafficApi.new
project_id = 56 # Integer | Project ID
opts = {
  range: 56, # Integer | Number of days to look back (alternative to from/to, which win when both are given). A value that is not a plain positive number returns 422 ERR_INVALID_PARAM, even beside from/to.
  from: Time.parse('2013-10-20T19:20:30+01:00'), # Time | 
  to: Time.parse('2013-10-20T19:20:30+01:00'), # Time | End of the window. A date-only value such as 2026-09-01 covers that whole day. Pass a full timestamp to end the window earlier.
  bot: 'bot_example', # String | Filter by bot slug (e.g. gptbot, claudebot, perplexitybot)
  company: 'company_example', # String | Filter by company (e.g. openai, anthropic, google)
  group_by: 'bot', # String | 
  granularity: 'day' # String | 
}

begin
  #AI bot crawler traffic (Scale plan or above, Beta)
  result = api_instance.get_agent_traffic(project_id, opts)
  p result
rescue LLMPulse::ApiError => e
  puts "Exception when calling AIAgentTrafficApi->get_agent_traffic: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.llmpulse.ai/api/v1

Class Method HTTP request Description
LLMPulse::AIAgentTrafficApi get_agent_traffic GET /metrics/agent_traffic AI bot crawler traffic (Scale plan or above, Beta)
LLMPulse::AIAgentTrafficApi get_ai_traffic GET /metrics/ai_traffic AI referral traffic (Scale plan or above)
LLMPulse::AIAgentTrafficApi get_web_analytics_schema GET /web_analytics/schema Web analytics query format (Growth+)
LLMPulse::AIAgentTrafficApi list_agent_bots GET /dimensions/agent_bots AI bot catalog (Scale plan or above)
LLMPulse::AIAgentTrafficApi query_web_analytics POST /web_analytics/query Live web analytics query (Growth+)
LLMPulse::AIModelInsightsApi get_ai_model_insights_summary GET /reports/ai_model_insights/summary AI Model Insights summary
LLMPulse::AIModelInsightsApi get_ai_model_position_distribution GET /reports/ai_model_insights/position_distribution Position distribution comparison
LLMPulse::AIModelInsightsApi get_ai_overview_results GET /reports/ai_model_insights/ai_overview_results Google AI Overview result availability
LLMPulse::AIModelInsightsApi get_declined_answers GET /reports/ai_model_insights/declined_answers Declined answers (decline rate)
LLMPulse::APIKeysApi create_api_key POST /api_keys Create an API key limited to projects
LLMPulse::APIKeysApi list_api_keys GET /api_keys List API keys
LLMPulse::APIKeysApi revoke_api_key DELETE /api_keys/{id} Revoke an API key
LLMPulse::AccountApi get_account GET /account Account plan, quota usage and rate limits
LLMPulse::AnnotationsApi create_annotation POST /annotations Create a timeline annotation
LLMPulse::AnnotationsApi delete_annotation DELETE /annotations/{id} Delete a timeline annotation
LLMPulse::AnnotationsApi list_annotations GET /annotations List timeline annotations
LLMPulse::AnnotationsApi update_annotation PATCH /annotations/{id} Update a timeline annotation
LLMPulse::AnswersApi get_answer GET /answers/{id} Get one AI response
LLMPulse::AnswersApi list_answers GET /answers List AI responses
LLMPulse::CollectionsTagsApi assign_prompt_tags POST /prompts/assign_tags Bulk-attach tags to prompts
LLMPulse::CollectionsTagsApi create_collection POST /collections Create a tag
LLMPulse::CollectionsTagsApi delete_collection DELETE /collections/{id} Delete a tag
LLMPulse::CollectionsTagsApi list_collections GET /dimensions/collections List tags/collections
LLMPulse::CollectionsTagsApi list_tags GET /dimensions/tags List tags (alias for /collections)
LLMPulse::CollectionsTagsApi remove_prompt_tags POST /prompts/remove_tags Bulk-detach tags from prompts
LLMPulse::CollectionsTagsApi update_collection PATCH /collections/{id} Update a tag
LLMPulse::CompetitorsApi create_competitor POST /competitors Add a competitor
LLMPulse::CompetitorsApi delete_competitor DELETE /competitors/{id} Delete a competitor
LLMPulse::CompetitorsApi get_competitor_details GET /dimensions/competitors/{id} Competitor details
LLMPulse::CompetitorsApi list_competitor_suggestions GET /competitors/suggestions List competitor suggestions
LLMPulse::CompetitorsApi list_competitors GET /dimensions/competitors List competitors
LLMPulse::CompetitorsApi update_competitor PATCH /competitors/{id} Update a competitor
LLMPulse::CustomReportsApi get_custom_report GET /custom_reports/{id} Get a custom report with its widget data
LLMPulse::CustomReportsApi list_custom_reports GET /custom_reports List custom reports
LLMPulse::CustomReportsApi send_custom_report POST /custom_reports/{id}/send Send a custom report now
LLMPulse::GEOAuditsApi compare_geo_audit_runs GET /geo_audits/{id}/comparison Compare two GEO audit runs
LLMPulse::GEOAuditsApi create_geo_audits POST /geo_audits Create GEO audits
LLMPulse::GEOAuditsApi delete_geo_audit DELETE /geo_audits/{id} Delete (archive) a GEO audit
LLMPulse::GEOAuditsApi get_geo_audit GET /geo_audits/{id} Get a GEO audit
LLMPulse::GEOAuditsApi get_geo_audit_run GET /geo_audits/{geo_audit_id}/runs/{sequence} Get a GEO audit run
LLMPulse::GEOAuditsApi list_geo_alerts GET /geo_alerts List GEO audit alerts
LLMPulse::GEOAuditsApi list_geo_audit_findings GET /geo_audits/{geo_audit_id}/runs/{sequence}/findings List the findings of a GEO audit run
LLMPulse::GEOAuditsApi list_geo_audit_issues GET /geo_audits/{geo_audit_id}/issues List the issues of a GEO audit
LLMPulse::GEOAuditsApi list_geo_audit_runs GET /geo_audits/{geo_audit_id}/runs List the runs of a GEO audit
LLMPulse::GEOAuditsApi list_geo_audits GET /geo_audits List GEO audits
LLMPulse::GEOAuditsApi run_geo_audit POST /geo_audits/{geo_audit_id}/runs Run a GEO audit now
LLMPulse::GEOAuditsApi update_geo_audit PATCH /geo_audits/{id} Update a GEO audit
LLMPulse::GEOAuditsApi update_geo_audit_issue PATCH /geo_audits/{geo_audit_id}/issues/{id} Accept or reopen a GEO audit issue
LLMPulse::GEOWriterApi create_intelligence_task POST /intelligence_tasks Create a GEO Writer task
LLMPulse::GEOWriterApi get_cms_content GET /cms/content/{id} Get one post or page of the connected WordPress site
LLMPulse::GEOWriterApi get_intelligence_task GET /intelligence_tasks/{id} Get a GEO Writer task
LLMPulse::GEOWriterApi list_cms_content GET /cms/content List the posts or pages of the connected WordPress site
LLMPulse::GEOWriterApi list_intelligence_tasks GET /intelligence_tasks List GEO Writer tasks
LLMPulse::GEOWriterApi revert_intelligence_task_content POST /intelligence_tasks/{id}/revert Revert GEO Writer task content
LLMPulse::GEOWriterApi send_intelligence_task_to_cms POST /intelligence_tasks/{id}/send_to_cms Send a GEO Writer task to WordPress as a draft
LLMPulse::GEOWriterApi update_intelligence_task_content PATCH /intelligence_tasks/{id} Edit GEO Writer task content
LLMPulse::HealthApi ping GET /ping Health check
LLMPulse::MentionsCitationsApi list_all_citations GET /dimensions/all_citations List all citations (brand + competitor)
LLMPulse::MentionsCitationsApi list_all_mentions GET /dimensions/all_mentions List all mentions (brand + competitor)
LLMPulse::MentionsCitationsApi list_citations GET /dimensions/citations List brand citations
LLMPulse::MentionsCitationsApi list_competitor_citations GET /dimensions/competitor_citations List competitor citations
LLMPulse::MentionsCitationsApi list_competitor_mentions GET /dimensions/competitor_mentions List competitor mentions
LLMPulse::MentionsCitationsApi list_mentions GET /dimensions/mentions List brand mentions
LLMPulse::MetricsApi get_prompt_summary GET /metrics/prompt_summary Per-prompt metrics summary
LLMPulse::MetricsApi get_share_of_voice GET /metrics/sov Share of Voice
LLMPulse::MetricsApi get_summary GET /metrics/summary Aggregated metrics summary
LLMPulse::MetricsApi get_timeseries GET /metrics/timeseries Time-series metrics
LLMPulse::MetricsApi get_top_sources GET /metrics/top_sources Top cited sources
LLMPulse::OwnedMediaCommunitiesApi get_owned_media_profiles GET /projects/{id}/owned_media Get a project's owned-media profiles
LLMPulse::OwnedMediaCommunitiesApi get_owned_media_summary GET /dimensions/owned_media/summary Get an owned-media summary
LLMPulse::OwnedMediaCommunitiesApi list_owned_media GET /dimensions/owned_media List owned-media citations
LLMPulse::OwnedMediaCommunitiesApi list_owned_media_citing_prompts GET /dimensions/owned_media/citing_prompts List the answers citing an owned-media item
LLMPulse::OwnedMediaCommunitiesApi list_reddit_citations GET /dimensions/reddit List cited Reddit content
LLMPulse::OwnedMediaCommunitiesApi update_owned_media_profiles PATCH /projects/{id}/owned_media Update a project's owned-media profiles
LLMPulse::ProjectsApi create_project POST /projects Create a project (fast mode)
LLMPulse::ProjectsApi create_project_draft POST /project_drafts Start a project draft (wizard step 1)
LLMPulse::ProjectsApi delete_project DELETE /projects/{id} Delete a project
LLMPulse::ProjectsApi finalize_project_draft POST /project_drafts/{id}/finalize Finalize a draft into a real project
LLMPulse::ProjectsApi get_project_details GET /dimensions/projects/{id} Project details
LLMPulse::ProjectsApi get_project_draft GET /project_drafts/{id} Read a project draft
LLMPulse::ProjectsApi list_locales GET /dimensions/locales List locales with data
LLMPulse::ProjectsApi list_models GET /dimensions/models List models with data
LLMPulse::ProjectsApi list_projects GET /dimensions/projects List projects
LLMPulse::ProjectsApi update_project PATCH /projects/{id} Update a project profile (Brand Book)
LLMPulse::ProjectsApi update_project_draft PATCH /project_drafts/{id} Submit a wizard step
LLMPulse::PromptsApi accept_suggested_prompts POST /suggested_prompts/accept Accept suggested prompts
LLMPulse::PromptsApi create_prompt_generation POST /prompt_generations Generate prompt suggestions
LLMPulse::PromptsApi create_prompts POST /prompts Bulk-create prompts
LLMPulse::PromptsApi delete_prompt DELETE /prompts/{id} Delete a prompt
LLMPulse::PromptsApi get_prompt_generation GET /prompt_generations/{id} Get a prompt generation run
LLMPulse::PromptsApi import_prompts POST /prompts/import Import prompts
LLMPulse::PromptsApi list_prompt_executions GET /dimensions/prompt_executions List prompt executions
LLMPulse::PromptsApi list_prompts GET /dimensions/prompts List prompts
LLMPulse::PromptsApi list_query_fan_outs GET /dimensions/query_fan_outs List query fan-out
LLMPulse::PromptsApi list_suggested_prompts GET /suggested_prompts List suggested prompts
LLMPulse::PromptsApi reject_suggested_prompts POST /suggested_prompts/reject Reject suggested prompts
LLMPulse::PromptsApi update_prompt PATCH /prompts/{id} Edit a prompt's categorization
LLMPulse::RecommendationsApi get_recommendation GET /recommendations/{id} Get recommendation run with items
LLMPulse::RecommendationsApi launch_recommendations POST /recommendations Launch a recommendations generation
LLMPulse::RecommendationsApi list_recommendations GET /recommendations List recommendation runs
LLMPulse::RecommendationsApi update_recommendation_item PATCH /recommendations/{id}/items/{item_id} Complete, archive or restore a recommendation item
LLMPulse::ReputationStudiesApi create_reputation_report POST /reputation/reports Start a reputation report
LLMPulse::ReputationStudiesApi get_reputation_report GET /reputation/reports/{id} Get reputation report scores
LLMPulse::ReputationStudiesApi get_study GET /studies/{id} Get a custom AI study
LLMPulse::ReputationStudiesApi get_study_report GET /studies/{id}/reports/{report_id} Get custom study report scores
LLMPulse::ReputationStudiesApi list_reputation_reports GET /reputation/reports List reputation reports
LLMPulse::ReputationStudiesApi list_studies GET /studies List custom AI studies
LLMPulse::SearchConsoleApi get_search_console_ai_visibility_gaps GET /search_console/ai_visibility_gaps Search Console queries vs AI tracking (Growth+)
LLMPulse::SearchConsoleApi get_search_console_brand_split GET /search_console/brand_split Search Console branded vs non-branded split (Growth+)
LLMPulse::SearchConsoleApi get_search_console_cannibalization GET /search_console/cannibalization Search Console keyword cannibalization (Growth+)
LLMPulse::SearchConsoleApi get_search_console_decay GET /search_console/decay Search Console content decay (Growth+)
LLMPulse::SearchConsoleApi get_search_console_opportunities GET /search_console/opportunities Search Console ranking opportunities (Growth+)
LLMPulse::SearchConsoleApi get_search_console_pages GET /search_console/pages Top Search Console pages (Growth+)
LLMPulse::SearchConsoleApi get_search_console_queries GET /search_console/queries Top Search Console queries (Growth+)
LLMPulse::SearchConsoleApi get_search_console_rows GET /search_console/rows Search Console rows by several dimensions (Growth+)
LLMPulse::SearchConsoleApi get_search_console_summary GET /search_console/summary Search Console summary (Growth+)
LLMPulse::SearchConsoleApi get_search_console_timeseries GET /search_console/timeseries Search Console time series (Growth+)
LLMPulse::SearchConsoleApi list_search_console_properties GET /search_console/properties List Search Console properties (Growth+)
LLMPulse::SentimentsApi get_sentiment_tags GET /reports/sentiment/tags Sentiment by tag (Growth plan or above)
LLMPulse::SentimentsApi get_sentiment_topics GET /reports/sentiment/topics Sentiment by topic (Growth plan or above)
LLMPulse::SentimentsApi list_sentiment_categories GET /dimensions/sentiments List sentiment categories (Growth plan or above)
LLMPulse::SentimentsApi list_sentiment_records GET /sentiments List sentiment records (Growth plan or above)
LLMPulse::ShoppingAdsApi list_ads GET /dimensions/ads List AI ad placements
LLMPulse::ShoppingAdsApi list_local_businesses GET /dimensions/local_businesses List local businesses
LLMPulse::ShoppingAdsApi list_shopping GET /dimensions/shopping List shopping results
LLMPulse::SourcesCitationIntelligenceApi add_url_list_entries POST /url_lists/{id}/entries Add entries to a URL list
LLMPulse::SourcesCitationIntelligenceApi create_url_list POST /url_lists Create a URL list
LLMPulse::SourcesCitationIntelligenceApi delete_url_list DELETE /url_lists/{id} Delete a URL list
LLMPulse::SourcesCitationIntelligenceApi get_cited_url_content GET /citation_intelligence/urls/{url_sha256}/content Cited URL cached content
LLMPulse::SourcesCitationIntelligenceApi get_cited_url_detail GET /citation_intelligence/urls/{url_sha256} Cited URL detail
LLMPulse::SourcesCitationIntelligenceApi get_mentions_by_citing_domain GET /citation_intelligence/mentions_by_domain Mention share by citing domain
LLMPulse::SourcesCitationIntelligenceApi get_url_list GET /url_lists/{id} Get a URL list report
LLMPulse::SourcesCitationIntelligenceApi list_citation_groups GET /citation_intelligence/groups Grouped citation intelligence
LLMPulse::SourcesCitationIntelligenceApi list_cited_url_occurrences GET /citation_intelligence/urls/{url_sha256}/occurrences Cited URL occurrences
LLMPulse::SourcesCitationIntelligenceApi list_sources GET /dimensions/sources List source URLs
LLMPulse::SourcesCitationIntelligenceApi list_url_lists GET /url_lists List URL lists
LLMPulse::SourcesCitationIntelligenceApi remove_url_list_entries POST /url_lists/{id}/entries/remove Remove entries from a URL list
LLMPulse::SourcesCitationIntelligenceApi update_url_list PATCH /url_lists/{id} Update a URL list
LLMPulse::StoreIntegrationsApi accept_catalog_prompt_suggestions POST /catalog_prompt_suggestions/accept Accept catalog prompt suggestions
LLMPulse::StoreIntegrationsApi create_catalog_prompt_suggestions POST /catalog_prompt_suggestions Suggest buyer prompts from catalog products
LLMPulse::StoreIntegrationsApi get_store_connection GET /store_connection Match a store to a project
LLMPulse::StoreIntegrationsApi list_ai_orders GET /ai_orders Read AI-referred store orders
LLMPulse::StoreIntegrationsApi list_catalog_prompt_suggestions GET /catalog_prompt_suggestions List catalog prompt suggestions
LLMPulse::StoreIntegrationsApi reject_catalog_prompt_suggestions POST /catalog_prompt_suggestions/reject Reject catalog prompt suggestions
LLMPulse::StoreIntegrationsApi replace_ai_orders PUT /ai_orders Replace AI-referred store orders for a window
LLMPulse::TeamApi create_team_invitation POST /team_invitations Invite a team member
LLMPulse::TeamApi list_team_invitations GET /team_invitations List pending team invitations
LLMPulse::TeamApi list_team_members GET /team_members List team members
LLMPulse::TeamApi remove_team_member DELETE /team_members/{id} Remove a team member
LLMPulse::TeamApi revoke_team_invitation DELETE /team_invitations/{id} Revoke a pending team invitation
LLMPulse::TechnicalGEOReportsApi create_technical_geo_reports POST /technical_geo_reports Run technical GEO analysis
LLMPulse::TechnicalGEOReportsApi get_technical_geo_report GET /technical_geo_reports/{id} Get a technical GEO report
LLMPulse::TechnicalGEOReportsApi list_technical_geo_reports GET /technical_geo_reports List technical GEO reports
LLMPulse::TechnicalGEOReportsApi revert_technical_geo_report_content POST /technical_geo_reports/{id}/revert_content Revert llms.txt report content
LLMPulse::TechnicalGEOReportsApi update_technical_geo_report_content PATCH /technical_geo_reports/{id}/content Edit llms.txt report content
LLMPulse::WebhooksApi create_webhook POST /webhooks Create a webhook subscription
LLMPulse::WebhooksApi delete_webhook DELETE /webhooks/{id} Delete a webhook subscription
LLMPulse::WebhooksApi list_webhooks GET /webhooks List webhook subscriptions
LLMPulse::WebhooksApi sample_webhook_payloads GET /webhooks/sample/{event_type} Sample event payloads

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

About

Official Ruby SDK for the LLM Pulse REST API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages