Developer API

Модели

Смотрите AI Gateway model IDs, provider availability, RICO recipes, media workflows и effect presets.

Каталоги моделей

Используйте /models для моделей AI Gateway и /rico/models для media recipes, workflows и effects.

Пример
curl https://api.grik.io/api/v1/models \
  -H "Authorization: Bearer GRIK_API_KEY"

# Model rows include api_type: responses, openai_compatible, or anthropic_messages.

curl "https://api.grik.io/api/v1/rico/models?type=recipe" \
  -H "Authorization: Bearer GRIK_API_KEY"
GET/models

Показывает модели AI Gateway: provider availability, context length, pricing, capabilities и data policy metadata.

Авторизация: Bearer необязателенОбласть: -Аудитория: Разработчики
GET/rico/models

Показывает RICO recipes, workflows и effect presets. Optional filters: recipe, workflow, effect.

Авторизация: API keyОбласть: rico.media or videoАудитория: Разработчики
GET/rico/models/:id

Показывает один RICO recipe, workflow, model или effect preset по id.

Авторизация: API keyОбласть: rico.media or videoАудитория: Разработчики
GET/rico/workflows

Показывает media workflows, доступные для RICO sessions и video automation.

Авторизация: API keyОбласть: rico.media or videoАудитория: Разработчики
GET/rico/recipes

Показывает reusable RICO recipes для generated media workflows.

Авторизация: API keyОбласть: rico.media or videoАудитория: Разработчики

Маршрутизация и fallback

Chat completions принимает primary model, fallback models и provider routing hints.

Пример
curl -X POST https://api.grik.io/api/v1/chat/completions \
  -H "Authorization: Bearer GRIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "models": ["openai/gpt-4o-mini", "minimax/minimax-m3"],
    "provider": {
      "order": ["openrouter", "ricochet"],
      "ignore": ["experimental-provider"],
      "allow_fallbacks": true,
      "sort": "price"
    },
    "messages": [
      {"role": "user", "content": "Generate a release-risk checklist."}
    ]
  }'