Integration
Dify with an OpenAI-compatible model provider
Dify ships an OpenAI-API-compatible provider. That is the correct integration point: base URL, key and model name.
Updated
Provider setup
In Dify settings, add a model provider of type OpenAI-API-compatible. Set the base URL to https://llmcode.io/v1 and paste the key.
Add the published model slugs as model names. If Dify offers a model list fetch, it should return the catalog.
Workflows
Workflow and agent nodes can call the model repeatedly. Use a dedicated key with a spend limit and set max_tokens per node.
Long knowledge-base prompts increase input cost; measure one run before scaling a workflow.
Embeddings
Dify can use an OpenAI-compatible embeddings endpoint. LLMcode serves POST /v1/embeddings; check that the chosen model is published before indexing a knowledge base.
Connect
Provider type: OpenAI-API-compatible
Base URL: https://llmcode.io/v1
API key: sk-llmcode-…
Model: flashPublished model prices
USD per 1M tokens. The numbers come from the public catalog on every page rebuild — this is the sale price, not an estimate.
| Model | Input | Output | Cache |
|---|---|---|---|
| Claude Opus 5.5 | $2.70 | $8.00 | $0.14 |
| DeepSeek Flash | $0.50 | $2.00 | $0.01 |
| Claude Sonnet 5.5 | $1.33 | $6.67 | $0.07 |
| DeepSeek V4 Pro | $2.20 | $6.60 | $0.07 |
Top-up from $10, balance in USD. 1 USD = 1,000,000 UT. No subscription and no auto-charge.
Questions
Which provider type in Dify?
OpenAI-API-compatible, with base URL https://llmcode.io/v1.
Can I use embeddings?
Yes, if an embedding model is published in the catalog. Check /models before configuring the knowledge base.
How do I control workflow cost?
A dedicated key with a spend limit, max_tokens per node and a measured test run.