agentsclimarketplace

Oatda text completion

Skill devcsde/oatda-skills/skills/oatda-text-completion

Claude Code plugin: 9 skills for OATDA unified LLM API gateway - text, vision, image, video, audio (TTS/STT/translation). 10+ providers, 1 API key.

Install
npx -y skills add devcsde/oatda-skills --skill oatda-text-completion

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

5.5 KB, as published. Nobody here has run it

OATDA Text Completion

Generate text from 10+ LLM providers through OATDA's unified API endpoint.

When to Use

Use this skill when the user wants to:

  • Generate text using a specific LLM provider through the OATDA API
  • Send a prompt to OpenAI, Anthropic, Google, Deepseek, Mistral, xAI, or other providers via OATDA
  • Compare outputs across different models using a single API
  • Use a model by alias (e.g., "gpt-4o", "claude", "gemini")

Prerequisites

The user needs an OATDA API key. Check in this order:

  1. $OATDA_API_KEY environment variable
  2. ~/.oatda/credentials.json config file

If 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

Step-by-Step Instructions

1. Resolve the API key

# 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:

  • Never print the full API key. Only check its existence or show the first 8 characters for verification.
  • The key resolution script and subsequent 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 ...).

2. Determine the model

Parse the user's request for a model. Map common aliases to provider/model format:

User saysProviderModel
gpt-4oopenaigpt-4o
gpt-4o-miniopenaigpt-4o-mini
gpt-5openaigpt-5
gpt-5-miniopenaigpt-5-mini
o1openaio1
o3openaio3
claude, sonnetanthropicclaude-sonnet-4-5-20250929
haikuanthropicclaude-haiku-4-5-20251001
opusanthropicclaude-opus-4-5-20251101
geminigooglegemini-3-pro-preview
gemini-2.5googlegemini-2.5-pro
deepseekdeepseekdeepseek-v4-pro
mistralmistralmistral-large-latest
grokxaigrok-4-fast
grok-4xaigrok-4-1-fast-reasoning
qwenalibabaqwen3-max
kimi, moonshotmoonshotkimi-k2.7-code
glmzaiglm-5

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.

⚠️ Models update frequently. If a model ID fails, query /oatda:oatda-list-models or GET https://oatda.com/api/v1/models for the latest available models.

3. Make the API call

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.7
  • maxTokens: Max tokens to generate. Default: 4096
  • stream: Set to true for streaming (not recommended via curl)

4. Parse the response

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
  }
}
  • Present the response field to the user
  • Optionally mention token usage and cost from tokenUsage

5. Handle errors

HTTP StatusMeaningAction
401Invalid API keyTell user to check their key at https://oatda.com/dashboard/api-keys
402Insufficient creditsTell user to check balance at https://oatda.com/dashboard/usage
429Rate limitedWait 5 seconds and retry once
400Bad request / model not foundCheck model format, suggest using /oatda:oatda-list-models

Full Example

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-sonnet-4-5-20250929",
    "prompt": "Write a haiku about code",
    "temperature": 0.7,
    "maxTokens": 256
  }'

Tips

  • The API expects prompt as a plain string, NOT a messages array
  • Split provider/model into separate JSON fields: "provider": "openai", "model": "gpt-4o"
  • For long-form content, increase maxTokens (max: 128000 for some models)
  • Temperature 0 = deterministic output, 2 = maximum creativity
  • NEVER expose the full API key in output — redact all but the first 8 characters
  • If the API returns an error JSON with error.message, show that message to the user
  • Related skills: /oatda:oatda-list-models to see available models, /oatda:oatda-vision-analysis for image analysis

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.