API Overview¶
stdapi.ai provides OpenAI and Anthropic compatible APIs backed by AWS Bedrock and AWS AI services. Any application that works with OpenAI or Anthropic works with stdapi.ai by simply changing the API endpoint.
Interactive Documentation¶
stdapi.ai provides multiple interfaces for exploring and testing the API—choose the one that fits your workflow:
Documentation Resources¶
- Complete API Reference – In-depth guides for every endpoint with parameter details
- OpenAPI Specification – Full machine-readable schema for integration and tooling
Live API Playground¶
When running the server, access these interactive interfaces (can be enabled via configuration options):
| Interface | URL | Best For |
|---|---|---|
| Swagger UI | http://localhost/docs |
Testing endpoints directly in your browser with live request/response examples |
| ReDoc | http://localhost/redoc |
Reading and searching through clean, organized documentation |
| OpenAPI Schema | http://localhost/openapi.json |
Generating client code or importing into API tools like Postman |
Supported Endpoints¶
OpenAI-Compatible API¶
| Category | Endpoint | Capability | Documentation |
|---|---|---|---|
| 💬 Chat | POST /v1/chat/completions |
Multi-modal conversations with text, images, video, documents | Chat Completions → |
POST /v1/responses |
Stateless conversational AI with tool calling and streaming | Responses → | |
| 🎨 Images | POST /v1/images/generations |
Text-to-image generation | Generations → |
POST /v1/images/edits |
Image editing and transformations | Edits → | |
POST /v1/images/variations |
Generate image variations | Variations → | |
| 🔊 Audio | POST /v1/audio/speech |
Text-to-speech synthesis | Text to Speech → |
POST /v1/audio/transcriptions |
Speech-to-text transcription | Transcriptions → | |
POST /v1/audio/translations |
Speech-to-English translation | Translations → | |
| 🧠 Embeddings | POST /v1/embeddings |
Vector embeddings for semantic search | Embeddings → |
| 📋 Models | GET /v1/models |
List available models | Models → |
| 📁 Files | POST/GET/DELETE /v1/files |
Upload, list, retrieve, download, delete files | Files → |
POST /v1/uploads |
Multipart upload sessions for large files | Files → |
stdapi.ai Native Extensions¶
| Category | Endpoint | Capability | Documentation |
|---|---|---|---|
| 🔍 Models | GET /search_models |
Search models by capability: modality, route, MCP tool, region, streaming, legacy status | Search Models → |
Anthropic-Compatible API¶
| Category | Endpoint | Capability | Documentation |
|---|---|---|---|
| 💬 Messages | POST /anthropic/v1/messages |
Multi-modal conversations with text, images, video, documents | Messages → |
POST /anthropic/v1/messages/count_tokens |
Count tokens without sending a message | Messages → | |
| 📋 Models | GET /anthropic/v1/models |
List available models | Models → |
GET /anthropic/v1/models/{model_id} |
Retrieve model details | Models → | |
| 📁 Files | POST/GET/DELETE /anthropic/v1/files |
Upload, list, retrieve, download, delete files | Files → |
MCP (Model Context Protocol)¶
When ENABLE_MCP_STREAMABLE_HTTP=true or ENABLE_MCP_SSE=true is configured, stdapi.ai exposes all its endpoints as MCP tools. The tool names follow the pattern provider_action.
JSON body support for file and audio tools
MCP tools send JSON bodies — they cannot construct multipart/form-data. All file upload, audio, and upload-part tools therefore accept the file or audio content as a base64 string, data URI (data:<mime>;base64,<data>), HTTPS URL, or S3 URI in the file / data field instead of a binary attachment. The full multipart upload workflow (openai_upload → openai_upload_part → openai_upload_complete) is fully MCP-compatible this way.
| MCP Tool | Endpoint |
|---|---|
| OpenAI Tools | |
openai_chat_completion |
POST /v1/chat/completions |
openai_response |
POST /v1/responses |
openai_image_generation |
POST /v1/images/generations |
openai_image_edit |
POST /v1/images/edits |
openai_image_variation |
POST /v1/images/variations |
openai_audio_speech |
POST /v1/audio/speech |
openai_audio_transcription |
POST /v1/audio/transcriptions |
openai_audio_translation |
POST /v1/audio/translations |
openai_embedding |
POST /v1/embeddings |
openai_model_list |
GET /v1/models |
openai_model_get |
GET /v1/models/{model} |
openai_file |
POST /v1/files |
openai_file_list |
GET /v1/files |
openai_files_get |
GET /v1/files/{file_id} |
openai_files_delete |
DELETE /v1/files/{file_id} |
openai_file_content |
GET /v1/files/{file_id}/content |
openai_upload |
POST /v1/uploads |
openai_upload_part |
POST /v1/uploads/{upload_id}/parts |
openai_upload_complete |
POST /v1/uploads/{upload_id}/complete |
openai_upload_cancel |
POST /v1/uploads/{upload_id}/cancel |
| Anthropic Tools | |
anthropic_message |
POST /anthropic/v1/messages |
anthropic_message_count_tokens |
POST /anthropic/v1/messages/count_tokens |
anthropic_model_list |
GET /anthropic/v1/models |
anthropic_model_get |
GET /anthropic/v1/models/{model_id} |
anthropic_file |
POST /anthropic/v1/files |
anthropic_file_list |
GET /anthropic/v1/files |
anthropic_files_get |
GET /anthropic/v1/files/{file_id} |
anthropic_files_delete |
DELETE /anthropic/v1/files/{file_id} |
anthropic_file_content |
GET /anthropic/v1/files/{file_id}/content |
| Native Extension Tools | |
search_models |
GET /search_models |
Filtering MCP Tools
Use MCP_INCLUDE_TOOLS or MCP_EXCLUDE_TOOLS environment variables to control which tools are exposed. Always include search_models so agents can discover the right model ID dynamically. See Operations Configuration → for details.
Token Usage for Complex API Tools
anthropic_message, openai_chat_completion, and openai_response map to large, complex APIs that may use many tokens (prompt, completion, and tool definitions). Select these tools only if your workflow requires the full API capabilities.
Using stdapi.ai¶
stdapi.ai is a drop-in replacement for both OpenAI and Anthropic APIs. Any application that works with either provider—chatbots, coding assistants, automation tools, custom scripts—works with stdapi.ai by simply changing the API base URL.
Using the OpenAI-Compatible API¶
To connect your OpenAI application:
- Replace the OpenAI API URL with your stdapi.ai deployment URL
- Use the same authentication mechanism (Bearer token in the
Authorizationheader) - Use AWS Bedrock model IDs (e.g.,
amazon.nova-micro-v1:0) or any configured model alias
That's it. Your application continues to work without any code changes—just point it to stdapi.ai instead of OpenAI.
Using the Anthropic-Compatible API¶
To connect your Anthropic application:
- Replace the Anthropic API URL (
https://api.anthropic.com) with your stdapi.ai deployment URL +/anthropic(e.g.,https://your-endpoint.com/anthropic) - Use the same authentication mechanism (
x-api-keyheader andanthropic-versionheader) - Use your preferred model name — official Anthropic names (e.g.,
claude-opus-4-6) are automatically resolved to Bedrock IDs, or use Bedrock model IDs directly
Your Anthropic SDK applications continue to work without any code changes—just point them to stdapi.ai instead of Anthropic.
Next Steps¶
- Chat Completions — Conversational AI with multi-modal support
- Images — Generation, edits, and variations
- Audio — Text-to-speech, transcription, and translation
- Embeddings — Vector embeddings for search and RAG
- Models — List and discover available models
- Search Models — Filter models by capability, modality, route, or MCP tool
- Messages — Anthropic-compatible conversational AI with tool calling
- Features — Full capabilities and AWS integrations
- Getting Started — Deploy to AWS with Terraform
- Use Cases — Integration examples with popular tools