Skip to content

API Overview

stdapi.ai provides OpenAI-, Anthropic-, Cohere- and Ollama-compatible APIs backed by Amazon Bedrock and AWS AI services. Any application that works with OpenAI, Anthropic, Cohere or Ollama works with stdapi.ai by simply changing the API endpoint. Every AWS service behind those endpoints — Amazon Bedrock, Bedrock Mantle, Amazon Polly, Amazon Transcribe and Amazon Comprehend — surfaces as models in a single catalog, discovered from your AWS account at startup.

Supported Endpoints

OpenAI 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 →
POST /v1/realtime/calls WebRTC call from an SDP offer, gateway-terminated media (opt-in) Realtime →
POST /v1/realtime/calls/{call_id}/hangup End an active WebRTC call 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 →
📊 Usage GET /v1/organization/usage/completions, …/embeddings, …/moderations, …/images, …/audio_speeches, …/audio_transcriptions, …/web_search_calls, …/file_search_calls, …/vector_stores, …/code_interpreter_sessions Consumption in time buckets, grouped by model, endpoint, key or user Organization Usage →
GET /v1/organization/costs Spend in time buckets, in your AWS partition's currency Organization Usage →

The usage endpoints are an administrator surface

/v1/organization/... reports the whole deployment's consumption and spend, so it is disabled by default — enable it with USAGE_API and read it with the deployment's own API key, or a token carrying every scope in USAGE_API_ADMIN_SCOPES. The retired GET /v1/usage endpoint is not served: it is absent from OpenAI's current API surface and from the openai SDK.

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 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 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 →

Ollama Ollama-Compatible API

Category Endpoint Capability Documentation
💬 Chat POST /ollama/api/chat Conversational responses with tools, images and thinking Chat →
✍️ Generate POST /ollama/api/generate A response for a single prompt Generate →
🧠 Embeddings POST /ollama/api/embed Vector embeddings for one or several inputs Embed →
POST /ollama/api/embeddings Legacy single-prompt embedding for older clients Embed →
📋 Models GET /ollama/api/tags List the models this deployment serves Models →
POST /ollama/api/show A model's details and capabilities Models →
GET /ollama/api/ps Models loaded in memory — always empty, nothing is resident Models →
GET /ollama/api/version The Ollama API version this deployment is compatible with Models →
POST /ollama/api/pull Confirm a model is available for use Models →
GET /ollama Answers Ollama is running, the base-URL connection test Models →

Responses stream as newline-delimited JSON, the transport Ollama clients expect. The model management verbs that write to a local model store — create, copy, push, delete and the /api/blobs/{digest} upload — are refused with 403, since this deployment stores no models of its own.

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 above) 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

MCP (Model Context Protocol)

When ENABLE_MCP_STREAMABLE_HTTP=true or ENABLE_MCP_SSE=true is configured, stdapi.ai exposes its endpoints as MCP tools. OpenAI-, Anthropic-, Cohere-, and Ollama-compatible tool names follow the pattern provider_action; the native extension tools use their bare names (search_models, model_pricing).

Ten operations are held back, because a tool schema for a call that can never succeed would only mislead an agent. ollama_create, ollama_copy, ollama_push, ollama_delete and ollama_blob_push always refuse, since this deployment stores no models. The five WebRTC call operations — openai_realtime_call_create, openai_realtime_call_accept, openai_realtime_call_reject, openai_realtime_call_refer and openai_realtime_call_hangup — are held back too: an MCP agent has no peer connection to hold. Name one in MCP_INCLUDE_TOOLS to publish it anyway.

The ten openai_organization_usage_* tools appear only while both USAGE_API and CLOUDWATCH_METRICS are enabled, and openai_organization_costs also needs COST_TRACKING. Without those settings every one of those calls answers 503, so a deployment that has not enabled them spends no context window on their schemas.

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
Ollama Tools
ollama_chat POST /ollama/api/chat
ollama_generate POST /ollama/api/generate
ollama_embed POST /ollama/api/embed
ollama_embeddings POST /ollama/api/embeddings
ollama_tags GET /ollama/api/tags
ollama_show POST /ollama/api/show
ollama_ps GET /ollama/api/ps
ollama_version GET /ollama/api/version
ollama_pull POST /ollama/api/pull
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 HTTP Server and MCP → MCP 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, Cohere and Ollama 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.

Anywhere a request accepts a model name, it also accepts a glob pattern — claude-sonnet-*, say — and the server serves the most recently released model that matches. The response always names the concrete model that served the request, never the pattern. See Model Wildcard Patterns for the syntax and its rules, and GET /search_models to see everything a pattern matches before relying on it.

On every API, a parameter the model provider rejects returns 400 with the provider's own message.

OpenAI Using the OpenAI-Compatible API

To connect your OpenAI application:

  1. Replace the OpenAI API URL with your stdapi.ai deployment URL
  2. Use the same authentication mechanism (Bearer token in the Authorization header)
  3. 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 as gpt-4o or dall-e-3, returns 404 until you alias it onto one it does

That's it: the rest of the OpenAI SDK call is unchanged.

A malformed request is refused the way the same OpenAI endpoint refuses it, so client code that branches on the error keeps working. Most endpoints — Chat Completions, Responses, Images, Batches, Vector Stores, Conversations, Videos — name the offending parameter in error.param (e.g., messages[0].content) and the failure in error.code (unknown_parameter, missing_required_parameter, invalid_type, invalid_value, or a range code such as integer_below_min_value). Moderations, Audio, Embeddings, Files and Uploads word the message as OpenAI does on those endpoints and mostly leave both null — Moderations and Audio relay the validator's list of faults, capped at the first 20. As OpenAI does, a refused speech response_format or instructions and a refused Files or Uploads purpose still name the parameter.

Anthropic Using the Anthropic-Compatible API

To connect your Anthropic application:

  1. Replace the Anthropic API URL (https://api.anthropic.com) with your stdapi.ai deployment URL + /anthropic (e.g., https://your-endpoint.com/anthropic)
  2. Use the same authentication mechanism (x-api-key header and anthropic-version header)
  3. 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.

A malformed request is refused in Anthropic's wording, the field then the reason (e.g., messages.0.content: Field required).

Cohere Using the Cohere-Compatible API

To connect your Cohere application:

  1. Replace the Cohere API URL (https://api.cohere.com) with your stdapi.ai deployment URL + /cohere (e.g., https://your-endpoint.com/cohere)
  2. Use the same authentication mechanism (Bearer token in the Authorization header)
  3. 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 as embed-english-light-v3.0, returns 404 until you alias it onto one it does

That's it: your Cohere rerank and embed integrations are otherwise unchanged.

Ollama Using the Ollama-Compatible API

To connect your Ollama application:

  1. Replace the Ollama host (http://localhost:11434) with your stdapi.ai deployment URL + /ollama (e.g., https://your-endpoint.com/ollama) — mainstream Ollama clients accept a path in their configured host, so the /api/* endpoints keep working unchanged
  2. Send the deployment's API key as a Bearer token in the Authorization header; a local Ollama needs no credentials, so this is the one setting an existing client may not already have
  3. Pick a model from GET /api/tags — the names a model was pulled under locally (llama3.2:3b) are not served here, and /api/tags is where a client discovers what is, the same way it does against Ollama itself

Everything else is unchanged: the same request bodies, the same newline-delimited JSON streams, the same response fields.

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