canonical: https://jentic.com/apis/goldbean-api.xyz/goldbean-api

# Goldbean Api Xyz GoldBean API

The GoldBean API provides pay-per-call access to a range of AI models, bridging Baidu AI capabilities to an OpenAI-compatible surface. It generates chat completions and embeddings, creates images from text prompts, transcribes audio and synthesizes speech, and runs OCR, translation, and NLP through Baidu-backed endpoints. Paid inference endpoints settle in USDC on Base using the x402 protocol, while system endpoints such as health and model listing are free.

## For AI agents

Call pay-per-call AI inference over an OpenAI-compatible surface: chat completions, embeddings, image generation, speech, transcription, OCR, and translation backed by Baidu models. Payments settle in USDC on Base via x402.

## Scope

Does not handle model training, fine-tuning, or vector storage. Use for pay-per-call inference across Baidu-backed AI models for text, image, speech, and OCR only.

## Capabilities

- Generate chat completions through an OpenAI-compatible endpoint
- Create text embeddings for semantic search
- Generate images from text prompts
- Transcribe audio to text and synthesize speech from text
- Run OCR on images, including ID card and high-accuracy modes
- Translate text and run NLP analysis through Baidu models

## Use cases

### Agent Multimodal Inference

An AI agent connected through Jentic reaches several model types through one GoldBean integration, calling chat completions for reasoning, embeddings for retrieval, and image or speech endpoints for generation as a task requires. Because the surface is OpenAI-compatible, the agent uses familiar request shapes while GoldBean handles the pay-per-call settlement.

Example prompt: Generate a chat completion for a prompt, then create embeddings for the same text and report both results

### Pay-Per-Call OCR and Translation

A document workflow runs OCR on a scanned page and translates the extracted text, paying only for the calls it makes. The Baidu-backed OCR and translation endpoints are reached directly, so the workflow needs no separate OCR vendor and translation vendor.

Example prompt: Run OCR on an image to extract text, then translate the extracted text into English

### OpenAI-Compatible Chat and Embeddings

A retrieval-augmented app points its existing OpenAI-style client at GoldBean to generate embeddings for its corpus and chat completions over the retrieved context. Listing the available models first lets the app pick a supported model before sending inference requests.

Example prompt: List the available models, generate embeddings for a document set, and run a chat completion over the retrieved context

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Chat completions, OpenAI-compatible |
| POST | `/v1/embeddings` | Generate embeddings |
| POST | `/v1/images/generations` | Generate an image from a prompt |
| POST | `/v1/audio/transcriptions` | Transcribe audio to text |
| POST | `/v1/audio/speech` | Synthesize speech from text |
| GET | `/paid/baidu-ocr` | Run Baidu OCR on an image |
| GET | `/paid/baidu-translate` | Translate text with Baidu |
| GET | `/v1/models` | List available models |

## Key resources

- **OpenAI-compatible inference** — Chat completions, embeddings, image generation, speech, and transcription
- **Baidu AI models** — OCR, speech recognition, text-to-speech, translation, NLP, image, and face analysis
- **System and pricing** — Health, service info, model listing, and pricing lookups

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 0 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 99 / 100
  - Developer Experience & Jentic Compatibility: 60 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 94 / 100
  - Security: 0 / 100
  - AI Discoverability: 55 / 100
- **View full report:** https://jentic.com/apis/goldbean-api.xyz/goldbean-api/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the GoldBean API by hand means handling its x402 pay-per-call protocol, settling USDC on Base for each paid request, and keeping the free system endpoints separate from the paid inference ones. Through Jentic you install once, import GoldBean from the API Directory, store the payment credential once, and your agent calls it.
- **Permission scoping:** GoldBean exposes each model as its own path (`/v1/chat/completions`, `/paid/baidu-ocr`), so a rule can pin your agent to just the inference operations you pick, such as chat completions and embeddings. You choose the operations it may call, so costly image or speech generation is not included unless you add it.
- **Credential handling:** Your GoldBean payment credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a chat completion' or 'run OCR on an image', and Jentic returns the matching GoldBean operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenAI API** — The reference OpenAI-compatible surface for chat, embeddings, and image generation that GoldBean mirrors with pay-per-call Baidu-backed models.
- **Anthropic Messages API** — A frontier chat completion API, where GoldBean fans out to many model types including OCR, speech, and translation.
- **Hugging Face API** — Hosts a broad range of open models for inference that complement GoldBean's packaged pay-per-call endpoints.

## FAQ

### How does the GoldBean API handle authentication and payment?

The GoldBean API uses the x402 pay-per-call protocol per its OpenAPI spec: paid inference endpoints settle in USDC on Base, while system endpoints such as health, service info, and model listing need no payment. Through Jentic the payment credential is stored encrypted by your own Jentic One instance and injected at call time, so it never reaches the agent's context.

### Can I use the GoldBean API with OpenAI-compatible clients?

Yes. The chat completions, embeddings, image generation, speech, and transcription endpoints follow the OpenAI request shape, and a models endpoint lists what is available. An existing OpenAI-style client can point at GoldBean's base URL with little change.

### Can I limit what my agent is allowed to do with the GoldBean API?

Yes. GoldBean exposes each model as its own path, so write a rule that allows only the inference operations you pick, such as chat completions and embeddings, so costly image or speech generation is not included unless you add it. Every call the agent makes is logged, which matters when each paid call spends USDC.

### What are the rate limits for the GoldBean API?

The OpenAPI spec does not state request rate limits for the GoldBean API; access is pay-per-call, so cost rather than a fixed ceiling governs usage. Check the GoldBean documentation and its pricing endpoints for the current per-endpoint prices.

### How do I generate a chat completion with the GoldBean API through Jentic?

Search Jentic for 'generate a chat completion' and it returns the chat completions operation with its input schema; your agent sends the prompt and reads back the model's response. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a GoldBean MCP server?

You don't need a separate server to give your agent the GoldBean API. Jentic connects it directly from the API Directory: import it, store your payment credential once, and your agent calls the inference operations with scoping and credential isolation applied.
