Skip to main content

Requirements

  • PHP 8.1 or higher
  • cURL extension
  • JSON extension

Installation

Install via Composer:

Quick Start

API Reference

Client Initialization

  • $apiKey: Your Skald API key (required)
  • $baseUrl: Optional custom API base URL (defaults to https://api.useskald.com)

Creating Memos

Parameters:
Example:

Updating Memos

Update an existing memo with partial or complete changes. All fields are optional - only include the fields you want to update. Important: When content is updated, the memo is automatically reprocessed by the API (summary, tags, and chunks are regenerated). Other field updates preserve existing processing results. Parameters:
  • $memoId (string): The memo UUID or client reference ID
  • $updateData (UpdateMemoData): The fields to update
  • $idType (string, optional): Type of identifier - 'memo_uuid' (default) or 'reference_id'
Examples:

Deleting Memos

Delete a memo and all its associated data (content, summary, tags, chunks). Parameters:
  • $memoId (string): The memo UUID or client reference ID
  • $idType (string, optional): Type of identifier - 'memo_uuid' (default) or 'reference_id'
Examples:

Searching Memos

Search Methods:
  • SearchMethod::CHUNK_VECTOR_SEARCH - Semantic search on memo chunks (returns distance scores 0-2)
  • SearchMethod::TITLE_CONTAINS - Case-insensitive substring match on titles
  • SearchMethod::TITLE_STARTSWITH - Case-insensitive prefix match on titles
Parameters:
Example:
See Filters for advanced filtering options.

AI Chat (Non-Streaming)

Parameters:
Examples:
See Filters for advanced filtering options.

AI Chat (Streaming)

Example:

Document Generation (Non-Streaming)

Parameters:
Examples:
See Filters for advanced filtering options.

Document Generation (Streaming)

Example:

Error Handling

All API errors throw Skald\Exceptions\SkaldException:

Examples

See the examples/ directory on GitHub for complete working examples:
  • create_memo.php - Creating memos with various options
  • update_memo.php - Updating existing memos
  • delete_memo.php - Deleting memos by UUID or reference ID
  • search.php - All search methods with filters
  • chat.php - Non-streaming chat
  • chat_streaming.php - Streaming chat with real-time output
  • generate_doc.php - Document generation
  • generate_doc_streaming.php - Streaming document generation