OpenAI compatible

OpenAI-compatible API

Change two lines. Keep the SDK. Call the world’s most advanced language, image, and video models.

from openai import OpenAI
client = OpenAI(
  api_key="sk-ama-YOUR_KEY",
  base_url="https://api.aimodelapi.ai/v1",
)
curl · OpenAI compatible
curl https://api.aimodelapi.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-ama-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"ping"}]}'

POST /v1/chat/completions, GET /v1/models, streaming SSE, and tool calls are compatible. Image/video use the paths in the docs. Word/PPT/Excel files are written by the client (or its Office plugin); the gateway does not return a .docx download.