Development & APIs (2026)
This content was developed with AI assistance and is regularly reviewed for accuracy.
Snapshot: October 2026. Model names, prices, and product features change monthly; What's New in AI is the maintained chronology.
Technical resources for developers building AI-powered applications: a working first API call for each major provider, then the frameworks, hosting, vector databases, and development tools around them. For retrieval-specific details, see RAG: How It Works & When to Use It. When each model below was released is tracked in What's New in AI; this page covers what to call today.
Quick API Comparison
| API | Current models | Pricing | Context Limit | Best For |
|---|---|---|---|---|
| OpenAI | GPT-6 Astra, GPT-6 Sol, GPT-6.1 Sol, GPT-6 Luna | See OpenAI pricing; Luna reported at $0.10/$0.50 per million tokens | About 1M tokens (reported) | General apps, agents with computer use, coding |
| Anthropic | Claude Fable 5.1 ($10/$50), Opus 5.5 ($4/$20), Sonnet 5.5 ($2/$10), Haiku 5.5 (from $0.10/$0.50) | See Claude pricing | 1M tokens on all four | Long docs, deep reasoning, coding, agents |
| Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8 Flash | See Gemini pricing; Argon $2/$10 introductory until November 30, 2026, then $4/$20 | 1M+ tokens (Argon: 1M-token output limit) | Multimodal, Google ecosystem | |
| Hugging Face | Thousands of open-weight models (free tier) | Varies by model | Varies | Open-source, specialized |
| Cohere | Command, Embed, Rerank (free tier) | Usage-based | Varies | Enterprise NLP, multilingual |
| Replicate | Open-weight image, video, and language models | Pay-per-second compute | Varies | Image/video, specialized models |
Choosing an API
Picking the right API depends on your use case, budget, and technical requirements. Here's a quick decision guide:
- Building a chatbot or general app? Start with Anthropic or OpenAI — both have excellent SDKs and documentation
- Processing long documents (over 100K tokens)? Every current Claude model (1M tokens) and Gemini 3.1 Pro (1M+ tokens) handle large contexts well; Claude bills a 900K-token request at the same per-token rate as a 9K one, except Haiku 5.5, which costs more above 100K
- Need multimodal capabilities? Gemini's native video and audio handling leads; Claude and GPT models take text and images
- Budget-constrained or high-volume? Claude Haiku 5.5, GPT-6 Luna, and Gemini Flash models are the low-cost tiers
- Want open-weight flexibility? Hugging Face and Replicate provide access to thousands of models you can also self-host; see Open-Weight Models and Running One Locally
Your first API call
The fastest way to understand an AI API is to make one request and read the response. Each provider below takes the same shape of request: a model id, your input, and an output limit. Use the official SDK for your language; an orchestration framework is optional and easier to add later than to remove.
Last tested against the providers' documented request shapes in October 2026.
Before you start:
- Create an account and an API key in the provider's console: Claude Console, OpenAI Platform, or Google AI Studio.
- Store the key in an environment variable, never in your code:
ANTHROPIC_API_KEY,OPENAI_API_KEY, orGEMINI_API_KEY. - Install the SDK:
pip install anthropic,pip install openai, orpip install google-genai. TypeScript users can use@anthropic-ai/sdk,openai, and@google/genai. - Set a monthly spending limit in each console before you run anything in a loop.
Anthropic (Claude)
Claude's current model ids are claude-fable-5-1, claude-opus-5-5, claude-sonnet-5-5, and claude-haiku-5-5. Anthropic recommends starting with Opus 5.5 for most workloads. Thinking is always on for the current models; you control depth and cost with the effort setting (low to max, default medium on Opus 5.5).
import anthropic
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY from the environment
response = client.messages.create(
model="claude-opus-5-5",
max_tokens=16000,
output_config={"effort": "low"}, # low effort is plenty for a short summary
messages=[
{"role": "user", "content": "Summarize the three main risks in this plan: [paste plan]"}
],
)
for block in response.content:
if block.type == "text":
print(block.text)
The response's content is a list of blocks, so check each block's type before reading text. For high-volume, simple tasks, swap the model id for claude-haiku-5-5.
OpenAI (GPT)
OpenAI's API model ids are reported as gpt-6-astra, gpt-6-sol, and gpt-6-luna; confirm the exact strings on OpenAI's models page before you ship, because this snapshot could not check them against OpenAI's own documentation. The Responses API is OpenAI's current general-purpose endpoint.
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY from the environment
response = client.responses.create(
model="gpt-6-sol",
input="Summarize the three main risks in this plan: [paste plan]",
)
print(response.output_text)
Google (Gemini)
Google's frontier model is available in the paid API as gemini-4-argon. For free-tier experiments, use a Flash model id from Google's model list instead, since Argon is not on the free plan.
from google import genai
client = genai.Client() # reads GEMINI_API_KEY from the environment
response = client.models.generate_content(
model="gemini-4-argon",
contents="Summarize the three main risks in this plan: [paste plan]",
)
print(response.text)
Plain HTTP
Every SDK wraps a plain HTTPS request, which is useful for shell scripts, languages without an official SDK, or no-code tools that can call a URL. Here is the Anthropic request with curl:
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 16000,
"messages": [
{"role": "user", "content": "Summarize the three main risks in this plan: [paste plan]"}
]
}'
What to check after your first call
Read the usage numbers. Every response reports input and output tokens. Multiply by the model's per-million price to see what the call cost, and you will quickly develop a feel for which tasks are cheap and which are not.
Handle errors deliberately. Rate limits (HTTP 429) and server errors (5xx) are worth retrying with exponential backoff; the official SDKs retry a few times by default. Bad requests (400) and authentication errors (401) will not fix themselves, so log them and stop.
Treat model output as untrusted input. If your code acts on what the model returns, such as writing files, sending email, or running SQL, validate it first. Structured outputs and tool definitions with strict schemas make validation easier.
Then add one capability at a time. Tool use (letting the model call your functions), web search, prompt caching, and batch processing are all features of the same request. Build Your First Agent takes this call and turns it into an agent loop.
AI APIs & SDKs
Core APIs for integrating AI capabilities into your applications.
OpenAI API
- Link: platform.openai.com
- Description: API for the GPT-6 family (Astra, Sol, Luna, plus GPT-6.1 Sol), image generation, speech-to-text, and text-to-speech. At DevDay (September 29, 2026) OpenAI also added computer use to its Agents API.
- Pricing: Pay-per-use; check OpenAI pricing for current rates
- Best for: General AI applications, chatbots, content generation, code assistance, agentic workflows
- Key features: GPT-6 model tiers, the Responses API, function calling, structured outputs, image and speech models, fine-tuning, batch processing
- SDKs: Python, Node.js, Go, .NET, Java, official libraries
Anthropic API (Claude)
- Link: platform.claude.com
- Description: API access to Claude Fable 5.1, Opus 5.5, Sonnet 5.5, and Haiku 5.5, all with a 1M-token context window and 128K-token maximum output.
- Pricing: Pay-per-use from $0.10/$0.50 per million tokens (Haiku 5.5) to $10/$50 (Fable 5.1); web search is billed at $10 per 1,000 searches
- Best for: Long-form content, analysis, coding, agents, and long-running agentic work
- Key features: Adaptive thinking with an effort setting, tool use, web search and fetch, code execution, prompt caching, batch processing, Agent Skills, an MCP connector, and Managed Agents (Anthropic hosts the agent loop and sandbox)
- SDKs: Official SDKs for Python, TypeScript, Java, Go, Ruby, C#, and PHP, plus the separate Claude Agent SDK (the Claude Code harness as a library)
Google AI API (Gemini)
- Link: ai.google.dev
- Description: Google's multimodal AI models with competitive pricing and performance.
- Pricing: Free tier available for some models; see Gemini API pricing for current rates (Gemini 3.8 Flash is the low-cost tier; Gemini 4 Argon is the paid frontier tier, at an introductory $2/$10 per million input/output tokens until November 30, 2026, then $4/$20)
- Best for: Multimodal applications, Google ecosystem integration, cost-effective solutions
- Key features: Multimodal inputs, competitive pricing, function calling, long context
- SDKs: Python, Node.js, Go, Swift, Dart, Android, REST API
Hugging Face API
- Link: huggingface.co/inference-api
- Description: Access to thousands of open-source models via unified API.
- Pricing: Free tier, Pro ($9/month), Enterprise (custom)
- Best for: Open-source models, specialized tasks, model experimentation
- Key features: 150K+ models, custom model deployment, AutoTrain, datasets integration
- SDKs: Python (transformers), JavaScript, curl/REST
Cohere API
- Link: cohere.ai
- Description: Enterprise-focused NLP API with multilingual capabilities and enterprise features.
- Pricing: Free tier, usage-based pricing, enterprise plans available
- Best for: Enterprise NLP, multilingual applications, semantic search, classification
- Key features: Command models, Embed models, Rerank, multilingual support, enterprise security
- SDKs: Python, Node.js, Go, Java, curl/REST
Replicate API
- Link: replicate.com
- Description: Run and scale AI models in the cloud with simple API access.
- Pricing: Pay-per-second of compute time, no monthly fees
- Best for: Image/video generation, specialized models, cost-effective scaling
- Key features: Thousands of models, custom model deployment, automatic scaling, no infrastructure management
- SDKs: Python, Node.js, Go, REST API
Frameworks & Libraries
Development frameworks for building AI-powered applications. Frameworks save time on complex retrieval and multi-agent systems, but they add a layer between you and the provider's API. For a single call or a simple tool-use loop, the official SDKs (including the Anthropic SDK's tool runner) are usually enough.
LangChain
- Link: langchain.com | GitHub
- Description: Framework for developing applications with language models and external data sources.
- Pricing: Open source (free), LangSmith platform has usage-based pricing
- Best for: RAG applications, agent systems, complex AI workflows, chatbots
- Key features: Chain composition, document loading, vector stores, agents, memory, prompt templates
- Languages: Python, JavaScript/TypeScript, extensive ecosystem
LlamaIndex
- Link: llamaindex.ai | GitHub
- Description: Data framework for connecting custom data sources to large language models.
- Pricing: Open source (free), LlamaCloud has usage-based pricing
- Best for: RAG applications, document question-answering, knowledge base creation
- Key features: Data connectors, indexing strategies, query engines, chat engines, evaluation tools
- Languages: Python, TypeScript, growing ecosystem
Microsoft Agent Framework (successor to AutoGen and Semantic Kernel)
- Link: devblogs.microsoft.com/agent-framework
- Description: Microsoft's production framework for multi-agent systems, merging AutoGen's orchestration with Semantic Kernel's enterprise stability. AutoGen and Semantic Kernel are now in maintenance mode (bug fixes and security patches only); new projects should start here.
- Pricing: Open source (free)
- Best for: Multi-agent systems, automated workflows, collaborative AI agents, enterprise .NET/C# and Python integration
- Key features: Multi-agent conversations, code execution, group chat, human-in-the-loop, planners, plugins, memory, connectors
- Languages: Python, C#, growing community contributions
CrewAI
- Link: crewai.com | GitHub
- Description: Framework for orchestrating role-playing, autonomous AI agents for collaborative tasks.
- Pricing: Open source (free)
- Best for: Task automation, collaborative AI agents, business process automation
- Key features: Role-based agents, task delegation, process automation, tool integration
- Languages: Python
Haystack
- Link: haystack.deepset.ai
- Description: End-to-end framework for building search systems and question-answering applications.
- Pricing: Open source (free)
- Best for: Search applications, document question-answering, enterprise search
- Key features: Pipeline architecture, document stores, retrievers, readers, evaluation
- Languages: Python
Model Hosting & Deployment
Platforms for hosting, deploying, and scaling AI models in production.
Replicate
- Link: replicate.com
- Description: Cloud platform for running AI models with automatic scaling and simple API.
- Pricing: Pay-per-second compute, no monthly fees or infrastructure costs
- Best for: Model deployment without infrastructure management, cost-effective scaling
- Key features: Automatic scaling, version control, custom models, pre-built models, simple API
RunPod
- Link: runpod.io
- Description: GPU cloud platform optimized for AI workloads with serverless and dedicated options.
- Pricing: Serverless (pay-per-second), Secure Cloud (hourly), Community Cloud (competitive rates)
- Best for: GPU-intensive workloads, model training, cost-effective GPU access
- Key features: Serverless functions, Jupyter notebooks, template library, global infrastructure
Modal
- Link: modal.com
- Description: Serverless platform designed specifically for AI/ML workloads with Python focus.
- Pricing: Pay-per-second compute, generous free tier
- Best for: Python AI applications, batch processing, model inference, research
- Key features: Serverless functions, containers, distributed computing, automatic scaling
Together AI
- Link: together.ai
- Description: Platform for running and fine-tuning open-source models with competitive pricing.
- Pricing: Pay-per-token, competitive rates for open-source models
- Best for: Open-source model deployment, fine-tuning, cost-effective inference
- Key features: 50+ models, fine-tuning, inference API, model comparisons
Hugging Face Inference Endpoints
- Link: huggingface.co/inference-endpoints
- Description: Managed service for deploying Hugging Face models with automatic scaling.
- Pricing: Usage-based, starts at $0.032/hour for CPU, GPU options available
- Best for: Hugging Face model deployment, custom model hosting, auto-scaling
- Key features: Any Hugging Face model, auto-scaling, secure endpoints, monitoring
AWS SageMaker
- Link: aws.amazon.com/sagemaker
- Description: Fully managed machine learning platform for building, training, and deploying ML models.
- Pricing: Pay-per-use for compute, storage, and data processing
- Best for: Enterprise ML workflows, large-scale deployments, AWS ecosystem integration
- Key features: Model training, real-time inference, batch transform, model registry, monitoring
Vector Databases & Search
Specialized databases for storing and querying vector embeddings.
Pinecone
- Link: pinecone.io
- Description: Fully managed vector database optimized for machine learning applications.
- Pricing: Free tier (1M vectors), Starter ($70/month), Enterprise (custom)
- Best for: Production vector search, recommendation systems, semantic search
- Key features: Real-time updates, metadata filtering, hybrid search, high performance, managed service
Weaviate
- Link: weaviate.io
- Description: Open-source vector database with GraphQL API and ML model integration.
- Pricing: Open source (free), Weaviate Cloud Services (usage-based)
- Best for: Self-hosted solutions, complex queries, multi-modal search
- Key features: GraphQL API, automatic vectorization, multi-modal, hybrid search, open source
Chroma
- Link: trychroma.com
- Description: Open-source embedding database designed for AI applications.
- Pricing: Open source (free), hosted service in development
- Best for: Development and prototyping, Python/JavaScript applications
- Key features: Simple API, local development, metadata filtering, open source, active community
Qdrant
- Link: qdrant.tech
- Description: Vector search engine with advanced filtering and high performance.
- Pricing: Open source (free), Qdrant Cloud (usage-based)
- Best for: High-performance vector search, complex filtering requirements
- Key features: Advanced filtering, quantization, distributed deployment, REST and gRPC APIs
Milvus
- Link: milvus.io
- Description: Open-source vector database built for scalable similarity search.
- Pricing: Open source (free), Zilliz Cloud (managed service)
- Best for: Large-scale vector search, enterprise deployments, high availability
- Key features: Horizontal scaling, multiple index types, cloud-native, ACID compliance
Redis Vector Search
- Link: redis.io/docs/stack/search/reference/vectors
- Description: Vector search capabilities built into Redis for real-time applications.
- Pricing: Redis pricing model, Redis Cloud available
- Best for: Real-time applications, existing Redis users, low-latency search
- Key features: Real-time search, Redis ecosystem integration, high performance, familiar tooling
AI Development Platforms
Comprehensive platforms for AI development workflows.
Weights & Biases (W&B)
- Link: wandb.ai
- Description: Platform for ML experiment tracking, model versioning, and collaboration.
- Pricing: Free for personal use, Team ($20/user/month), Enterprise (custom)
- Best for: Experiment tracking, model registry, team collaboration, MLOps
- Key features: Experiment tracking, hyperparameter tuning, model registry, reports, artifacts
MLflow
- Link: mlflow.org
- Description: Open-source platform for managing ML lifecycle including experiments and deployment.
- Pricing: Open source (free), Databricks Managed MLflow (usage-based)
- Best for: ML lifecycle management, model versioning, experiment tracking
- Key features: Tracking, projects, models, registry, deployment, open source
Streamlit
- Link: streamlit.io
- Description: Framework for building and sharing machine learning web applications.
- Pricing: Open source (free), Streamlit Cloud (free for public apps), Enterprise (custom)
- Best for: ML app prototypes, data dashboards, model demos
- Key features: Python-first, rapid development, easy deployment, community cloud
Gradio
- Link: gradio.app
- Description: Library for creating web interfaces for machine learning models.
- Pricing: Open source (free), Hugging Face Spaces integration (free/paid tiers)
- Best for: Model demos, quick interfaces, sharing ML models
- Key features: Simple API, automatic interface generation, sharing capabilities, Hugging Face integration
LangSmith
- Link: smith.langchain.com
- Description: Platform for debugging, testing, and monitoring LLM applications.
- Pricing: Free tier, Plus ($39/month), Pro ($199/month), Enterprise (custom)
- Best for: LangChain applications, LLM debugging, production monitoring
- Key features: Tracing, evaluation, testing, monitoring, prompt management, LangChain integration
Development Tools & SDKs
Tools and libraries for AI application development.
OpenAI Libraries
- Python:
pip install openai - Node.js:
npm install openai - Description: Official SDKs with comprehensive API coverage and streaming support
- Best for: OpenAI API integration, type safety, streaming responses
Anthropic Libraries
- Python:
pip install anthropic - TypeScript:
npm install @anthropic-ai/sdk - Description: Official SDKs with async support and streaming capabilities
- Best for: Claude API integration, async operations, type safety
Transformers (Hugging Face)
- Python:
pip install transformers - Description: State-of-the-art machine learning library for natural language processing
- Best for: Model inference, fine-tuning, tokenization, local model deployment
Google Gen AI SDK
- Python:
pip install google-genai - JavaScript/TypeScript:
npm install @google/genai - Description: Google's official SDK for the Gemini API
- Best for: Gemini API integration, multimodal inputs
OpenAI Cookbook
- Link: github.com/openai/openai-cookbook
- Description: Example code and guides for using OpenAI API effectively
- Best for: Learning best practices, implementation examples, use case inspiration
Getting Started Guide
For Backend Developers
- Choose an API: Start with Anthropic, OpenAI, or Google, and make the first call above
- Stay close to the SDK: Use direct SDK calls and tool use first; add a framework such as LlamaIndex or LangGraph only when you need what it provides
- Add vector search if you need it: Integrate pgvector, Pinecone, or Chroma once your data outgrows the context window
- Deploy: Use Modal, Replicate, or your preferred cloud platform
For Frontend Developers
- Start with SDKs: Use official TypeScript/JavaScript SDKs
- Build interfaces: Try Streamlit or Gradio for quick prototypes
- Add streaming: Implement streaming responses for better UX
- Deploy: Use Vercel, Netlify, or similar platforms with API routes
For ML Engineers
- Experiment tracking: Set up Weights & Biases or MLflow
- Vector databases: Learn Pinecone or Weaviate for production deployments
- Model serving: Use RunPod, Modal, or SageMaker for model deployment
- Evaluation: Build evaluation sets from real failures, with LangSmith, Phoenix, or a custom harness
For Data Scientists
- Exploration: Use Jupyter notebooks with AI APIs for data analysis
- RAG systems: Build knowledge bases with LlamaIndex or LangChain
- Evaluation: Create benchmarks and evaluation metrics
- Visualization: Use Streamlit for interactive data applications
API Cost Optimization
Token Efficiency
- Prompt caching first: Put stable content (instructions, reference documents) at the start of the request and cache it; cached reads cost a fraction of normal input
- Effort before model: On Claude, try a lower effort setting on the same model before switching to a cheaper model
- Batch processing: Use batch APIs for work that can wait; Anthropic's runs at about half the normal cost
- Response limiting: Set output limits deliberately, but not so low that answers are cut off mid-thought
Model Selection
- Use appropriate models: Smaller, cheaper models for simple tasks (e.g., Haiku 5.5, Gemini 3.8 Flash, or GPT-6 Luna) and reserve frontier models (Fable 5.1, Opus 5.5, GPT-6 Astra, Gemini 4 Argon) for high-leverage reasoning. Judge cost per completed task, not per request: a cheap model that needs three retries is not cheap.
- Open-source alternatives: Consider Hugging Face models for cost-sensitive applications
- Local deployment: Host models locally for high-volume applications
Architecture Patterns
- Hybrid approaches: Combine multiple APIs and local models
- Preprocessing: Filter and prepare data before sending to APIs
- Fallback strategies: Implement graceful degradation with cheaper models
- Rate limiting: Implement proper rate limiting to avoid overage fees
Security Best Practices
API Key Management
- Use environment variables for API keys
- Implement key rotation policies
- Use different keys for development/production
- Monitor API key usage and set spending limits
Data Privacy
- Review each provider's data usage policies
- Consider self-hosted solutions for sensitive data
- Implement data anonymization where possible
- Use VPCs or private endpoints for enterprise deployments
Rate Limiting & Error Handling
- Implement exponential backoff for retries
- Handle rate limits gracefully
- Log errors appropriately (without exposing sensitive data)
- Monitor API usage and costs regularly
Prompt Injection
- Treat web pages, emails, and documents your app feeds to a model as untrusted; they can contain instructions aimed at the model
- Give tools the narrowest permissions that work, and require confirmation before irreversible actions
- Verify every MCP server before connecting it, and use read-only database users where you can
Next steps
- Continue to: Build Your First Agent to turn a single API call into an agent loop
- Continue to: RAG: How It Works & When to Use It for connecting a model to your own data
- Continue to: Open-Weight Models and Running One Locally for self-hosted alternatives
- Continue to: Build and Secure an MCP Server (2026-07-28 Spec) to expose your own tools to assistants