Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nikhil-Kadapala/checkthat/llms.txt
Use this file to discover all available pages before exploring further.
Overview
CheckThat integrates with Meta’s Llama models through Together AI, providing access to open-source language models with strong performance on reasoning and generation tasks. Llama models offer cost-effective AI capabilities with transparent, open-source architecture.Available Models
The following Llama models are available through CheckThat via Together AI:Llama 3.3 70B - High-performance 70B parameter model optimized for instruction following. Free tier available.
DeepSeek R1 Distill Llama 70B - Distilled reasoning model based on Llama architecture. Free tier available.
Configuration
API Key Setup
Your Together AI API key. Get your key from Together AI Platform.
The full model identifier from the available models list above.
Request Parameters
Llama models through Together AI use OpenAI-compatible parameters:Array of message objects with
role and content fields.Controls randomness in responses. Range: 0.0 to 2.0.
Maximum number of tokens to generate in the response.
Enable streaming responses for real-time output.
Structured output format specification (JSON object with schema).
Usage Examples
Basic Chat Completion
Streaming Response
Structured Output
Multi-turn Conversation
Features and Capabilities
OpenAI-Compatible API
Together AI provides an OpenAI-compatible API for Llama models (togetherAI.py:19-232), making integration seamless:
- Standard message format
- Familiar parameter names
- Compatible response structure
Structured Output Support
Llama 3.3 70B supports structured outputs via Together AI’s JSON object mode (togetherAI.py:75-138):
- meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
Conversation History Management
Automatic formatting using OpenAI message format (togetherAI.py:34-39):
Streaming Support
Real-time streaming with chunk-by-chunk delivery (togetherAI.py:52-73):
OpenAI Response Compatibility
Together AI responses are already OpenAI-compatible, but CheckThat ensures consistency (togetherAI.py:140-232):
- Preserves all standard OpenAI fields
- Adds Together AI-specific extensions (warnings, seed)
- Maintains usage statistics
Implementation Details
CheckThat’s Together AI integration (togetherAI.py:19-232) provides:
- Together SDK: Uses official
togetherPython SDK - OpenAI compatibility: Seamless integration with OpenAI-style APIs
- Structured outputs: JSON object mode with schema validation
- Response transformation: Ensures consistent OpenAI format
Structured Response Object
For JSON schema responses, CheckThat returns aStructuredResponse object:
Together AI Extensions
Responses may include Together AI-specific fields:Rate Limits and Pricing
Free Tier Models
Both available Llama models offer free tier access through Together AI:- Llama 3.3 70B Turbo: Free with rate limits
- DeepSeek R1 Distill Llama 70B: Free with rate limits
Paid Tier
Paid tiers offer:- Higher rate limits
- Priority access
- Additional model variants
- Enhanced support
Error Handling
- 400: Invalid request format or parameters
- 401: Invalid API key
- 429: Rate limit exceeded
- 500: Together AI service error
Best Practices
- Use free tier wisely: Take advantage of free models for development and testing
- Implement rate limiting: Handle 429 errors with exponential backoff
- Leverage structured outputs: Use JSON schema for reliable data extraction
- Stream for long responses: Enable streaming for better UX on lengthy generations
- Monitor warnings: Check
togetherai_warningsfor API guidance - System prompts matter: Llama models respond well to clear system instructions
- Test with Llama 3.3: Start with the 70B model for best balance of cost and quality
- Conversation context: Include relevant history for coherent multi-turn dialogues
Model Comparison
Llama 3.3 70B Instruct Turbo
- Best for: General-purpose tasks, instruction following, balanced performance
- Context window: Extended context support
- Speed: Optimized turbo inference
- Free tier: Yes
DeepSeek R1 Distill Llama 70B
- Best for: Reasoning tasks, mathematical problems, logical analysis
- Context window: Standard context support
- Speed: Standard inference
- Free tier: Yes