一键导入
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