AICredits logo
Integrations

Dify

Connect Dify to AICredits with an OpenAI-compatible model provider for chatbots, RAG apps, agents, and workflows.

Use this page with an AI assistant

Opens a new chat with this docs URL and the correct AICredits base URLs.

Dify is a visual platform for building LLM applications, agents, and RAG workflows. Add AICredits as an OpenAI-compatible model provider to use Claude, Gemini, GPT, DeepSeek, and other models from one INR-billed API key.

Setup

In Dify, add an OpenAI-compatible model provider:

SettingValue
Provider nameAICredits
API endpoint URLhttps://api.aicredits.in/v1
API keysk-your-aicredits-key
Model typeChat
Model namePick from Models

Use exact AICredits model IDs such as:

openai/gpt-4o-mini
anthropic/claude-sonnet-4.5
google/gemini-2.5-flash
deepseek/deepseek-v4-flash

Keep the /v1 suffix in the endpoint URL. Dify sends OpenAI-compatible requests under that base path.

Use In Apps

After saving the provider:

  1. Open your Dify app.
  2. Go to the model settings for the app, workflow, or agent node.
  3. Choose AICredits as the provider.
  4. Select or type the model ID.
  5. Run one low-cost test prompt.

For RAG apps, start with a fast chat model such as openai/gpt-4o-mini for retrieval-grounded answers. Use a larger reasoning model only for final responses that need higher quality.

Hostinger Deployment Notes

If you deploy Dify as a Hostinger container, store the AICredits key in Dify's provider settings, not in prompts or workflow variables. Use a dedicated AICredits API key with a monthly budget cap for each shared Dify workspace.

Verify

Create a simple chat app and ask:

Reply with "AICredits via Dify" and nothing else.

Then check Dashboard → Usage to confirm the request appears with the expected model and cost.

Troubleshooting

401 Unauthorized — Replace the provider key with a current AICredits API key.

Model not found — Use the exact model ID from Models.

Connection fails — Confirm the endpoint is https://api.aicredits.in/v1, not the bare domain.

On this page