Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gomodel.enterpilot.io/docs/llms.txt

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

Azure OpenAI speaks the OpenAI API shape with two GoModel-handled differences: an api-key header instead of Authorization: Bearer, and a required api-version query parameter on every request.

Configure

AZURE_API_KEY=...
AZURE_BASE_URL=https://your-resource.openai.azure.com/openai/deployments/your-deployment
AZURE_API_VERSION=2024-10-21   # optional, defaults to 2024-10-21
GOMODEL_MASTER_KEY=change-me
Or in config.yaml:
providers:
  azure:
    type: azure
    base_url: "${AZURE_BASE_URL}"
    api_key: "${AZURE_API_KEY}"
    api_version: "2024-10-21"

Run GoModel

docker run --rm -p 8080:8080 --env-file .env enterpilot/gomodel

Verify

curl -s http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer $GOMODEL_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Reply with the single word ok."}],
    "max_tokens": 80
  }'
GET /v1/models returns the deployments the Azure resource exposes with owned_by: "azure". Streaming, Responses, embeddings, and batches all work the same way; batch results route through the /openai/batches resource path.

Multiple deployments

Each Azure deployment is its own endpoint. Register them as separate providers with suffixed env vars:
AZURE_GPT5_API_KEY=...
AZURE_GPT5_BASE_URL=https://your-resource.openai.azure.com/openai/deployments/gpt-5

AZURE_EMBED_API_KEY=...
AZURE_EMBED_BASE_URL=https://your-resource.openai.azure.com/openai/deployments/text-embedding-3-small
This registers azure-gpt5 and azure-embed. To expose every deployment under one resource through a single provider, point AZURE_BASE_URL at the resource root (no /deployments/...) and use aliases or AZURE_MODELS to advertise specific deployment names.

Notes

  • GoModel accepts the deployment-scoped URL the portal hands you. For account-wide operations (model listing, batches) GoModel strips the /openai/deployments/<deployment> suffix automatically, so one AZURE_BASE_URL covers both chat and resource-level calls.
  • AZURE_API_VERSION only needs to be set explicitly when you need a different stable or preview version — for example a newer Responses API surface.

Troubleshooting

  • 401 Unauthorized / 403AZURE_API_KEY does not match the resource hosting the deployment, or the deployment name in the URL is wrong.
  • Resource not found / DeploymentNotFound — the model in the request body must be the deployment name, not the underlying base model.
  • unsupported api version — bump AZURE_API_VERSION to a version the feature you’re calling supports. Newer Responses API features require recent preview versions.

References