From oatda
Use when the user wants to generate text using OATDA's unified LLM API. Supports 10+ providers including OpenAI, Anthropic, Google, Deepseek, Mistral, xAI, Alibaba, MiniMax, ZAI, and Moonshot.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oatda:oatda-text-completionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate text from 10+ LLM providers through OATDA's unified API endpoint.
Generate text from 10+ LLM providers through OATDA's unified API endpoint.
Use this skill when the user wants to:
The user needs an OATDA API key. Check in this order:
$OATDA_API_KEY environment variable~/.oatda/credentials.json config fileIf neither exists, tell the user:
You need an OATDA API key. Get one at https://oatda.com, then set it:
export OATDA_API_KEY=your_key_here
# Check env var first; if empty, auto-load from credentials file
if [[ -z "$OATDA_API_KEY" ]]; then
export OATDA_API_KEY=$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)
fi
# Verify key exists (show first 8 chars only)
echo "${OATDA_API_KEY:0:8}"
If the output is empty or null, stop and ask the user to configure their API key.
IMPORTANT:
curl commands must run in the same shell session. Each separate bash/terminal invocation starts with an isolated environment where previously exported variables are lost. Either run all commands in one session, or chain them (e.g., export OATDA_API_KEY=... && curl ...).Parse the user's request for a model. Map common aliases to provider/model format:
| User says | Provider | Model |
|---|---|---|
| gpt-4o | openai | gpt-4o |
| gpt-4o-mini | openai | gpt-4o-mini |
| o1 | openai | o1 |
| claude, sonnet | anthropic | claude-3-5-sonnet |
| haiku | anthropic | claude-3-5-haiku |
| opus | anthropic | claude-3-opus |
| gemini | gemini-2.0-flash | |
| gemini-1.5 | gemini-1.5-pro | |
| deepseek | deepseek | deepseek-chat |
| mistral | mistral | mistral-large |
| grok | xai | grok-2 |
| qwen | alibaba | qwen-max |
Default: openai / gpt-4o if no model is specified.
If the user provides provider/model format directly (e.g., openai/gpt-4o), split on / to get the separate provider and model values.
curl -s -X POST "https://oatda.com/api/v1/llm" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OATDA_API_KEY" \
-d '{
"provider": "<PROVIDER>",
"model": "<MODEL>",
"prompt": "<USER_PROMPT>",
"temperature": 0.7,
"maxTokens": 4096
}'
Replace <PROVIDER>, <MODEL>, and <USER_PROMPT> with actual values. Escape any special characters in the prompt for JSON.
Optional parameters:
temperature: 0 (deterministic) to 2 (creative). Default: 0.7maxTokens: Max tokens to generate. Default: 4096stream: Set to true for streaming (not recommended via curl)The API returns JSON like:
{
"success": true,
"provider": "openai",
"model": "gpt-4o",
"response": "The generated text content...",
"tokenUsage": {
"prompt_tokens": 25,
"completion_tokens": 150,
"total_tokens": 175,
"cost": 0.001375
}
}
response field to the usertokenUsage| HTTP Status | Meaning | Action |
|---|---|---|
| 401 | Invalid API key | Tell user to check their key at https://oatda.com/dashboard/api-keys |
| 402 | Insufficient credits | Tell user to check balance at https://oatda.com/dashboard/usage |
| 429 | Rate limited | Wait 5 seconds and retry once |
| 400 | Bad request / model not found | Check model format, suggest using /oatda:oatda-list-models |
User asks: "Write a haiku about code using claude"
curl -s -X POST "https://oatda.com/api/v1/llm" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OATDA_API_KEY" \
-d '{
"provider": "anthropic",
"model": "claude-3-5-sonnet",
"prompt": "Write a haiku about code",
"temperature": 0.7,
"maxTokens": 256
}'
prompt as a plain string, NOT a messages arrayprovider/model into separate JSON fields: "provider": "openai", "model": "gpt-4o"maxTokens (max: 128000 for some models)error.message, show that message to the user/oatda:oatda-list-models to see available models, /oatda:oatda-vision-analysis for image analysisCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub devcsde/oatda-skills --plugin oatda