Skip to main content
Declare the service in marina.json, then call marina.ai.generate:
marina.json
Apps never handle provider credentials or SDKs; Marina routes the call and returns { text }.

Choosing a model

model accepts a stable class or a specific model id:
  • fast: quick, inexpensive responses.
  • smart: the stronger default for most work.
  • A model id from Marina’s library, in vendor/model form, for example anthropic/claude-sonnet-5.
List what your deployment offers, and which account pays, with:
Unknown ids are rejected with the offered list in the error message.

Who pays

By default, generations bill the organization’s Marina-managed key. To bill your own account instead, add an OpenRouter connection under Settings → Connections with your sk-or- API key. While it is active, your workspace’s generations run on your OpenRouter account and its model access.

Limits

  • Up to 64 messages per request; 32 KiB per message; 128 KiB total input.
  • maxOutputTokens up to 4,096 (default 1,024 for fast, 2,048 otherwise).
  • Roles are system, user, and assistant; content is text.
  • Generation is non-streaming.
Prompts and generated text are never logged or stored by Marina.