MIAAI Proxy
AI Proxy
Native APIs
Get startedMarkdown ↗

Native APIs

Use native API formats and SDKs with your MIA API key.

Choose an API

Open a model in Explore and check API support. Choose View account rates, then select an API in Quickstart when a selector is available. Use its model ID, URL, and parameters. If the API you need is not shown, contact MIA to confirm support.

Support is specific to the model and operation; a native API format does not imply support for every feature in a provider's API.

API SDK base URL Authentication Reference
OpenAI https://mia-ai-proxy-sit.ambr.io/v1 Authorization: Bearer Chat Completions, Responses
Anthropic https://mia-ai-proxy-sit.ambr.io x-api-key Messages
Google Gen AI https://mia-ai-proxy-sit.ambr.io, API version v1beta x-goog-api-key Google API

Use the MIA key as the SDK's API key. The Anthropic and Google SDKs add their API version paths; their base URL is the origin above. HTTP requests can also use Authorization: Bearer YOUR_API_KEY.

OpenAI SDK

Install openai. Set MIA_MODEL to a model that supports Responses.

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MIA_API_KEY"],
    base_url="https://mia-ai-proxy-sit.ambr.io/v1",
    max_retries=0,
)
response = client.responses.create(
    model=os.environ["MIA_MODEL"], input="Hello", store=False,
)
print(response.output_text)

For Chat Completions, use the Quickstart.

Anthropic SDK

Install anthropic. Set MIA_MODEL to a model that supports Messages.

Python
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["MIA_API_KEY"],
    base_url="https://mia-ai-proxy-sit.ambr.io",
    max_retries=0,
)
response = client.messages.create(
    model=os.environ["MIA_MODEL"],
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.content)

Google Gen AI SDK

Install google-genai. Set MIA_GOOGLE_MODEL to the native model name shown in the model's Quickstart, without the google/ catalog prefix.

Python
import os
from google import genai
from google.genai import types

client = genai.Client(
    api_key=os.environ["MIA_API_KEY"],
    vertexai=False,
    http_options=types.HttpOptions(
        base_url="https://mia-ai-proxy-sit.ambr.io",
        api_version="v1beta",
        retry_options=types.HttpRetryOptions(attempts=1),
    ),
)
response = client.models.generate_content(
    model=os.environ["MIA_GOOGLE_MODEL"], contents="Hello",
)
print(response.text)

These examples disable automatic retries. For streaming and error handling, see Streaming and Errors and retries.

Other model APIs

Embeddings, images, audio, video, realtime, and other provider-specific operations use the examples in each model's Quickstart. Use its exact method, URL, request format, and SDK or WebSocket setup. Image and video explains how to resume asynchronous results.

Tools and APIs

Tools use their native request format with the endpoint supplied for your integration, such as https://mia-ai-proxy-sit.ambr.io/proxy/{name}/{path}, and your MIA key as a Bearer token.

For an enabled tool, open API Keys, expand the key, then choose Agreed prices → Integration details for its methods, endpoints, request requirements, and rates. To arrange access, choose a tool in Explore and follow its integration instructions. A tool listing alone does not establish access.

Exa native search and research

For a provisioned Exa route, use https://mia-ai-proxy-sit.ambr.io/proxy/exa as the official Exa SDK base URL and your MIA key as its API key. No /v1 suffix is needed. Search, Contents and Answer retain native parameters, rich results, citations and SSE. Tool details show the published Points rates; an explicit agreement on your key takes precedence.

Agent runs retain their native lifecycle at /agent/runs. Creation reserves credit and freezes the price. Completion settles the final usage once; failed or cancelled runs have zero customer fee. Reading the same run or replaying its events adds no fee. Background settlement continues if your client disconnects. The admission estimate does not change Exa's effort or budget parameters.

Use the same key and Account to read, stop, cancel, continue or delete a run. Delete only after settlement; team-wide listing is unavailable on shared metered routes. An uncertain creation must not be repeated automatically. Monitors, batches and Websets are not included in this Points offering.

Models & tools ↗