{"id":17158922,"url":"https://github.com/trevorwang/openai_dart","last_synced_at":"2025-07-24T21:35:27.982Z","repository":{"id":144704333,"uuid":"616385095","full_name":"trevorwang/openai_dart","owner":"trevorwang","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-04T09:20:48.000Z","size":1990,"stargazers_count":9,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T13:48:39.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trevorwang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-20T09:36:56.000Z","updated_at":"2024-06-22T15:41:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"574b0eb1-af5f-4621-b1d3-048d59935859","html_url":"https://github.com/trevorwang/openai_dart","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/trevorwang/openai_dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevorwang%2Fopenai_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevorwang%2Fopenai_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevorwang%2Fopenai_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevorwang%2Fopenai_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trevorwang","download_url":"https://codeload.github.com/trevorwang/openai_dart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trevorwang%2Fopenai_dart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266905603,"owners_count":24004148,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T22:12:52.754Z","updated_at":"2025-07-24T21:35:27.936Z","avatar_url":"https://github.com/trevorwang.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openai_api\n\n[![openai_api](https://img.shields.io/pub/v/openai_api?label=openai_api\u0026style=flat-square)](https://pub.dartlang.org/packages/openai_api)\n[![Dart CI](https://github.com/trevorwang/openai_api/workflows/Dart/badge.svg)](https://github.com/trevorwang/openai_api)\n\n## Features\n\nAPIs have been supported by this library. Update to support latest models. Now you can use the API to create speech and generate images with Dall-E 3.\n\n- [x] Chat\n- [x] Images\n- [x] Audio\n  - [x] TTS\n  - [X] STT\n- [x] Models\n- [ ] Edits\n- [ ] Completions\n- [ ] Embeddings\n- [ ] Files\n- [ ] Fine-tunes\n- [ ] Moderations\n- [ ] Engines\n\n## Usge\n\n### Initialize Openai Client\n\n```dart\n  final client = OpenaiClient(\n    config: OpenaiConfig(\n      apiKey: Env.apiKey,   // your api key from openai.com\n      baseUrl: Env.baseUrl,  // you can set your reverse proxy api\n      httpProxy: Env.httpProxy,  // if you need access api through http proxy\n    ),\n  );\n\n```\n\n### Then call the APIs\n\n- Audio Transcription\n\n```dart\n  final result = await client.createTranscription(\n    TranscriptionRequest(\n      file: 'assets/ttsmaker-file-2023-3-22-14-57-0.mp3',\n    ),\n  );\n  print(result.text);\n```\n\n- Audio Translation\n\n```dart\n  final translateResult = await client.createTraslation(\n    TranslationRequest(\n      file: 'assets/ttsmaker-file-2023-3-22-17-27-30.mp3',\n      // file: \"assets/ttsmaker-file-2023-3-22-14-2-35.mp3\",\n      // Wierd. this will be translated into Pinyin for Chinese if prompt not set.\n      // 你好朋友,我好想你。\n      // Ni Hao Peng You, Wo Hao Xiang Ni\n      // prompt: \"Please translate into Chinese.\",\n    ),\n  );\n```\n## Contributors ✨\n\nThanks goes to these wonderful people:\n\n\u003ca href=\"https://github.com/trevorwang/openai_dart/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/openai_dart/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\nContributions of any kind welcome!\n## Activities\n\n![Alt](https://repobeats.axiom.co/api/embed/7f760105c1571e04ab3c945a6679c9f1f5bfb51f.svg \"Repobeats analytics image\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrevorwang%2Fopenai_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrevorwang%2Fopenai_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrevorwang%2Fopenai_dart/lists"}