Skillz Market SDK
API Reference

SkillzMarket Class

API reference for the SkillzMarket consumer client.

SkillzMarket Class

The main client for discovering and calling paid skills.

import { SkillzMarket } from '@skillzmarket/sdk';

Constructor

new SkillzMarket(options?: SkillzMarketOptions)

Parameters

NameTypeDescription
optionsSkillzMarketOptionsConfiguration options

SkillzMarketOptions

interface SkillzMarketOptions {
  apiUrl?: string;
  wallet?: WalletConfig;
  network?: `${string}:${string}`;
}
PropertyTypeDefaultDescription
apiUrlstring'https://api.skillz.market'API endpoint URL
walletWalletConfig-Wallet for payments
networkstring'eip155:8453'Network for payments

WalletConfig

type WalletConfig = PrivateKeyAccount | Hex;

Can be either:

  • A viem PrivateKeyAccount (from privateKeyToAccount)
  • A hex private key string (e.g., '0x...')

Methods

Search for skills by keyword.

search(query: string, filters?: SearchFilters): Promise<Skill[]>

Parameters

NameTypeDescription
querystringSearch query
filtersSearchFiltersOptional filters

SearchFilters

interface SearchFilters {
  category?: string;
  minPrice?: string;
  maxPrice?: string;
  creator?: string;
  group?: string;  // Filter by group slug
}

Returns

Promise<Skill[]> - Array of matching skills

Example

const skills = await market.search('image generation', {
  minPrice: '0.001',
  maxPrice: '0.01',
});

info()

Get detailed information about a skill.

info(slug: string): Promise<Skill>

Parameters

NameTypeDescription
slugstringSkill slug identifier

Returns

Promise<Skill> - Skill details

Example

const skill = await market.info('text-to-image');
console.log(skill.price, skill.currency);

call()

Call a skill with automatic payment.

call<T = unknown>(slug: string, input: Record<string, unknown>): Promise<T>

Parameters

NameTypeDescription
slugstringSkill slug identifier
inputRecord<string, unknown>Input data for the skill

Returns

Promise<T> - Skill result

Throws

  • Error('Wallet required for calling paid skills') - If no wallet configured
  • Error('Skill [slug] is not active') - If skill is disabled
  • Error('Skill call failed: ...') - If skill returns an error

Example

interface ImageResult {
  url: string;
}
 
const result = await market.call<ImageResult>('text-to-image', {
  prompt: 'A sunset',
});
console.log(result.url);

getCreator()

Get a creator's profile.

getCreator(address: string): Promise<Creator>

Parameters

NameTypeDescription
addressstringCreator's wallet address

Returns

Promise<Creator> - Creator profile


getReviews()

Get reviews for a skill.

getReviews(skillSlug: string): Promise<Review[]>

Parameters

NameTypeDescription
skillSlugstringSkill slug identifier

Returns

Promise<Review[]> - Array of reviews


getGroups()

List skill groups, optionally filtered by creator.

getGroups(creatorAddress?: string): Promise<SkillGroup[]>

Parameters

NameTypeDescription
creatorAddressstringOptional creator wallet address filter

Returns

Promise<SkillGroup[]> - Array of skill groups

Example

// Get all groups
const groups = await market.getGroups();
 
// Get groups by creator
const creatorGroups = await market.getGroups('0x...');

getGroup()

Get a specific group with its skills.

getGroup(slug: string, creatorAddress?: string): Promise<SkillGroupWithSkills>

Parameters

NameTypeDescription
slugstringGroup slug identifier
creatorAddressstringOptional creator wallet address for scoping

Returns

Promise<SkillGroupWithSkills> - Group with its skills and creator info

Example

const group = await market.getGroup('ai-tools');
 
console.log(group.name);    // "AI Tools"
console.log(group.skills);  // Array of skills in this group

authenticate()

Authenticate with wallet signature.

authenticate(): Promise<string>

Returns

Promise<string> - Auth token (stored internally)

Throws

  • Error('Wallet required for authentication') - If no wallet configured

feedback()

Submit a review for a skill.

feedback(slug: string, score: number, comment?: string): Promise<void>

Parameters

NameTypeDescription
slugstringSkill slug identifier
scorenumberScore from 0-100
commentstringOptional comment

Example

await market.feedback('text-to-image', 85, 'Great results!');

Complete Example

import { SkillzMarket } from '@skillzmarket/sdk';
 
const market = new SkillzMarket({
  wallet: process.env.WALLET_KEY,
});
 
// Search
const skills = await market.search('AI');
 
// Get info
const skill = await market.info(skills[0].slug);
 
// Call
const result = await market.call(skill.slug, { prompt: 'Hello' });
 
// Review
await market.feedback(skill.slug, 90, 'Excellent!');