# Frequently Asked Questions

Common questions about Tokenlio and quick answers.

## Getting Started

### Do I need accounts with OpenAI, Anthropic, or Google?

No. Tokenlio handles all upstream provider relationships. You only need a Tokenlio account.

### What's the minimum top-up amount?

$10 USD minimum to cover payment processing fees.

### How long does it take to get started?

Typically 5-10 minutes:
1. Sign up (1 min)
2. Verify email (1 min)
3. Top up balance (2 min)
4. Create API key (1 min)
5. Make first request (1 min)

### Can I test before paying?

We don't offer a free tier, but $10 covers thousands of requests with cost-effective models like GPT-3.5 Turbo.

## Billing & Pricing

### How does billing work?

Tokenlio uses prepaid, pay-as-you-go pricing:
- Top up your balance (minimum $10)
- Pay per token consumed
- No subscriptions or monthly fees
- Top up again when needed

### How are tokens calculated?

Tokens are counted by the model's tokenizer. Roughly:
- 1 token ≈ 4 characters
- 1 token ≈ ¾ of a word
- 100 tokens ≈ 75 words

Exact token counts are returned in each API response.

### What are input and output tokens?

- **Input tokens**: Your prompt and conversation history
- **Output tokens**: The model's generated response

Output tokens typically cost more because they require generation.

### Are failed requests charged?

No. Only successful completions consume your balance. Authentication errors, rate limits, and server errors are not charged.

### Can I get a refund?

Yes, unused balance can be refunded within 30 days of top-up, minus consumed amount and processing fees. Email [support@tokenlio.ai](mailto:support@tokenlio.ai).

### Do you offer volume discounts?

Not currently for standard accounts. Contact [sales@tokenlio.ai](mailto:sales@tokenlio.ai) for enterprise pricing.

### What payment methods do you accept?

Major credit/debit cards via Stripe:
- Visa
- Mastercard
- American Express

### What currency do you use?

All pricing is in USD. Your bank may apply conversion fees for non-USD cards.

## API Keys & Authentication

### How do I authenticate requests?

Include your API key in the Authorization header:

```bash
Authorization: Bearer YOUR_API_KEY
```

### How many API keys can I create?

No hard limit. Create separate keys for different:
- Environments (dev, staging, production)
- Applications
- Team members (in organizations)

### Can I see my API key again after creation?

No. The full key is shown only once at creation. If lost, create a new key.

### How do I rotate API keys?

1. Create a new key
2. Update your application
3. Test the new key
4. Delete the old key

### What if my API key is compromised?

1. Immediately disable the key in the console
2. Check usage logs for unauthorized activity
3. Create a new key
4. Update your application
5. Delete the compromised key

### Do API keys expire?

No automatic expiration. Keys remain active until you disable or delete them.

## Models & Capabilities

### Which models are supported?

We support popular models from:
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude 3, Claude 3.5)
- Google (Gemini 1.5, Gemini 1.0)

