Try the OpenAI-Compatible API
Test AI Commons OpenAI-compatible endpoints in your browser. Enter the Base URL and API key
shown under Settings → API Keys; the Base URL already includes /v1.
GET /models
Retrieve the direct Bedrock model IDs and OpenAI-compatible aliases available to your account.
Endpoint Details
- Method: GET
- Path:
/models - Authentication:
Authorization: Bearer <api-key>
Example Response (Abbreviated)
{
"object": "list",
"data": [
{
"id": "claude-v5-sonnet",
"object": "model",
"created": 1789051979,
"owned_by": "bedrock"
},
{
"id": "gpt-4o",
"object": "model",
"created": 1789051979,
"owned_by": "openai-alias"
}
]
}
See the complete model response and current supported IDs in the OpenAI API reference.
POST /chat/completions
Create an OpenAI-compatible chat completion.
Endpoint Details
- Method: POST
- Path:
/chat/completions - Authentication:
Authorization: Bearer <api-key> - Content-Type:
application/json
Example Request
{
"model": "claude-v5-sonnet",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"temperature": 0.7,
"max_tokens": 1000
}
Example Response
{
"id": "chatcmpl-01JXYZ123456789ABCDEFGH",
"object": "chat.completion",
"created": 1789051979,
"model": "claude-v5-sonnet",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 9,
"total_tokens": 21
}
}
Troubleshooting
CORS Error
Your API key may restrict browser origins. Add this documentation site's origin in the API Keys settings or contact your administrator.
401 Unauthorized
Confirm that the API key is valid and that the request uses the Authorization: Bearer header.
404 Not Found
Verify that the Base URL is copied from Settings → API Keys and includes the deployment path, typically /v1.
Network Error
Ensure the endpoint is reachable and your network permits outbound requests to it.