بنقرة واحدة
deepinfra
Guide to setting up and using DeepInfra API for LLM and image generation models.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Guide to setting up and using DeepInfra API for LLM and image generation models.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Phoenix Channel patterns in landing_page_backend — real-time collaboration, WebSocket topics, broadcasting, and channel structure.
Guide to Context module patterns in landing_page_backend — Ecto queries, dynamic query building, Ecto.Multi, and Outbox messaging.
Guide to Phoenix Controller structure in landing_page_backend using FallbackController, tuple responses, and permission plugs.
Patterns for creating Oban background workers in landing_page_backend — queue configuration, job arguments, retry strategies, and dynamic query processing.
Custom Plug middleware patterns in landing_page_backend — authentication (JWT/Passport), authorization, permission checking, and rate limiting.
Guidelines for creating Ecto Schemas in landing_page_backend, including binary UUID primary keys, virtual fields, custom json/1 function, and multiple changeset patterns.
| name | deepinfra |
| description | Guide to setting up and using DeepInfra API for LLM and image generation models. |
| metadata | {"author":"Vũ Lưu","version":"2026.03.25","source":"Generated from sources/deepinfra"} |
This skill focuses on integrating DeepInfra's REST API into any project. Do not use language-specific SDKs (like the
openaiNodeJS package or LangChain) unless the project already heavily depends on them.
useFetch wrapper, an Axios instance, Elixir Req, or standard fetch).fetch commands or new libraries if a standard API wrapper already exists.POST https://api.deepinfra.com/v1/openai/chat/completions.Authorization: Bearer <API_KEY> header. Always read the API key from environment variables (e.g., process.env.DEEPINFRA_API_KEY or System.get_env("DEEPINFRA_API_KEY")) rather than hardcoding.Content-Type: application/json.Adapt this payload to the project's standard API caller:
{
"model": "meta-llama/Meta-Llama-3-70B-Instruct",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}
DeepInfra yields an OpenAI-compatible JSON structure. Handle the response parsing according to the repository's typical data-transformation layers:
{
"id": "chatcmpl-guMTxWgpFf",
"object": "chat.completion",
"created": 1694623155,
"model": "meta-llama/Meta-Llama-3-70B-Instruct",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! It's nice to meet you."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 16,
"total_tokens": 31
}
}
Always use the exact model ID from the DeepInfra catalog, such as:
deepseek-ai/DeepSeek-V3meta-llama/Meta-Llama-3-70B-Instruct