Skip to content

pray How should I go about using openrouter/deepseek/deepseek-chat:free? #736

Closed Answered by karthink
silgon asked this question in Q&A
Discussion options

You must be logged in to vote

I tried:

machine openrouter.ai login apikey password sk-secret-openrouter-api-key-goes-here

This should be fine. You need to set the :key in the openrouter backend definition to gptel-api-key:

(gptel-make-openai "OpenRouter"         ;Any name you want
  :host "openrouter.ai"
  :endpoint "/api/v1/chat/completions"
  :stream t
  :key gptel-api-key                    ; <=== here
  :models '(...))

This is assuming you haven't changed the value of gptel-api-key from its default, which is a function that fetches the key using auth-source.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@silgon
Comment options

@karthink
Comment options

Answer selected by silgon
@silgon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants