AI & Models · Integration

AI/ML API

Add AI/ML API to your product for your customers, and give your AI agents governed access to it.

AI/ML API is an OpenAI compatible gateway at https://api.aimlapi.com/v1, so existing OpenAI client libraries work by changing the base URL and key. GET /v1/models is open and returns the catalogue without a key, which makes it a useful health check, while /v1/chat/completions returns a JSON 401 that names the exact billing page where keys are created. Model identifiers are vendor namespaced rather than bare names, so you pass something like google/gemini-2.0-flash and a request copied from another provider that sends a bare model name will be rejected. Alongside chat there are image, video and embedding endpoints on the same key and the same balance, so a single tenant credential covers several modalities and a single runaway job affects all of them. fastn holds each customer's key server side and keeps the connection maintained as keys are rotated.

Start freeBook a demo

In your product

Embedded for your customers. Per-tenant auth, no per-customer code, maintained by fastn.

Let a customer connect their own AI/ML API key so model spend sits on their balance and not on yours

Offer a model picker built from the public models list so customers choose what runs on their key

Route different features to different models without asking the customer for a second provider credential

Generate embeddings for a customer's own content using the same key that powers their chat features

For your AI agents

Governed, audited access for the agents you build, through the MCP server.

Let an agent run a completion on a tenant's chosen model without ever handling the raw key

Have an agent read the models list and recommend a cheaper model for a task that does not need the largest one

Audit per tenant which models an agent called and how often, since one key covers chat, image and embedding spend

Example prompt

Which models are available on our key, and which one should we use for summarising long documents?

Set up AI/ML API in 4 steps

  1. 01Enable the AI/ML API connector from your fastn dashboard.
  2. 02Have each customer authorise their own AI/ML API account, so calls run under their credentials rather than a shared key.
  3. 03Decide which models, requests and outputs your product needs, map those fields, then enable the actions and triggers you want.
  4. 04Call it from your product and expose it to your agents through the same governed connection.

Why teams use the AI/ML API integration

What you get by embedding it with fastn instead of building it yourself.

  • Ship an AI/ML API integration without building it. Your customers connect their own AI/ML API account inside your product and work their models, requests and outputs there, with no per-customer code on your side.
  • Handle the part that actually costs time: per-customer keys, quotas and cost attribution matter more than schema here, because every call is billed. fastn owns the auth, token refresh, rate limits, pagination and breaking-change fixes, so an AI/ML API update is not your on-call problem.
  • One integration serves your product and your agents. The same governed AI/ML API connection powers in-product features and gives AI agents scoped, audited access, so you give your product and your agents a model call each customer pays for themselves without wiring it twice.

Used by these teams

EngineeringData & Analytics

Compare with

Anthropic ClaudeOpenAIAzure OpenAI

Often used alongside

Tools the same teams tend to run next to AI/ML API, across other categories.

SnowflakeAirtablePostgreSQLAmplitude

AI/ML API integration FAQ

How do I add an AI/ML API integration to my product?

Enable the AI/ML API connector in your fastn dashboard, then let each customer authenticate their own AI/ML API account. fastn handles the OAuth flow, token storage and refresh per tenant, so there is no AI/ML API client code in your app and no per-customer branch in your codebase. Setup is 4 steps.

Do my customers each connect their own AI/ML API account?

Yes. Every connection is scoped to the individual customer, so each authorises their own AI/ML API account and only ever sees their own models, requests and outputs. That per-tenant isolation is the point of an embedded integration: you support the long tail of customer setups without maintaining an integration per customer.

Can AI agents use this AI/ML API integration?

Yes. The same connection is exposed to your agents through the fastn MCP gateway, with permissions scoped per tenant and every call audited. Let an agent run a completion on a tenant's chosen model without ever handling the raw key

Who maintains the AI/ML API integration?

fastn does. When AI/ML API changes an endpoint, deprecates a field or alters its auth, the fix lands in the connector rather than in your backlog, and your customers' connections keep working.

Whose AI/ML API API key and quota does each call use?

Each customer authorises their own AI/ML API account, so usage, rate limits and cost land on the customer that caused them. You are not metering a shared key and re-billing it, and one heavy customer cannot exhaust another's quota.

Are inputs and outputs auditable?

Yes. Every call is logged per tenant with the call, the input and the result, so an output can be traced back to what produced it. That matters more here than in most integrations, because a generated answer or an extracted field cannot be reconstructed from the request alone.

What can I build with the AI/ML API integration?

A common starting point: let a customer connect their own AI/ML API key so model spend sits on their balance and not on yours. Teams also use it for the other use cases listed above, and expose it to agents for governed reads and writes.

How much does the AI/ML API integration cost?

It is included. Pricing is based on connected accounts, not on how many connectors you enable, so adding AI/ML API does not change your per-connector cost. You can start free with 3 connected accounts.

Add AI/ML API to your product

Start free with 3 connected accounts. No sales call required, and no per-customer integration code.

Start freeRead the docs
← All integrations