API Overview¶
stdapi.ai provides OpenAI-, Anthropic-, and Cohere-compatible APIs backed by Amazon Bedrock and AWS AI services. Any application that works with OpenAI, Anthropic, or Cohere works with stdapi.ai by simply changing the API endpoint.
One catalog, discovered automatically
Amazon Bedrock, Bedrock Mantle, Amazon Polly, Amazon Transcribe and Amazon Comprehend all surface as models in a single catalog. stdapi.ai discovers them from your AWS account at startup — there is no model list to declare or maintain, and a model AWS adds appears without a configuration change. They are interchangeable by name on a shared endpoint: GET /v1/models lists them together, GET /search_models filters them by capability, and the endpoint routes to whichever AWS service backs the model you named — POST /v1/audio/transcriptions reaches Amazon Transcribe or a Bedrock audio model, and POST /v1/moderations reaches Bedrock Guardrails or Amazon Comprehend, from the same request, and the Models page shows the whole catalogue with prices and scores.
Attachments, however large
Every multimodal route takes its images, documents, audio and video as base64, a data URI, an HTTPS URL, an s3:// URI or a Files API ID. On chat completions, messages and responses served by Amazon Bedrock — Bedrock Mantle models excepted — an attachment past what the chosen model reads inside a request is delivered by reference instead, with no change to the request, wherever that model reads that kind of attachment from storage; the models that read it inline only refuse it with 413, stating the size they accept. See Attachment Size.
Documentation & Tooling¶
stdapi.ai provides multiple resources for exploring and testing the API—choose the one that fits your workflow:
Documentation Resources¶
- Per-endpoint guides – The pages in this section (linked from the endpoint tables below) with parameter details, feature tables, and examples
- API Reference – Browsable rendering of the full OpenAPI specification (request/response schemas for every endpoint)
- 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 → |
GET /v1/chat/completions | List stored chat completions | Chat Completions → | |
GET/POST/DELETE /v1/chat/completions/{id} | Retrieve, update metadata, or delete a stored chat completion | Chat Completions → | |
GET /v1/chat/completions/{id}/messages | List the messages of a stored chat completion | Chat Completions → | |
POST /v1/completions | Simple prompt-to-text completion — recommended for MCP and text-only agents | Completions → | |
POST /v1/responses | Conversational AI with tool calling, streaming, and server-side storage | Responses → | |
POST /v1/responses/input_tokens | Count input tokens without generating a response | Responses → | |
POST /v1/responses/compact | Compact a conversation into a reusable summary item | Responses → | |
GET/DELETE /v1/responses/{id} | Retrieve or delete stored responses | Responses → | |
POST /v1/responses/{id}/cancel | Cancel a background response | Responses → | |
GET /v1/responses/{id}/input_items | List the input items of a stored response | Responses → | |
| 💬 Conversations | POST /v1/conversations | Create a conversation holding multi-turn state | Conversations → |
GET/POST/DELETE /v1/conversations/{id} | Retrieve, update the metadata of, or delete a conversation | Conversations → | |
GET/POST /v1/conversations/{id}/items | List or add conversation items | Conversations → | |
GET/DELETE /v1/conversations/{id}/items/{item_id} | Retrieve or delete one conversation item | Conversations → | |
| 🎨 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 → | |
| 🎬 Videos | POST/GET/DELETE /v1/videos | Asynchronous text/image-to-video generation jobs | Videos → |
GET /v1/videos/{id}/content | Download generated video content | Videos → | |
| 🔊 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 → | |
| 🎙️ Realtime | POST /v1/realtime/client_secrets | Mint a short-lived client secret carrying a session configuration | Realtime → |
WS /v1/realtime | Live, bidirectional speech-to-speech session | Realtime → | |
| 🧠 Embeddings | POST /v1/embeddings | Vector embeddings for semantic search | Embeddings → |
| 🛡️ Moderations | POST /v1/moderations | Content safety classification via Bedrock Guardrails or Amazon Comprehend | Moderations → |
| 📋 Models | GET /v1/models | List available models | Models → |
GET /v1/models/{model} | Retrieve details for one model | Models → | |
| 📁 Files | POST/GET/DELETE /v1/files | Upload, list, retrieve, download, delete files | Files → |
POST /v1/uploads | Multipart upload sessions for large files | Files → | |
POST /v1/uploads/{id}/parts, …/complete, …/cancel | Add parts to, complete, or cancel an upload session | Files → | |
| 🔎 Vector Stores | POST/GET/DELETE /v1/vector_stores | Create, list, retrieve, update, delete a searchable file collection | Vector Stores → |
POST /v1/vector_stores/{id}/search | Search the indexed files by meaning | Vector Stores → | |
POST/GET/DELETE /v1/vector_stores/{id}/files, …/file_batches | Attach, list, read and detach the indexed files | Vector Stores → | |
| 📦 Batches | POST/GET /v1/batches | Run a file of requests asynchronously at the batch price | Batches → |
POST /v1/batches/{id}/cancel | Cancel a running batch | Batches → |
stdapi.ai Native Extensions¶
| Category | Endpoint | Capability | Documentation |
|---|---|---|---|
| 🔍 Models | GET /search_models | Search models by capability: modality, route, MCP tool, region, streaming, batch, legacy status | Search Models → |
| 💰 Pricing | GET /model_pricing | Exact AWS unit prices per model: tokens, tiers, cache TTLs, routing, media specs | Model Pricing → |
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 → |
| 📦 Batches | POST/GET/DELETE /anthropic/v1/messages/batches | Run many message requests asynchronously at the batch price | Message Batches → |
GET /anthropic/v1/messages/batches/{id}/results | Stream a finished batch's results as JSONL | Message Batches → | |
POST /anthropic/v1/messages/batches/{id}/cancel | Cancel a processing batch | Message Batches → |
Cohere-Compatible API¶
| Category | Endpoint | Capability | Documentation |
|---|---|---|---|
| 🔀 Rerank | POST /cohere/v2/rerank | Rank documents by semantic relevance to a query | Rerank → |
POST /cohere/v1/rerank | Legacy v1 rerank for older SDKs and tools | Rerank → | |
| 🧠 Embeddings | POST /cohere/v2/embed | Vector embeddings for semantic search | Embed → |
POST /cohere/v1/embed | Legacy v1 embed for older SDKs and tools | Embed → |
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. OpenAI-, Anthropic-, and Cohere-compatible tool names follow the pattern provider_action; the native extension tools use their bare names (search_models, model_pricing).
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 — as do the video generation tool's input_reference image, the moderation tool's image_url input, and the openai_image_edit/openai_image_variation tools' image inputs (also accepting a bare string in any of these forms, plus a Files API file ID). The full multipart upload workflow (openai_upload → openai_upload_part → openai_upload_complete) is fully MCP-compatible this way.
What the file, video, and audio tools return
An MCP tool result carries text, an image, or audio — never an arbitrary binary stream. Endpoints that answer with bytes therefore adapt to what the protocol can hold: text content comes back as text, an image as an image, and generated speech as audio when stream_format is set to audio. Anything else — a video, a PDF or archive read back through openai_file_content or anthropic_file_content, and any payload above 3 MB — comes back as a small JSON object holding the media type and the url to download it from over HTTP, so an agent is told where the result is rather than handed bytes it cannot use.
| MCP Tool | Endpoint |
|---|---|
| OpenAI Tools | |
openai_chat_completion | POST /v1/chat/completions |
openai_chat_completion_list | GET /v1/chat/completions |
openai_chat_completion_get | GET /v1/chat/completions/{completion_id} |
openai_chat_completion_update | POST /v1/chat/completions/{completion_id} |
openai_chat_completion_delete | DELETE /v1/chat/completions/{completion_id} |
openai_chat_completion_messages | GET /v1/chat/completions/{completion_id}/messages |
openai_completion | POST /v1/completions |
openai_response | POST /v1/responses |
openai_response_input_tokens | POST /v1/responses/input_tokens |
openai_response_compact | POST /v1/responses/compact |
openai_response_get | GET /v1/responses/{response_id} |
openai_response_delete | DELETE /v1/responses/{response_id} |
openai_response_cancel | POST /v1/responses/{response_id}/cancel |
openai_response_input_items | GET /v1/responses/{response_id}/input_items |
openai_conversation | POST /v1/conversations |
openai_conversation_get | GET /v1/conversations/{conversation_id} |
openai_conversation_update | POST /v1/conversations/{conversation_id} |
openai_conversation_delete | DELETE /v1/conversations/{conversation_id} |
openai_conversation_items | POST /v1/conversations/{conversation_id}/items |
openai_conversation_items_list | GET /v1/conversations/{conversation_id}/items |
openai_conversation_item_get | GET /v1/conversations/{conversation_id}/items/{item_id} |
openai_conversation_item_delete | DELETE /v1/conversations/{conversation_id}/items/{item_id} |
openai_image_generation | POST /v1/images/generations |
openai_image_edit | POST /v1/images/edits |
openai_image_variation | POST /v1/images/variations |
openai_video_generation | POST /v1/videos |
openai_video_list | GET /v1/videos |
openai_video_get | GET /v1/videos/{video_id} |
openai_video_content | GET /v1/videos/{video_id}/content |
openai_video_delete | DELETE /v1/videos/{video_id} |
openai_audio_speech | POST /v1/audio/speech |
openai_audio_transcription | POST /v1/audio/transcriptions |
openai_audio_translation | POST /v1/audio/translations |
openai_realtime_client_secret | POST /v1/realtime/client_secrets |
openai_embedding | POST /v1/embeddings |
openai_moderation | POST /v1/moderations |
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_vector_store_create | POST /v1/vector_stores |
openai_vector_store_list | GET /v1/vector_stores |
openai_vector_store_get | GET /v1/vector_stores/{vector_store_id} |
openai_vector_store_update | POST /v1/vector_stores/{vector_store_id} |
openai_vector_store_delete | DELETE /v1/vector_stores/{vector_store_id} |
openai_vector_store_search | POST /v1/vector_stores/{vector_store_id}/search |
openai_vector_store_file_create | POST /v1/vector_stores/{vector_store_id}/files |
openai_vector_store_file_list | GET /v1/vector_stores/{vector_store_id}/files |
openai_vector_store_file_get | GET /v1/vector_stores/{vector_store_id}/files/{file_id} |
openai_vector_store_file_update | POST /v1/vector_stores/{vector_store_id}/files/{file_id} |
openai_vector_store_file_delete | DELETE /v1/vector_stores/{vector_store_id}/files/{file_id} |
openai_vector_store_file_content | GET /v1/vector_stores/{vector_store_id}/files/{file_id}/content |
openai_vector_store_file_batch_create | POST /v1/vector_stores/{vector_store_id}/file_batches |
openai_vector_store_file_batch_get | GET /v1/vector_stores/{vector_store_id}/file_batches/{batch_id} |
openai_vector_store_file_batch_cancel | POST /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel |
openai_vector_store_file_batch_file_list | GET /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files |
openai_batch | POST /v1/batches |
openai_batch_list | GET /v1/batches |
openai_batch_get | GET /v1/batches/{batch_id} |
openai_batch_cancel | POST /v1/batches/{batch_id}/cancel |
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 |
anthropic_message_batch | POST /anthropic/v1/messages/batches |
anthropic_message_batch_list | GET /anthropic/v1/messages/batches |
anthropic_message_batch_get | GET /anthropic/v1/messages/batches/{message_batch_id} |
anthropic_message_batch_results | GET /anthropic/v1/messages/batches/{message_batch_id}/results |
anthropic_message_batch_cancel | POST /anthropic/v1/messages/batches/{message_batch_id}/cancel |
anthropic_message_batch_delete | DELETE /anthropic/v1/messages/batches/{message_batch_id} |
| Cohere Tools | |
cohere_rerank | POST /cohere/v2/rerank |
cohere_rerank_v1 | POST /cohere/v1/rerank |
cohere_embed | POST /cohere/v2/embed |
cohere_embed_v1 | POST /cohere/v1/embed |
| Native Extension Tools | |
search_models | GET /search_models |
model_pricing | GET /model_pricing |
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 speaks the OpenAI, Anthropic, and Cohere APIs unchanged. Any application built on one of them—chatbots, coding assistants, automation tools, custom scripts—runs against stdapi.ai once you point it at your deployment's base URL and give it that deployment's API key. The model name usually stays as it is, and changes only where it differs.
That is because the Anthropic, OpenAI and Cohere models Bedrock serves are also published under the names their providers use, derived mechanically from the Bedrock identifier rather than curated by hand: anthropic.claude-opus-5 answers to claude-opus-5, openai.gpt-5.6-sol to gpt-5.6-sol, openai.gpt-oss-120b-1:0 to gpt-oss-120b, cohere.embed-english-v3 to embed-english-v3.0, cohere.rerank-v3-5:0 to rerank-v3.5. A client already asking for one of those names needs no model change at all. Where a name does differ — a model from another provider, or one named for a provider this deployment does not serve — MODEL_ALIASES publishes a served model under the name your application already sends.
What the base URL buys is the catalogue behind it. A model name is resolved against the catalogue your deployment actually serves — Amazon Bedrock, Bedrock Mantle, Polly, Transcribe and Comprehend, across every region you enable — so the choice spans providers instead of one vendor's list. A name the catalogue does not contain is answered with 404: it is never mapped onto another vendor's model of roughly similar class, because that would serve you a different model than the one you asked for. Use GET /search_models to find one.
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) - Check the model name against what this deployment serves — OpenAI's own names for the models Bedrock offers (e.g.,
gpt-5.6-sol,gpt-oss-120b) resolve as they stand, as do Bedrock model IDs (e.g.,amazon.nova-micro-v1:0) and any configured alias. A name Bedrock does not serve, such asgpt-4oordall-e-3, returns404until you alias it onto one it does
That's it: the rest of the OpenAI SDK call is unchanged.
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) - Check the model name against what this deployment serves — official Anthropic names (e.g.,
claude-opus-5) resolve to their Bedrock IDs automatically, or use Bedrock model IDs directly
Anthropic names resolving on their own makes the base URL the only change for most applications — the same mechanism that resolves OpenAI's names on the surface above. A Claude version Bedrock no longer serves returns 404 rather than a substitute, so name a current one.
Using the Cohere-Compatible API¶
To connect your Cohere application:
- Replace the Cohere API URL (
https://api.cohere.com) with your stdapi.ai deployment URL +/cohere(e.g.,https://your-endpoint.com/cohere) - Use the same authentication mechanism (Bearer token in the
Authorizationheader) - Check the model name against what this deployment serves — Cohere's own names for the models Bedrock offers (e.g.,
embed-english-v3.0,embed-v4.0,rerank-v3.5) resolve as they stand, as do Bedrock model IDs (e.g.,cohere.rerank-v3-5:0,cohere.embed-v4:0) and any configured alias. A Cohere model Bedrock does not serve, such asembed-english-light-v3.0, returns404until you alias it onto one it does
That's it: your Cohere rerank and embed integrations are otherwise unchanged.
Next Steps¶
- Chat Completions — Conversational AI with multi-modal support
- Images — Generation, edits, and variations
- Videos — Asynchronous text/image-to-video generation
- Audio — Text-to-speech, transcription, and translation
- Embeddings — Vector embeddings for search and RAG
- Rerank — Cohere-compatible document reranking for search and RAG
- Models — List and discover available models
- Models — Every model served, with modalities, regions, AWS prices and leaderboard scores
- Search Models — Filter models by capability, modality, route, or MCP tool
- Model Pricing — Exact AWS unit prices for cost-aware model selection
- 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
- Cost Management — Model, infrastructure, and license costs, and per-request cost estimation
- Contact — Technical questions, sales, and private offers