Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ramalama.com/llms.txt

Use this file to discover all available pages before exploring further.

Once you have created an API key, use it to authenticate requests to RamaLama Cloud. Your API key provisions access to a variety of hosted API gateways, allowing you to access models from multiple providers through a unified interface.

Authentication

Include your API key in the Authorization header with the Bearer prefix:
Authorization: Bearer your-api-key

Accessing Models

Models are referenced using the format provider/model-name. This allows you to call models from different providers through the same API endpoint.

Example: Calling GPT-5.1

curl -X POST https://gateway.ramalama.com/v1/chat/completions \
  -H "Authorization: Bearer $RAMALAMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.1",
    "messages": [
      {"role": "user", "content": "Hello, world!"}
    ]
  }'

Environment Variables

Store your API key in an environment variable to avoid hardcoding it:
export RAMALAMA_API_KEY="your-api-key-here"

Error Responses

Status CodeMeaning
401Invalid or missing API key
403API key does not have permission for this resource
429Rate limit exceeded

Security Tips

  • Never expose API keys in client-side code
  • Use environment variables or secret management tools
  • Implement key rotation in production environments