Skip to main content

Overview

Mavera’s Responses API is compatible with OpenAI’s API shape. The go-openai library does not yet support the Responses API, so the REST approach with net/http is the primary method. You can still use go-openai for other OpenAI-compatible operations.

Installation

Configuration

Model name: The go-openai library may use gpt-4 or similar. Mavera expects mavera-1. Check the library’s Model constant or pass "mavera-1" as a string. Note that go-openai’s CreateChatCompletion does not support the Responses API — use the REST approach below for full Mavera compatibility.

Passing persona_id

The go-openai library doesn’t expose persona_id on the request struct. You can:
  1. Use a forked or extended client that adds Mavera fields
  2. Inject via a custom request if the library supports extra fields
  3. Use the REST API directly with net/http for full control
Example with REST (no SDK):
For production, use a proper HTTP client, error handling, and avoid re-issuing requests. The REST approach gives you full control over persona_id, input, and other Mavera fields.

Checking go-openai Compatibility

As of this writing, go-openai may support custom model names. Verify the latest go-openai README for:
  • Custom BaseURL in config
  • Custom model names (e.g. "mavera-1")
  • Any extension points for extra request fields
If the library adds support for extra request body fields, you can pass persona_id without using raw REST.

See Also

SDKs Overview

Python, JavaScript, and REST options

Migrate OpenAI → Mavera

Base URL and persona_id

Quickstart: Chat

First request with cURL

API Reference

Responses API spec