canonical: https://jentic.com/apis/aimlapi.com

# AI/ML API APIs

AI/ML API (aimlapi.com) is a unified inference platform reached through one Bearer-authenticated REST surface modelled on OpenAI conventions. Its broader spec runs chat completions, text completions, embeddings, image generation, audio transcription, and text-to-speech, and lists supported models so a client can switch backends without changing integration code. A companion spec adds two focused endpoints for document OCR and vision-feature image analysis. Jentic publishes and validates the only available OpenAPI specifications for both, keeping them agent-ready.

## For AI agents

An agent can generate chat and text completions, create embeddings, produce images, transcribe audio, synthesize speech, and list available models, plus run OCR on documents and analyse images with vision features, all through one AI/ML API account.

## Scope

Use for: Running inference against AI/ML API: chat, text completions, embeddings, image generation, audio transcription and speech, model listing, plus document OCR and vision-feature image analysis.

Not supported:
- model fine-tuning
- model training
- hosted vector storage
- real-time audio streaming
- custom model hosting

## APIs

| API | Category | Endpoints | Description |
| --- | --- | --- | --- |
| AI/ML API | ai-ml | 7 | Run chat completions, text completions, embeddings, image generation, audio transcription, and text-to-speech through one OpenAI-style endpoint set, and list supported models. |
| AIMLAPI | ai-ml | 2 | Run OCR on documents and analyse images with vision features through two focused endpoints. |

## Which API to use

| Need | API | Why |
| --- | --- | --- |
| Chat, text completions, embeddings, image generation, or audio transcription and speech | aiml-api | The aiml-api spec exposes the OpenAI-style chat, completions, embeddings, images, and audio endpoints plus model listing. |
| Text extraction from document images or vision-feature analysis of images | aimlapi | The aimlapi spec exposes the focused /ocr and /vision endpoints for document and image understanding. |
| Turning an image into a text description | aimlapi | Use /vision on the aimlapi spec for image analysis; the aiml-api spec generates images from text rather than describing them. |

## Cross-API use cases

### Scanned document to summarised answer

Extract text from an uploaded document with the OCR endpoint, embed the result for retrieval, then generate a chat answer grounded in the extracted content. One account covers OCR, embeddings, and chat.

Example prompt: POST the document image to /ocr on the aimlapi spec, POST the returned text to /v1/embeddings, then POST /v1/chat/completions with the retrieved context to answer the user's question

### Image triage with captioning and speech reply

Analyse an uploaded image for vision features, generate a natural-language caption from those features with a chat completion, then synthesize a spoken version of the caption. The image, text, and audio steps run against the same vendor.

Example prompt: POST the image to /vision on the aimlapi spec, send the returned features to /v1/chat/completions to write a caption, then POST that caption to /v1/audio/speech

### Mixed-input intake router

An agent receives a mix of scanned documents and everyday photos, routes documents to OCR and photos to vision, then normalises both into structured records using a chat completion. Routing and normalisation share one credential.

Example prompt: Classify each upload, POST documents to /ocr and photos to /vision on the aimlapi spec, then POST the combined output to /v1/chat/completions to produce a normalised record

## Why Jentic

- **Setup:** Wiring AI/ML API by hand means handling its account credential, matching each request to the right chat, embedding, image, audio, OCR, or vision endpoint across two specs, and writing your own retry logic. With Jentic you install Jentic One once, add AI/ML API from the Jentic directory, store the credential once, and your agent calls any endpoint.
- **Permission scoping:** AI/ML API carries its model and inputs in the request body rather than in separate scopes, so you scope the agent by operation in your own self-hosted Jentic One instance. Your rules decide which endpoints and credentials it may use, for example allowing only /v1/chat/completions and /ocr while leaving out image, audio, and vision endpoints it does not need.
- **Credential handling:** Your AI/ML API credential is stored once, encrypted, by your own Jentic One instance and injected at execution time for the operations you permit. It never enters the agent's prompt, logs, or context, even though both specs share the same account.
- **Discovery method:** Agents search the Jentic directory by intent such as 'generate a chat completion' or 'extract text from a document image', and Jentic returns the matching AI/ML API operation with its input schema so the agent calls the right endpoint across either spec without browsing the reference docs.

## Related vendors

- **OpenAI** — First-party chat, embedding, image, and audio APIs that AI/ML API's OpenAI-style surface mirrors.
- **Cohere** — Hosted LLM platform with strong embeddings and reranker models for retrieval pipelines.
- **Cloudmersive** — Dedicated OCR provider with broader document format support than AI/ML API's OCR endpoint.
- **Clarifai** — Vision platform with classification and custom-trained image models beyond basic vision features.

## FAQ

### What can I build across AI/ML API's specs?

The broader spec runs chat and text completions, embeddings, image generation, audio transcription, and text-to-speech, and lists supported models. The focused spec adds document OCR and vision-feature image analysis. Together they cover text, image, and audio inference plus document and image understanding under one account.

### Do the two specs share one account and credential?

Yes. Both call the same api.aimlapi.com base URL and use one AI/ML API account credential. The broader spec documents it as an HTTP Bearer token and the OCR and vision spec as an apiKey scheme, but both resolve to the same account.

### Which spec should I use for a given task?

Use the aiml-api spec for chat, completions, embeddings, image generation, and audio. Use the aimlapi spec for extracting text from document images with OCR and for analysing images with vision features. Many workflows chain both, such as running OCR then answering questions with a chat completion.

### Can I switch models without changing my integration?

Yes on the broader spec. Call GET /v1/models to discover which model identifiers are currently supported, then pass the chosen model id to the chat, completions, or embeddings endpoints. Switching backends is a config change rather than a code rewrite.

### Are these official specs?

AI/ML API does not publish its own OpenAPI specifications. Jentic generates and maintains both specs so agents and developers can call the endpoints through structured tooling. Each is validated against the live API and kept up to date.

### Are there published rate limits?

Neither spec declares explicit rate limits. Treat HTTP 429 responses as a signal to back off, and expect the practical limit to be the provider's per-key quota across both the inference and the OCR and vision endpoints.
