Skip to content

Overview ​

TendSocial AI allows your company to use your own API keys for AI services. This gives you:

  • Direct billing with AI providers (OpenAI, Anthropic, Google, etc.)
  • Cost transparency - see exactly what you're spending
  • Usage control - manage your own rate limits and quotas
  • Privacy - your API keys stay within your organization

Supported AI Providers ​

  • OpenAI - GPT-4, GPT-3.5, DALL-E 3
  • Anthropic - Claude 3 (Opus, Sonnet, Haiku)
  • Google AI - Gemini Pro, Gemini Pro Vision
  • Azure OpenAI - Enterprise OpenAI models

Getting Started ​

Step 1: Obtain API Keys from Providers ​

OpenAI ​

  1. Go to platform.openai.com
  2. Sign up or log in to your account
  3. Navigate to API Keys in your account settings
  4. Click Create new secret key
  5. Copy the key (you won't be able to see it again!)
  6. Set up billing in your OpenAI account

Cost Estimates:

  • GPT-4: ~$0.03 per 1K tokens (input), ~$0.06 per 1K tokens (output)
  • GPT-3.5: ~$0.0015 per 1K tokens
  • DALL-E 3: ~$0.04 per image (standard), ~$0.08 (HD)

Anthropic (Claude) ​

  1. Go to console.anthropic.com
  2. Sign up for an account
  3. Navigate to API Keys
  4. Click Create Key
  5. Name your key and copy it
  6. Add credits to your account

Cost Estimates:

  • Claude 3 Opus: ~$0.015 per 1K tokens (input), ~$0.075 per 1K tokens (output)
  • Claude 3 Sonnet: ~$0.003 per 1K tokens (input), ~$0.015 per 1K tokens (output)

Google AI (Gemini) ​

  1. Go to makersuite.google.com/app/apikey
  2. Sign in with your Google account
  3. Click Create API Key
  4. Copy the key

Cost Estimates:

  • Gemini Pro: Currently free tier available, paid tiers vary

Azure OpenAI ​

  1. Set up an Azure account and subscription
  2. Create an Azure OpenAI resource
  3. Deploy your chosen models
  4. Get your API key and endpoint from the resource

Step 2: Add Your API Key to TendSocial AI ​

  1. Navigate to Company Settings

    • Click on your profile in the top-right corner
    • Select Company Settings
    • Go to the API Keys tab
  2. Add New API Key

    • Click the Add API Key button
    • Fill in the form:
      • Key Name: Give it a descriptive name (e.g., "Production OpenAI Key")
      • Provider: Select the AI provider
      • API Key: Paste your API key
  3. Verify the Key

    • The system will test your key to ensure it's valid
    • If successful, you'll see a confirmation message
    • Your key preview will show (e.g., "sk-...xyz123")
  4. Security Notes

    • Your full API key is encrypted and stored securely
    • Only the last 4 characters are visible in the UI
    • You can rotate keys at any time

Step 3: Set Default Provider (Optional) ​

You can set a default provider for different operations:

  • Text Generation: Choose your preferred model for post generation
  • Image Generation: Choose your preferred model for images
  • Analysis: Choose your preferred model for brand analysis

This allows you to balance cost and quality based on your needs.


Managing Your API Keys ​

Viewing Keys ​

In the API Keys section, you'll see:

  • Key name
  • Provider
  • Key preview (last 4 characters)
  • Status (Active/Inactive)
  • Usage count
  • Last used date
  • Created date

Editing Keys ​

You can:

  • Rename a key
  • Deactivate a key (temporarily disable without deleting)
  • Delete a key (permanent removal)
  • Set expiration date for automatic deactivation

Usage Tracking ​

Each API key tracks:

  • Total calls made using this key
  • Last used timestamp
  • Usage count per day/week/month

This helps you:

  • Monitor which keys are being used
  • Detect unusual activity
  • Plan for key rotation

Best Practices ​

Security ​

  1. Never share your API keys with anyone outside your organization
  2. Rotate keys regularly (every 90 days recommended)
  3. Use separate keys for development and production
  4. Set rate limits in your provider's dashboard
  5. Monitor usage regularly for unexpected spikes

Cost Management ​

  1. Start with lower-tier models (e.g., GPT-3.5 instead of GPT-4)
  2. Set spending alerts in your provider dashboards
  3. Monitor usage analytics in TendSocial AI
  4. Use the right model for the task:
    • Simple posts: GPT-3.5 or Claude Haiku
    • Complex analysis: GPT-4 or Claude Opus
    • Images: DALL-E 3 or Stable Diffusion

Key Rotation ​

When rotating keys:

  1. Create a new key in your provider's dashboard
  2. Add the new key to TendSocial AI
  3. Test the new key with a sample generation
  4. Deactivate the old key
  5. Monitor for any issues
  6. Delete the old key after 24 hours

Usage Analytics & Billing ​

Company Dashboard ​

View comprehensive analytics:

  • Total API calls across all providers
  • Token usage per provider
  • Estimated costs (calculated from provider pricing)
  • Content generated (posts, images)
  • Usage trends over time

Per-User Analytics ​

Company admins can view:

  • Individual user activity
  • Team performance comparisons
  • Most active users
  • Usage by department/role

Exporting Reports ​

Export usage data for:

  • Internal billing (charge back to departments)
  • Budget planning
  • Compliance reporting
  • Financial forecasting

Troubleshooting ​

"Invalid API Key" Error ​

Causes:

  • Key was copied incorrectly (extra spaces, missing characters)
  • Key has been revoked in the provider's dashboard
  • Insufficient credits/quota in your provider account
  • Key doesn't have required permissions

Solutions:

  1. Double-check the key in your provider's dashboard
  2. Generate a new key and try again
  3. Verify your account has active billing
  4. Check rate limits and quotas

"Rate Limit Exceeded" Error ​

Causes:

  • Too many requests in a short time
  • Provider rate limits reached
  • Account quota exhausted

Solutions:

  1. Check your provider's rate limits
  2. Upgrade your provider account tier
  3. Spread out requests over time
  4. Use a different provider temporarily

"Insufficient Quota" Error ​

Causes:

  • No credits remaining in your account
  • Free tier limits exceeded
  • Payment method declined

Solutions:

  1. Add credits to your provider account
  2. Update payment method
  3. Upgrade to a paid tier

Cost Comparison ​

Sample Costs for 1,000 Posts ​

ProviderModelEstimated Cost
OpenAIGPT-3.5 Turbo$1.50 - $3.00
OpenAIGPT-4$30 - $60
AnthropicClaude Haiku$2.50 - $5.00
AnthropicClaude Sonnet$5 - $10
AnthropicClaude Opus$15 - $30
GoogleGemini ProFree - $5

Note: Costs vary based on post length and complexity

Sample Costs for 1,000 Images ​

ProviderModelQualityCost
OpenAIDALL-E 3Standard$40

Appendix: API Key Security Checklist ​

  • [ ] Keys are stored securely (encrypted)
  • [ ] Only authorized team members have access
  • [ ] Keys are rotated regularly (every 90 days)
  • [ ] Usage is monitored for anomalies
  • [ ] Spending alerts are set up with providers
  • [ ] Rate limits are configured appropriately
  • [ ] Keys are revoked immediately if compromised
  • [ ] Separate keys for dev/staging/production
  • [ ] Keys are never committed to code repositories
  • [ ] Access logs are reviewed regularly

TendSocial Documentation