See [model marketplace](https://api.tokenlio.ai/marketplace) for the complete list.

### Can I request access to a specific model?

Yes. Email [support@tokenlio.ai](mailto:support@tokenlio.ai) with your use case.

### Do all models support streaming?

Yes, all chat models support streaming responses.

### What about function calling?

Supported on:
- GPT-4, GPT-4 Turbo
- GPT-3.5 Turbo
- Claude 3+ models (via tool use)

### Can I use vision models?

Vision capabilities (image understanding) are coming soon for:
- GPT-4 Vision
- Claude 3+ models
- Gemini 1.5 models

### How do I choose the right model?

Start with GPT-3.5 Turbo for testing:
- Fast and cost-effective
- Good for most tasks

Upgrade to GPT-4 or Claude for:
- Complex reasoning
- Higher quality
- Specialized tasks

Compare models in the [model marketplace](https://api.tokenlio.ai/marketplace).

## Usage & Rate Limits

### What are the rate limits?

Default limits:
- 60 requests/minute (personal workspace)
- 120 requests/minute (organization workspace)

Contact support for higher limits.

### How do I handle rate limits?

Implement exponential backoff:

```python
import time

for attempt in range(3):
    try:
        response = client.chat.completions.create(...)
        break
    except RateLimitError:
        time.sleep(2 ** attempt)  # 1s, 2s, 4s
```

### Can I view my usage history?

Yes, in the console:
- **Usage**: Token consumption and costs by time period
- **Request Logs**: Individual request details

### How long is usage history kept?

- Request metadata: 30 days
- Billing transactions: Indefinitely
- Detailed logs: 30 days

### Do you log my prompts and responses?

By default, we do NOT log:
- Prompt content
- Response content
- API keys
- Authorization headers

We only log technical metadata for billing and debugging.

## Organizations & Teams

### What's the difference between personal and organization workspaces?

**Personal**:
- Just you
- Your balance
- Your API keys

**Organization**:
- Multiple members
- Shared balance
- Individual API keys
- Centralized management

### How do I create an organization?

1. Click your profile (top right)
2. Select **Create Organization**
3. Name your organization
4. Invite team members

### Who can do what in an organization?

**Owner**:
- Manage all settings
- Top up balance
- View all usage
- Invite/remove members
- Manage all API keys

**Member**:
- Create their own API keys
- View their own usage
- Cannot see balance or billing

### How do I invite team members?

1. Go to **Organization > Members**
2. Click **Invite Member**
3. Enter their email
4. They receive an invitation link
5. They must log in and accept

### Can members see the organization balance?

No. Only the Owner can view balance and billing information.

### What happens when I remove a member?

- Member loses access to organization workspace
- Their organization API keys are disabled
- Usage history remains (attributed to organization)
- Member keeps their personal workspace

### Can I transfer organization ownership?

Not self-service currently. Contact [support@tokenlio.ai](mailto:support@tokenlio.ai) for assistance.

## Technical Questions

### Is Tokenlio OpenAI-compatible?

Yes. Use the OpenAI SDK with a custom base URL:

```python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_TOKENLIO_KEY",
    base_url="https://api.tokenlio.ai/v1"
)
```

### What's the base URL?

```
https://api.tokenlio.ai
```

### Do you support webhooks?

Not currently. Usage and billing are available via the console and API.

### Can I use Tokenlio with LangChain?

Yes:

```python
from langchain.chat_models import ChatOpenAI

llm = ChatOpenAI(
    openai_api_key="YOUR_TOKENLIO_KEY",
    openai_api_base="https://api.tokenlio.ai/v1",
    model_name="gpt-4-turbo"
)
```

### What about other frameworks?

Any framework that supports OpenAI's API will work with Tokenlio. Just change the base URL.

### Is there a Python/Node.js SDK?

Use the official OpenAI SDK with custom base URL. No separate SDK needed.

### Do you offer GraphQL?

No, REST API only.

## Security & Privacy

### How are API keys stored?

Keys are encrypted at rest and never logged. Full keys are shown only once at creation.

### Do you store my prompts?

No. We don't store prompt content or model responses by default.

### What data do you collect?

We collect:
- Account information (email, name)
- Billing transactions
- Usage metadata (tokens, model, timestamp)
- Technical logs for debugging

We do NOT collect:
- Prompt/response content
- API keys (after creation)
- Payment card numbers (handled by Stripe)

### Is my data encrypted?

Yes:
- HTTPS/TLS for all API traffic
- Encrypted database storage
- Secure payment processing via Stripe

### Do you train models on my data?

No. We don't use your data for model training. We're a gateway, not a model provider.

### Are you GDPR compliant?

We follow data protection best practices. Contact [privacy@tokenlio.ai](mailto:privacy@tokenlio.ai) for specific compliance questions.

### Where are your servers located?

Infrastructure details available on request for compliance purposes.

## Support

### How do I get help?

- Check this FAQ
- Email [support@tokenlio.ai](mailto:support@tokenlio.ai)
- Visit [Contact page](/support/contact)

### What information should I include in support requests?

- Your account email
- Request ID (if API error)
- Error message
- Steps to reproduce
- Expected vs actual behavior

### What are your support hours?

Email support is monitored Monday-Friday, 9 AM - 5 PM UTC. We aim to respond within 24 hours.

### Do you offer phone support?

Not currently. Email is the primary support channel.

### Is there a community forum?

Not yet. Currently support is via email.

## Errors & Troubleshooting

### I'm getting a 401 error

**Cause**: Invalid or missing API key

**Solutions**:
- Check your API key is correct
- Verify the key is active (not disabled)
- Ensure proper header format: `Authorization: Bearer YOUR_KEY`

### I'm getting a 402 error

**Cause**: Insufficient balance

**Solution**: Top up your account balance.

### I'm getting a 429 error

**Cause**: Rate limit exceeded

**Solutions**:
- Slow down request rate
- Implement exponential backoff
- Contact support for higher limits

### My requests are slow

**Possible causes**:
- Using a slow model (GPT-4 is slower than GPT-3.5)
- Large output length
- Network latency

**Solutions**:
- Use faster models (GPT-3.5, Claude Haiku, Gemini Flash)
- Reduce `max_tokens`
- Use streaming for perceived speed

### I'm not seeing my usage

**Solutions**:
- Check the correct workspace is selected
- Verify time range in usage filters
- Wait a few minutes for real-time sync
- Contact support if persists

## Business Questions

### Can I resell Tokenlio access?

Contact [sales@tokenlio.ai](mailto:sales@tokenlio.ai) to discuss partnership opportunities.

### Do you offer white-label solutions?

Not currently. Contact [sales@tokenlio.ai](mailto:sales@tokenlio.ai) for custom requirements.

### What's your SLA?

No formal SLA currently. We aim for >99% uptime. Enterprise SLAs available on request.

### How do I report downtime?

Email [support@tokenlio.ai](mailto:support@tokenlio.ai) with details.

### Can I get a custom contract?

For enterprise customers, contact [sales@tokenlio.ai](mailto:sales@tokenlio.ai).

## Didn't Find Your Answer?

Contact us:
- Email: [support@tokenlio.ai](mailto:support@tokenlio.ai)
- Visit: [Contact page](/support/contact)

We typically respond within 24 hours on business days.
