{"id":15200003,"url":"https://github.com/portkey-ai/vercel-provider","last_synced_at":"2025-05-07T19:27:12.039Z","repository":{"id":278364871,"uuid":"847729224","full_name":"Portkey-AI/vercel-provider","owner":"Portkey-AI","description":"portkey vercel native integration","archived":false,"fork":false,"pushed_at":"2025-03-20T06:51:14.000Z","size":80,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T12:20:02.955Z","etag":null,"topics":["portkey","vercel-ai"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@portkey-ai/vercel-provider","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Portkey-AI.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T12:40:40.000Z","updated_at":"2025-04-28T18:57:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"58d47fad-6a9c-4c9f-90a9-c6a2f8937928","html_url":"https://github.com/Portkey-AI/vercel-provider","commit_stats":null,"previous_names":["portkey-ai/vercel-provider"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Portkey-AI%2Fvercel-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Portkey-AI%2Fvercel-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Portkey-AI%2Fvercel-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Portkey-AI%2Fvercel-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Portkey-AI","download_url":"https://codeload.github.com/Portkey-AI/vercel-provider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252942839,"owners_count":21829135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["portkey","vercel-ai"],"created_at":"2024-09-28T02:23:41.049Z","updated_at":"2025-05-07T19:27:12.029Z","avatar_url":"https://github.com/Portkey-AI.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vercel AI SDK - Portkey Provider\n\nThe **[Portkey provider](https://sdk.vercel.ai/providers/community-providers/portkey)** for the [Vercel AI SDK](https://sdk.vercel.ai/docs)\ncontains language model support for the Portkey chat and completion APIs.\n\n## Setup\n\nThe Portkey provider is available in the `portkey-ai-provider` module. You can install it with\n\n```bash\npnpm add portkey-ai-provider\n```\n\n### Provider and Model\n\n```ts\nimport { createPortkey } from '@ai-sdk/portkey'\nconst llmClient = createPortkey(\n  {\n    apiKey: {{PORTKEY_API_KEY}},\n    config: {{PORTKEY_CONFIG_ID}},\n  }\n)\n```\n\n## Example\n\n```ts\n  const response = await generateText({\n    model: llmClient.chatModel({{MODEL_ID}}),\n    messages: [\n      {\n        role: \"user\",\n        content: \"What is a portkey?\"\n      }\n    ],\n    maxTokens: 40\n  })\n\nconsole.log(response)\n```\n\n## Image generation example\n\n```ts\nconst response = await generateImage({\n  model: llmClient.imageModel(model),\n  prompt:\n    \"A playful dog riding a skateboard, showcasing a fun and energetic vibe. The dog is a medium-sized breed with a joyful expression, wearing a colorful bandana.\",\n  n: 1,\n  size: \"1024x1024\" as `${number}x${number}`,\n  aspectRatio: \"1:1\" as `${number}:${number}`,\n});\n```\n\nresponse.images returned by the `generateImage` method is either an array of base64 strings or an array of bytes (Uint8Array).\n\n## Documentation\n\nPlease check out the **[Portkey provider documentation](https://docs.portkey.ai/docs/integrations/libraries/vercel)** for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportkey-ai%2Fvercel-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fportkey-ai%2Fvercel-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportkey-ai%2Fvercel-provider/lists"}