---
name: sheepgeo-master-integration
description: Choose the right SheepGeo capability and build a reliable integration.
---

# SheepGeo Master Integration Skill

Base URL: https://api.sheepgeo.com
Auth: Authorization: Bearer YOUR_API_KEY
Public model IDs: doubao, qianwen, zhipu, deepseek, kimi, ernie, hunyuan, spark, mita
Citation references: completed task responses may include searchReferences arrays. Each reference can contain title, url, snippet, and source. Empty arrays mean the AI/provider did not return structured citation sources.
Scope: public /v1 Open Platform APIs (including whitelist-gated Media Publish APIs /v1/media/*). Admin, internal operations, and browser-extension APIs are out of scope.

Use server-side API key storage whenever possible.

Your job is to help a developer build with SheepGeo safely and efficiently.

## Choose the right capability

- Use AI Visibility for one-off website or brand recognition checks.
- Use Keyword Polling for keyword penetration and cross-model recommendation testing.
- Use Precision Sampling for repeated stability testing on the same question.
- Use Competitor Analysis for target-vs-competitor comparison.
- Brand Monitoring is temporarily unavailable: 品牌监控功能正在临时维护中，暂不可用。 Do not choose it for new integrations unless the user explicitly needs legacy 503 handling.
- Use Effect Tracking for published-content asset syncing and AI citation performance dashboards.
- Use Media Publish (/v1/media/*, whitelist-gated) for media discovery, domain-to-media matching, real-time quoting, dry-run validation, and idempotent article publishing paid from the separate Media Balance wallet.
- Use Balance for preflight checks, quota display, and rate-limit awareness.

## Default implementation order

1. Save the API key on the server.
2. Implement GET /v1/balance first.
3. Implement one create-task POST endpoint.
4. Implement the matching GET poll endpoint.
5. Add status handling for running, completed, failed, no credits, and rate limited.

## Common async pattern

Most SheepGeo analysis APIs are async:

1. Create task with POST.
2. Save taskId.
3. Poll the matching GET endpoint.
4. Stop on completed or failed.
5. Render summary and per-model results.

## Quota consumption

- AI Visibility: number of selected models (1 call per model).
- Keyword Polling: generate-only = models x queriesPerModel; deep penetration = models² x queriesPerModel; import mode = models x number of imported queries.
- Precision Sampling: models x repetitionCount.
- Competitor Analysis: models² x dimensions x queriesPerDimension (each model answers the question set generated by every model).
- Brand Monitoring: charged per scheduled run by enabled model count, not at task creation.
- Effect Tracking and Balance: 0 calls.

Always prefer explicit selectedModels over running all models. Compute the expected cost before submitting large jobs.

## Common error handling

- 400: invalid request, do not auto-retry.
- 401: invalid or missing API key, stop and fix credentials.
- 402: insufficient balance, stop and prompt recharge / balance recheck.
- 429: rate limited, retry with backoff.
- 500: internal error, limited retry allowed.
- 503: temporarily unavailable, fail gracefully.

## What to generate by default

- a server-side SheepGeo client,
- typed request/response models,
- polling helper,
- balance precheck logic,
- explicit error handling,
- citation/reference rendering for searchReferences when present,
- UI states for task lifecycle.

## When to switch to a specialized skill

If the developer has already chosen one capability, prefer the matching specialized SheepGeo skill so the code, test request, and error handling are more specific.
