Use an API key for OpenAI or connect another service that supports the OpenAI chat-completions format. For ChatGPT account sign-in, see Connect ChatGPT to use OpenAI Codex.

Connect the OpenAI API

  1. In CalorieCodex, open Settings → AI quick log and tap Set Up or Manage.
  2. Under Provider, select OpenAI.
  3. Paste your OpenAI API key into OpenAI API key.
  4. Select a Model preset and tap Save Key or Save Changes.

Use a compatible endpoint

  1. Under Provider, select Custom OpenAI-compatible.
  2. Enter the provider’s Base URL and exact Model ID. CalorieCodex appends /chat/completions to the base URL.
  3. Enter an API key if the service requires one, then tap Save or Save Changes.

Choose a model with image input for photos and nutrition labels and tool calling for the Agent. See Connect directly to the DeepSeek API for a concrete example.

Keep your API key safe and limit spending

If you use an API key, set up these safeguards in your provider’s dashboard.

  • Use a separate key for CalorieCodex. Give it a name you’ll recognize, and keep it out of other apps, screenshots, and support messages. If it’s exposed, revoke it and create a replacement.
  • Set a low spending limit. Use a limit on the key if your provider offers one. If limits are managed at the project level, check whether the setting blocks requests or sends an alert.
  • Start with a small prepaid balance. If your provider supports prepaid credits, start with $1–$5 where allowed, or the provider’s minimum. Leave automatic reload off and add credits manually when you need them.